GraphQLSchema
Proto: graphql_schema.proto
Package: apimanagement.gloo.solo.io
Types:
- GraphQLSchemaSpec
- GraphQLSchemaSpec.ProxiedGraphQL
- GraphQLSchemaSpec.ProxiedGraphQL.HeadersEntry
- GraphQLSchemaSpec.ProxiedGraphQL.QueryParamsEntry
- GraphQLSchemaSpec.ProxiedGraphQL.RequestExtraction
- GraphQLSchemaSpec.ProxiedGraphQL.VariablesEntry
- GraphQLSchemaSpec.ResolvedGraphQL
- GraphQLSchemaSpec.ResolvedGraphQL.Options
- GraphQLSchemaStatus
- GraphQLSchemaStatus.WorkspacesEntry
GraphQLSchemaSpec
Field | Description |
---|---|
schemaRef |
(core.skv2.solo.io.ClusterObjectRef )Required: Reference to the ApiSchema object which is of type GraphQL schema, which contains the GraphQL SDL defining this GraphQL schema. |
proxied |
(GraphQLSchemaSpec.ProxiedGraphQL )Configuration to delegate resolving this GraphQL request to an external GraphQL server, which can be another GlooGraphQL instance or another instance of a GraphQL server. The external GraphQL server must be compliant with the June 2018 GraphQL specification. |
resolved |
(GraphQLSchemaSpec.ResolvedGraphQL )List of references to GraphQLResolverMap resources. GraphQLResolverMaps contain a mapping from GraphQL fields to resolver configuration, so that those fields can be resolved locally by this GraphQL-envoy instance. Order of the references listed below does matter as resolver maps listed first will be given priority over later ones when tie-breaking field resolver configurations. |
GraphQLSchemaSpec.ProxiedGraphQL
Field | Description |
---|---|
graphqlServers |
(repeated common.gloo.solo.io.DestinationReference )List of destinations that can server GraphQL requests. The external GraphQL server must be compliant with the June 2018 GraphQL specification. Though this is a list, only the first referenced destination will be used until fail-over and load balancing is supported between multiple GraphQL destinations. |
variables |
(repeated GraphQLSchemaSpec.ProxiedGraphQL.VariablesEntry )Declare variables that are used in variable transformations in the fields below for the GraphQL request to a remote server. The keys to this map are the name of the variables. See the variable transformations specifically for how to reference these variables. |
headers |
(repeated GraphQLSchemaSpec.ProxiedGraphQL.HeadersEntry )map of header name to a transformation on extracted variables which are declared in the variables field. The transformation must result in a string value, or an error will be sent back to the client. |
queryParams |
(repeated GraphQLSchemaSpec.ProxiedGraphQL.QueryParamsEntry )map of query parameter name to a transformation on extracted variables which are declared in the variables field. The transformation must result in a string value, or an error will be sent back to the client. |
spanName |
(string )The span name for the remote GraphQL request, used for tracing. If left empty or not set, the request span name will be set to the upstream cluster name. |
GraphQLSchemaSpec.ProxiedGraphQL.HeadersEntry
Field | Description |
---|---|
key |
(string ) |
value |
(VariableTransformation ) |
GraphQLSchemaSpec.ProxiedGraphQL.QueryParamsEntry
Field | Description |
---|---|
key |
(string ) |
value |
(VariableTransformation ) |
GraphQLSchemaSpec.ProxiedGraphQL.RequestExtraction
Field | Description |
---|---|
dynamicMetadata |
(DynamicMetadataExtraction )Extract the value from envoy dynamic metadata. The extracted value is an object. |
requestHeader |
(string )Extract the value from the GraphQL HTTP request header. The extracted value is a string. If the header doesn't exist, an empty string will be used. |
json |
(google.protobuf.Value )Assigns the variable to a JSON value specified here. For information about the value format, see the Google protocol buffer documentation. |
GraphQLSchemaSpec.ProxiedGraphQL.VariablesEntry
Field | Description |
---|---|
key |
(string ) |
value |
(GraphQLSchemaSpec.ProxiedGraphQL.RequestExtraction ) |
GraphQLSchemaSpec.ResolvedGraphQL
Field | Description |
---|---|
resolverMapRefs |
(repeated core.skv2.solo.io.ClusterObjectRef )List of references to GraphQLResolverMap resources. GraphQLResolverMaps contain a mapping from GraphQL fields to resolver configuration, so that those fields can be resolved locally by this GraphQL-envoy instance. Order of the references listed below does matter as resolver maps listed first will be given priority over later ones when tie-breaking field resolver configurations. |
options |
(GraphQLSchemaSpec.ResolvedGraphQL.Options ) |
GraphQLSchemaSpec.ResolvedGraphQL.Options
Set additional options on the references to GraphQLResolverMap resources.
As as simple example for the mex_depth
option, if the schema is
type Query {
employee: Employee
}
type Employee {
manager: Employee
name: String
}
and we set a max_depth
of 3
and we run a query
query { # query depth : 0
employee { # query depth : 1
manager { # query depth : 2
name # query depth : 3
manager { # query depth : 3
name # query depth : 4
}
}
}
}
the graphql server will respond with a response:
{ "data" : {
"employee" : {
"manager" : {
"name" : "Manager 1",
"manager" : {
"name" : null
}}}},
"errors": [
{"message": "field 'name' exceeds the max operation depth of 3 for this schema"}
]
}
Field | Description |
---|---|
maxDepth |
(google.protobuf.UInt32Value )Max GraphQL operation (query/mutation/subscription) depth. This sets a limitation on the max nesting on a query that runs against this schema. any GraphQL operation that runs past the max_depth will add an error message to the response and will return as null . If not configured, or the value is 0, the query depth will be unbounded. For information about the value format, see the Google protocol buffer documentation. |
enableIntrospection |
(bool )Do we enable introspection for the schema? general recommendation is to disable this for production and hence it defaults to false. |
GraphQLSchemaStatus
Field | Description |
---|---|
global |
(common.gloo.solo.io.GenericGlobalStatus ) |
workspaces |
(repeated GraphQLSchemaStatus.WorkspacesEntry )The status of the resource in each workspace that it exists in. |
ownerWorkspace |
(common.gloo.solo.io.OwnerWorkspace )Name of Workspace that owns the route table |
GraphQLSchemaStatus.WorkspacesEntry
Field | Description |
---|---|
key |
(string ) |
value |
(common.gloo.solo.io.WorkspaceStatus ) |