@graphql-tools/federation
Table of contents
Variables
Functions
- buildSubgraphSchema
- federationSubschemaTransformer
- getStitchedSchemaWithUrls
- getSubschemaForFederationWithExecutor
- getSubschemaForFederationWithSchema
- getSubschemaForFederationWithTypeDefs
- getSubschemaForFederationWithURL
Variables
SubgraphBaseSDL
• Const
SubgraphBaseSDL: "\n scalar _Any\n scalar _FieldSet\n scalar link__Import\n\n enum link__Purpose {\n SECURITY\n EXECUTION\n }\n\n type _Service {\n sdl: String!\n }\n\n type Query {\n _entities(representations: [_Any!]!): [_Entity]!\n _service: _Service!\n }\n\n directive @external on FIELD_DEFINITION | OBJECT\n directive @requires(fields: _FieldSet!) on FIELD_DEFINITION\n directive @provides(fields: _FieldSet!) on FIELD_DEFINITION\n directive @key(fields: _FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE\n directive @link(url: String!, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA\n directive @shareable repeatable on OBJECT | FIELD_DEFINITION\n directive @inaccessible on FIELD_DEFINITION | OBJECT | INTERFACE | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION\n directive @tag(\n name: String!\n ) repeatable on FIELD_DEFINITION | INTERFACE | OBJECT | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION\n directive @override(from: String!) on FIELD_DEFINITION\n directive @composeDirective(name: String!) repeatable on SCHEMA\n\n directive @extends on OBJECT | INTERFACE\n"
Defined in
packages/federation/src/index.ts:30 (opens in a new tab)
SubgraphSDLQuery
• Const
SubgraphSDLQuery: "\n query SubgraphSDL {\n _service {\n sdl\n }\n }\n"
Defined in
packages/federation/src/index.ts:65 (opens in a new tab)
Functions
buildSubgraphSchema
▸ buildSubgraphSchema<TContext
>(opts
): GraphQLSchema
Type parameters
Name | Type |
---|---|
TContext | any |
Parameters
Name | Type |
---|---|
opts | IExecutableSchemaDefinition <TContext > |
Returns
GraphQLSchema
Defined in
packages/federation/src/index.ts:251 (opens in a new tab)
federationSubschemaTransformer
▸ federationSubschemaTransformer(subschemaConfig
): SubschemaConfig
<any
, any
, any
, Record
<string
, any
>> | SubschemaConfig
<any
, any
, any
, Record
<string
, any
>>[]
Parameters
Name | Type |
---|---|
subschemaConfig | SubschemaConfig <any , any , any , Record <string , any >> |
Returns
SubschemaConfig
<any
, any
, any
, Record
<string
, any
>> | SubschemaConfig
<any
, any
, any
, Record
<string
, any
>>[]
Defined in
packages/stitch/src/types.ts:65 (opens in a new tab)
getStitchedSchemaWithUrls
▸ getStitchedSchemaWithUrls(configs
): Promise
<GraphQLSchema
>
Parameters
Name | Type |
---|---|
configs | HTTPExecutorOptions [] |
Returns
Promise
<GraphQLSchema
>
Defined in
packages/federation/src/index.ts:229 (opens in a new tab)
getSubschemaForFederationWithExecutor
▸ getSubschemaForFederationWithExecutor(executor
): Promise
<{ batch?
: boolean
; batchingOptions?
: BatchingOptions
<any
, any
, any
> ; createProxyingResolver?
: CreateProxyingResolverFn
<Record
<string
, any
>> ; executor
: Executor
; merge?
: Record
<string
, MergedTypeConfig
<any
, any
, Record
<string
, any
>>> ; rootValue?
: any
; schema
: GraphQLSchema
; transforms?
: Transform
<any
, Record
<string
, any
>>[] }>
Parameters
Name | Type |
---|---|
executor | Executor |
Returns
Promise
<{ batch?
: boolean
; batchingOptions?
: BatchingOptions
<any
, any
, any
> ; createProxyingResolver?
: CreateProxyingResolverFn
<Record
<string
, any
>> ; executor
: Executor
; merge?
: Record
<string
, MergedTypeConfig
<any
, any
, Record
<string
, any
>>> ; rootValue?
: any
; schema
: GraphQLSchema
; transforms?
: Transform
<any
, Record
<string
, any
>>[] }>
Defined in
packages/federation/src/index.ts:200 (opens in a new tab)
getSubschemaForFederationWithSchema
▸ getSubschemaForFederationWithSchema(schema
): Promise
<{ batch?
: boolean
; batchingOptions?
: BatchingOptions
<any
, any
, any
> ; createProxyingResolver?
: CreateProxyingResolverFn
<Record
<string
, any
>> ; executor
: Executor
; merge?
: Record
<string
, MergedTypeConfig
<any
, any
, Record
<string
, any
>>> ; rootValue?
: any
; schema
: GraphQLSchema
; transforms?
: Transform
<any
, Record
<string
, any
>>[] }>
Parameters
Name | Type |
---|---|
schema | GraphQLSchema |
Returns
Promise
<{ batch?
: boolean
; batchingOptions?
: BatchingOptions
<any
, any
, any
> ; createProxyingResolver?
: CreateProxyingResolverFn
<Record
<string
, any
>> ; executor
: Executor
; merge?
: Record
<string
, MergedTypeConfig
<any
, any
, Record
<string
, any
>>> ; rootValue?
: any
; schema
: GraphQLSchema
; transforms?
: Transform
<any
, Record
<string
, any
>>[] }>
Defined in
packages/federation/src/index.ts:224 (opens in a new tab)
getSubschemaForFederationWithTypeDefs
▸ getSubschemaForFederationWithTypeDefs(typeDefs
): SubschemaConfig
Parameters
Name | Type |
---|---|
typeDefs | DocumentNode |
Returns
Defined in
packages/federation/src/index.ts:90 (opens in a new tab)
getSubschemaForFederationWithURL
▸ getSubschemaForFederationWithURL(config
): Promise
<SubschemaConfig
>
Parameters
Name | Type |
---|---|
config | HTTPExecutorOptions |
Returns
Promise
<SubschemaConfig
>