package
23.1.1+incompatible
Repository: https://github.com/dgraph-io/dgraph.git
Documentation: pkg.go.dev

# Functions

GuardianAuthMW4Mutation blocks the resolution of resolverFunc if there is no Guardian auth present in context, otherwise it lets the resolverFunc resolve the mutation.
GuardianAuthMW4Query blocks the resolution of resolverFunc if there is no Guardian auth present in context, otherwise it lets the resolverFunc resolve the query.
GuardianOfTheGalaxyAuthMW4Mutation blocks the resolution of resolverFunc if there is no Guardian of Galaxy auth present in context, otherwise it lets the resolverFunc resolve the mutation.
GuardianOfTheGalaxyAuthMW4Query blocks the resolution of resolverFunc if there is no Guardian of Galaxy auth present in context, otherwise it lets the resolverFunc resolve the query.
New creates a new RequestResolver.
NewAddRewriter returns new MutationRewriter for add & update mutations.
NewAdminExecutor builds a DgraphExecutor for proxying requests through dgraph.
NewDeleteRewriter returns new MutationRewriter for delete mutations..
NewDgraphExecutor builds a DgraphExecutor for proxying requests through dgraph.
NewDgraphResolver creates a new mutation resolver.
NewEntitiesQueryResolver creates a new query resolver for `_entities` query.
NewHTTPMutationResolver creates a resolver that resolves GraphQL mutation from an HTTP endpoint.
NewHTTPQueryResolver creates a resolver that can resolve GraphQL query from an HTTP endpoint.
NewQueryResolver creates a new query resolver.
NewQueryRewriter returns a new QueryRewriter.
NewResolverFactory returns a ResolverFactory that resolves requests via query/mutation rewriting and execution through Dgraph.
NewUpdateRewriter returns new MutationRewriter for add & update mutations.
NewXidMetadata returns a new empty *xidMetadata for storing the metadata.

# Constants

Add Mutation.
Add Mutation with Upsert.
Update Mutation used for removing edges.
Update Mutation used for to setting new nodes, edges.

# Structs

RequestResolver can process GraphQL requests and write GraphQL JSON responses.
A Resolved is the result of resolving a single field - generally a query or mutation.
ResolverFns is a convenience struct for passing blocks of rewriters and executors.
An UpsertMutation is the query and mutations needed for a Dgraph upsert.
A VariableGenerator generates unique variable names.

# Interfaces

A DgraphExecutor can execute a query/mutation and returns the request response and any errors.
A MutationResolver can resolve a single mutation.
A MutationRewriter can transform a GraphQL mutation into a Dgraph mutation and can build a Dgraph dql.GraphQuery to follow a GraphQL mutation.
A QueryResolver can resolve a single query.
A QueryRewriter can build a Dgraph dql.GraphQuery from a GraphQL query,.
A ResolverFactory finds the right resolver for a query/mutation.
A ResultCompleter can take a []byte slice representing an intermediate result in resolving field and applies a completion step.

# Type aliases

CompletionFunc is an adapter that allows us to compose completions and build a ResultCompleter from a function.
DgraphExecutorFunc is an adapter that allows us to compose dgraph execution and build a QueryExecuter from a function.
MutationMiddleware represents a middleware for mutations.
MutationMiddlewares represents a list of middlewares for mutations, that get applied in the order they are present in the list.
MutationResolverFunc is an adapter that allows to build a MutationResolver from a function.
Enum passed on to rewriteObject function.
QueryMiddleware represents a middleware for queries.
QueryMiddlewares represents a list of middlewares for queries, that get applied in the order they are present in the list.
QueryResolverFunc is an adapter that allows to build a QueryResolver from a function.