Documentation
¶
Index ¶
- func LazyLoadSchema(namespace uint64) error
- func NewAddGroupRewriter() resolve.MutationRewriter
- func NewServers(withIntrospection bool, globalEpoch map[uint64]*uint64, closer *z.Closer) (IServeGraphQL, IServeGraphQL, *GraphQLHealthStore)
- func NewUpdateGroupRewriter() resolve.MutationRewriter
- func SchemaValidate(sch string) error
- func WriteErrorResponse(w http.ResponseWriter, r *http.Request, err error)
- type DestinationFields
- type GraphQLHealth
- type GraphQLHealthStore
- type Headerkey
- type IServeGraphQL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LazyLoadSchema ¶
func NewAddGroupRewriter ¶
func NewAddGroupRewriter() resolve.MutationRewriter
func NewServers ¶
func NewServers(withIntrospection bool, globalEpoch map[uint64]*uint64, closer *z.Closer) (IServeGraphQL, IServeGraphQL, *GraphQLHealthStore)
NewServers initializes the GraphQL servers. It sets up an empty server for the main /graphql endpoint and an admin server. The result is mainServer, adminServer.
func NewUpdateGroupRewriter ¶
func NewUpdateGroupRewriter() resolve.MutationRewriter
func SchemaValidate ¶
func WriteErrorResponse ¶
func WriteErrorResponse(w http.ResponseWriter, r *http.Request, err error)
WriteErrorResponse writes the error to the HTTP response writer in GraphQL format.
Types ¶
type DestinationFields ¶
type DestinationFields struct { Destination string AccessKey string SecretKey pb.Sensitive SessionToken pb.Sensitive Anonymous bool }
DestinationFields is used by both export and backup to specify destination
type GraphQLHealth ¶
GraphQLHealth is used to report the health status of a GraphQL server. It is required for kubernetes probing.
type GraphQLHealthStore ¶
type GraphQLHealthStore struct {
// contains filtered or unexported fields
}
GraphQLHealthStore stores GraphQLHealth in a thread-safe way.
func (*GraphQLHealthStore) GetHealth ¶
func (g *GraphQLHealthStore) GetHealth() GraphQLHealth
type IServeGraphQL ¶
type IServeGraphQL interface { // After Set is called, this IServeGraphQL serves the new resolvers for the given namespace ns. Set(ns uint64, schemaEpoch *uint64, resolver *resolve.RequestResolver) // HTTPHandler returns a http.Handler that serves GraphQL. HTTPHandler() http.Handler // ResolveWithNs processes a GQL Request using the correct resolver and returns a GQL Response ResolveWithNs(ctx context.Context, ns uint64, gqlReq *schema.Request) *schema.Response }
An IServeGraphQL can serve a GraphQL endpoint (currently only ons http)
func NewServer ¶
func NewServer() IServeGraphQL
NewServer returns a new IServeGraphQL that can serve the given resolvers
Click to show internal directories.
Click to hide internal directories.