type ApqStats struct { // The hash of the incoming query Hash string // SentQuery is true if the incoming request sent the full query SentQuery bool }
func GetApqStats(ctx context.Context) *ApqStats
AutomaticPersistedQuery saves client upload by optimistically sending only the hashes of queries, if the server does not yet know what the query is for the hash it will respond telling the client to send the query along with the hash in the next request. see https://github.com/apollographql/apollo-link-persisted-queries
type AutomaticPersistedQuery struct { Cache graphql.Cache }
func (a AutomaticPersistedQuery) ExtensionName() string
func (a AutomaticPersistedQuery) MutateOperationParameters(ctx context.Context, rawParams *graphql.RawParams) *gqlerror.Error
func (a AutomaticPersistedQuery) Validate(schema graphql.ExecutableSchema) error
ComplexityLimit allows you to define a limit on query complexity
If a query is submitted that exceeds the limit, a 422 status code will be returned.
type ComplexityLimit struct { Func func(ctx context.Context, rc *graphql.OperationContext) int // contains filtered or unexported fields }
func FixedComplexityLimit(limit int) *ComplexityLimit
FixedComplexityLimit sets a complexity limit that does not change
func (c ComplexityLimit) ExtensionName() string
func (c ComplexityLimit) MutateOperationContext(ctx context.Context, rc *graphql.OperationContext) *gqlerror.Error
func (c *ComplexityLimit) Validate(schema graphql.ExecutableSchema) error
type ComplexityStats struct { // The calculated complexity for this request Complexity int // The complexity limit for this request returned by the extension func ComplexityLimit int }
func GetComplexityStats(ctx context.Context) *ComplexityStats
EnableIntrospection enables clients to reflect all of the types available on the graph.
type Introspection struct{}
func (c Introspection) ExtensionName() string
func (c Introspection) MutateOperationContext(ctx context.Context, rc *graphql.OperationContext) *gqlerror.Error
func (c Introspection) Validate(schema graphql.ExecutableSchema) error