Module types

Module types 

Source
Expand description

Type definitions of the input and output data structures of the SDK.

Structs§

ArgumentsId
Identifier for arguments in a GraphQL query
AuthenticatedRequestContext
Context available after the authenticate()
AuthorizationDecisions
Authorization decisions for each query elements to be applied by the GraphQL engine.
AuthorizeQueryOutput
Output type for the authorize_query() method.
AuthorizedOperationContext
Context available after the authorize_query()
Configuration
Configuration data for the extension, from the gateway toml config.
Contract
Contract that must be applied on the schema.
ContractDirective
Represents a directive associated with a contract.
DefinitionId
Identifier for a GraphQL definition within a schema
DenySomeBuilder
To be used when denying some of the elements. By default everything is granted.
Directive
Represents a GraphQL directive applied to a schema element
EnumDefinition
Represents a GraphQL enum type definition
EnumDirectiveSite
A directive site for enums
EnumValue
Represents a single possible value in a GraphQL enum definition
Error
Graphql Error with a message and extensions
ErrorId
Error identifier to allow re-using the same error for multiple elements. In the gateway response, the error will be repeated if necessary during serialization.
ErrorResponse
A response containing a status code and multiple errors.
Field
A field within a GraphQL query
FieldDefinition
Represents a GraphQL field definition within an object or interface
FieldDefinitionDirectiveSite
A directive site for field definitions
GraphqlSubgraph
Represents a GraphQL subgraph with its name and URL.
Headers
HTTP headers.
HttpRequestParts
Represents the parts of an HTTP request, including the URL, method, and headers.
InputObjectDefinition
Represents a GraphQL input object type definition
InputValueDefinition
Represents an input value definition in a GraphQL schema
InterfaceDefinition
Represents a GraphQL interface type definition
InterfaceDirectiveSite
A directive site for interfaces
ObjectDefinition
GraphQL object type definition
ObjectDirectiveSite
A directive site for object types
OnRequestOutput
Output type for the on_request() hook.
PublicMetadataEndpoint
An HTTP endpoint exposed publicly on the Gateway. This is typically used to return metadata for authentication purposes, for example with the OAuth 2.0 Protected Resource Metadata spec.
QueryElement
An element of the query on which a directive was applied.
QueryElementId
An identifier for a query element. Only relevant for response authorization as data provided in authorize_query won’t be re-sent in authorize_response. So this ID allows finding the relevant data in the custom state.
QueryElements
A list of elements present in the query on which one of the extension’s directive was applied on their definition.
QueryElementsIterator
Iterator over the elements of the query on which a directive was applied.
RequestContext
Context available after the on_request() hook.
ResolvedField
Represents a resolved field in the context of a subgraph and its parent type
Response
Represents a response from the Grafbase SDK, which can contain data or errors.
ResponseElement
An element of the query on which a directive was applied.
ResponseElements
A list of elements present in the query on which one of the extension’s directive was applied on their definition.
ResponseElementsIterator
Iterator over the elements of the query on which a directive was applied.
ResponseItem
Represents a single item, object or field, that is subject to an authorization rule with the data requested by the directive.
ScalarDefinition
GraphQL scalar type definition
ScalarDirectiveSite
A directive site for scalars
SelectionSet
Represents a selection set in a GraphQL query
SubgraphSchema
GraphQL schema
Token
Token produced by an authentication extension.
Type
Represents a GraphQL type with its wrapping information
UnionDefinition
Represents a GraphQL union type definition
UnionDirectiveSite
A directive site for union types
Variables
All argument values for a given selection set, to be used with Field.

Enums§

Data
Data serialized in either JSON or CBOR
DirectiveSite
The site where a directive is applied in the GraphQL schema.
EntityDefinition
Represents a GraphQL entity definition, which can be either an object or an interface It does not imply that this is a federated entity with a @key directive.
SubscriptionItem
Represents one or multiple items from a subscription.
TypeDefinition
Enum representing the different types of GraphQL definitions
WrappingType
Represents the different ways a GraphQL type can be wrapped

Type Aliases§

GatewayHeaders
HTTP headers for the gateway request.
SubgraphHeaders
HTTP headers for the subgraph request. Those are the result of the GatewayHeaders passed through the