package
23.1.1+incompatible
Repository: https://github.com/dgraph-io/dgraph.git
Documentation: pkg.go.dev
# Functions
AppendGQLErrs builds a list of GraphQL errors from err1 and err2, if both are nil, the result is nil.
AsGQLErrors formats an error as a list of GraphQL errors.
AsSchema wraps a github.com/dgraph-io/gqlparser/ast.Schema.
CompleteObject builds a json GraphQL result object for the current query level.
CompleteValue applies the value completion algorithm to a single value, which could turn out to be a list or object or scalar value.
ErrorResponse formats an error as a list of GraphQL errors and builds a response with that error list and no data.
FromString builds a GraphQL Schema from input string, or returns any parsing or validation errors.
GQLWrapf takes an existing error and wraps it as a GraphQL error.
GQLWrapLocationf wraps an error as a GraphQL error and includes location information in the GraphQL error.
Introspect performs an introspection query given a query that's expected to be either __schema or __type.
MakeHttpRequest sends an HTTP request using the provided inputs.
NewHandler processes the input schema.
NewOffsetTimerFactory creates a new TimerFactory given offsetFrom as the reference time to calculate the OffsetDuration.StartOffset from.
PrependPath adds the given path item as the first item in the error's path list.
SetPathIfEmpty sets error's path with the given path item as the only item in path, only if initially the error had no path.
Stringify the schema as a GraphQL SDL string.
Given a JSON representation for a body with variables defined, this function substitutes the variables and returns the final JSON.
Unmarshal is like json.Unmarshal() except it uses a custom decoder which preserves number precision by unmarshalling them into json.Number.
# Constants
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
geo type names and fields.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
Query/Mutation types and arg names.
# Variables
JsonEmptyList are the bytes to represent an empty list in JSON.
JsonNull are the bytes to represent null in JSON.
# Structs
EntityRepresentations is the parsed form of the `representations` argument in `_entities` query.
ExecutionTrace records all the resolvers.
Extensions represents GraphQL extensions.
FieldHTTPConfig contains the config needed to resolve a field using a remote HTTP endpoint which could a GraphQL or a REST endpoint.
Struct to store parameters of @generate directive.
LabeledOffsetDuration is an OffsetDuration with a string label.
An OffsetDuration records the offset start and duration of GraphQL parsing/validation.
PersistedQuery represents the query struct received from clients like Apollo.
A Request represents a GraphQL request.
RequestExtensions represents extensions recieved in requests.
A ResolverTrace is a trace of one resolver.
Response represents a GraphQL response.
Trace : Apollo Tracing is a GraphQL extension for tracing resolver performance.Response https://github.com/apollographql/apollo-tracing Not part of the standard itself, it gets reported in GraphQL "extensions".
# Interfaces
A Field is one field from an Operation.
A FieldDefinition is a field as defined in some Type in the schema.
A Handler can produce valid GraphQL and Dgraph schemas given an input of types and relationships.
A Mutation is a field (from the schema's Mutation type) from an Operation.
An OffsetTimer is used to fill out an OffsetDuration.
An Operation is a single valid GraphQL operation.
A Query is a field (from the schema's Query type) from an Operation.
Schema represents a valid GraphQL schema.
A TimerFactory makes offset timers that can be used to fill out an OffsetDuration.
A Type is a GraphQL type like: Float, T, T! and [T!]!.
# Type aliases
MutationType is currently supported mutations.
QueryType is currently supported queries.