feat: add commands for managing organizations and users
Introduce `AddUserToOrganization`, `RemoveAPIKey`, and `RemoveOrganization` commands to enhance organization management. Implement validation for user addition and API key removal. Update GraphQL schema to support new mutations and add caching for the new events, ensuring that organizations and their relationships are accurately represented in the cache.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package sdlmerge
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@@ -61,12 +62,13 @@ func MergeSDLs(SDLs ...string) (string, error) {
|
||||
return "", fmt.Errorf("merge ast: %w", err)
|
||||
}
|
||||
|
||||
out, err := astprinter.PrintString(&doc)
|
||||
if err != nil {
|
||||
// Format with indentation for better readability
|
||||
buf := &bytes.Buffer{}
|
||||
if err := astprinter.PrintIndent(&doc, []byte(" "), buf); err != nil {
|
||||
return "", fmt.Errorf("stringify schema: %w", err)
|
||||
}
|
||||
|
||||
return out, nil
|
||||
return buf.String(), nil
|
||||
}
|
||||
|
||||
func validateSubgraphs(subgraphs []string) error {
|
||||
|
||||
Reference in New Issue
Block a user