Documentation ¶
Index ¶
- Constants
- func AsyncMapReduce[T, P, A any](payload []T, acc A, mapFunc func(field T) (P, error), ...) (A, gqlerrors.ErrorList)
- func IsBuiltinName(s string) bool
- func IsEqual[T comparable](a []T, b []T) bool
- func IsMutationObjectName(s string) bool
- func IsNodeInterfaceName(s string) bool
- func IsQueryObjectName(s string) bool
- func IsRootObjectName(s string) bool
- func IsSubscriptionObjectName(s string) bool
- func SelectionSetToFields(selectionSet ast.SelectionSet, parentDef *ast.Definition) []*ast.Field
Constants ¶
View Source
const ( IDFieldName = "id" NodeFieldName = "node" NodeInterfaceName = "Node" QueryObjectName = "Query" MutationObjectName = "Mutation" SubscriptionObjectName = "Subscription" TypenameFieldName = "__typename" InternalServiceName = "%#!" )
Variables ¶
This section is empty.
Functions ¶
func AsyncMapReduce ¶
func IsBuiltinName ¶
isBuiltInName returns true, if it's a default GQL schema field name, f.e. __typename
func IsEqual ¶
func IsEqual[T comparable](a []T, b []T) bool
func IsMutationObjectName ¶
isMutationObjectName returns true if name is Mutation
func IsNodeInterfaceName ¶
isNodeInterfaceName returns true if name is Node
func IsQueryObjectName ¶
isQueryObjectName returns true if name is Query
func IsRootObjectName ¶
isRootObjectName returns true if name is Query, Mutation or Subscription
func IsSubscriptionObjectName ¶
isSubscriptionObjectName returns true if name is Subscription
func SelectionSetToFields ¶
func SelectionSetToFields(selectionSet ast.SelectionSet, parentDef *ast.Definition) []*ast.Field
SelectionSetToFields extracts from selection set all data as fields array parent definition can be null if we don't want to check anything specific if passed don't add fields which're not represented in parent definition
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.