Proto: graphql_schema.proto

Package: apimanagement.gloo.solo.io

Types:

GraphQLSchemaReport

FieldDescription
workspaces(repeated GraphQLSchemaReport.WorkspacesEntry)

ownerWorkspace(string)

The name of the workspace that owns the GraphQL schema.

GraphQLSchemaReport.WorkspacesEntry

FieldDescription
key(string)

value(common.gloo.solo.io.Report)

GraphQLSchemaSpec

FieldDescription
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

FieldDescription
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.
timeout(google.protobuf.Duration)

Set the timeout of the HTTP request to the REST service (default 5s) For information about the value format, see the Google protocol buffer documentation.
options(GraphQLSchemaSpec.ProxiedGraphQL.Options)

GraphQLSchemaSpec.ProxiedGraphQL.HeadersEntry

FieldDescription
key(string)

value(VariableTransformation)

GraphQLSchemaSpec.ProxiedGraphQL.Options

FieldDescription
allowIntrospection(bool)

Enable introspection queries on the GraphQL API served by this GraphQLSchema resource. Introspection queries are used by GraphQL developers to understand the schema of the GraphQL API and create queries that are valid against the schema. This option allows for introspection queries to be sent to the proxied GraphQL server. Introspection is disabled by default and introspection queries will be responded with errors by the proxy. This should be disabled for production environments.

GraphQLSchemaSpec.ProxiedGraphQL.QueryParamsEntry

FieldDescription
key(string)

value(VariableTransformation)

GraphQLSchemaSpec.ProxiedGraphQL.RequestExtraction

FieldDescription
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

FieldDescription
key(string)

value(GraphQLSchemaSpec.ProxiedGraphQL.RequestExtraction)

GraphQLSchemaSpec.ResolvedGraphQL

FieldDescription
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"}
   ]
}
  
FieldDescription
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)

Enable introspection queries on the GraphQL API served by this GraphQLSchema resource. Introspection queries are used by GraphQL developers to understand the schema of the GraphQL API and create queries that are valid against the schema. Introspection is disabled by default, and should be disabled for production environments.

GraphQLSchemaStatus

FieldDescription
common(common.gloo.solo.io.Status)

ownedByWorkspace(string)

The name of the workspace that owns the GraphQL schema.