graphql_stitched_schema.proto

Package : apimanagement.gloo.solo.io

Top

graphql_stitched_schema.proto

Table of Contents

GraphQLStitchedSchemaSpec

Field Type Label Description
subschemas []apimanagement.gloo.solo.io.GraphQLStitchedSchemaSpec.Subschema repeated List of GraphQL Subschemas that compose this GraphQL stitched schema.

GraphQLStitchedSchemaSpec.Subschema

Field Type Label Description
executableSubschema apimanagement.gloo.solo.io.ExecutableSchema
typeMerge []apimanagement.gloo.solo.io.GraphQLStitchedSchemaSpec.Subschema.TypeMergeEntry repeated Type merge configuration for this subschema. Let's say this subschema is a Users service schema and provides the User type (with a query to fetch a user given the username) gql type Query { GetUser(username: String): User } type User { username: String firstName: String lastName: String } and another subschema, e.g. Reviews schema, may have a partial User type: gql type Review { author: User } type User { username: String } We want to provide the relevant information from this Users service schema, so that another API that can give us a partial User type (with the username) will then be able to have access to the full user type. With the correct type merging config under the Users subschema, e.g.: yaml type_merge: User: selection_set: '{ username }' query_name: 'GetUser' args: username: username the stitched schema will now be able to provide the full user type to all types that require it. In this case, we can now get the first name of an author from the Review.author field even though the Reviews schema doesn't provide the full User type.

GraphQLStitchedSchemaSpec.Subschema.TypeMergeConfig

Field Type Label Description
selectionSet string This specifies one or more key fields required from other services to perform this query. Query planning will automatically resolve these fields from other subschemas in dependency order. This is a graphql selection set specified as a string e.g. ‘{ username }’
queryName string specifies the root field from this subschema used to request the local type
this provides the schema stitching engine the format to turn the initial object representation to query arguments so if the GetUser query was defined as
gql input UserSearch { username: String }<br> type Query { GetUser(user_search: UserSearch): User } we would want to set the user query argument with the correct username from an object. we can do that by setting the args as: yaml args: user_search.username: username where user_search.username is the “setter” path that we are setting the argument input value at and username is the “extraction” path that we are extracting from an object, such as {"username": "wpatel"}.
args []apimanagement.gloo.solo.io.GraphQLStitchedSchemaSpec.Subschema.TypeMergeConfig.ArgsEntry repeated

GraphQLStitchedSchemaSpec.Subschema.TypeMergeConfig.ArgsEntry

Field Type Label Description
key string
value string

GraphQLStitchedSchemaSpec.Subschema.TypeMergeEntry

Field Type Label Description
key string
value apimanagement.gloo.solo.io.GraphQLStitchedSchemaSpec.Subschema.TypeMergeConfig

GraphQLStitchedSchemaStatus

Field Type Label Description
global common.gloo.solo.io.GenericGlobalStatus
workspaces []apimanagement.gloo.solo.io.GraphQLStitchedSchemaStatus.WorkspacesEntry repeated 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

GraphQLStitchedSchemaStatus.WorkspacesEntry

Field Type Label Description
key string
value common.gloo.solo.io.WorkspaceStatus