federation

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

The federation package provides the functions, directives and types to create a Schema that's fully capable to work with the Apollo Federation, with Apollo Gateway.

For more, visit https://www.apollographql.com/docs/apollo-server/federation/federation-spec/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extends

func Extends() gql.TypeSystemDirective

Extends directive Apollo Federation supports using an @extends directive in place of extend type to annotate type references

func External

func External() gql.TypeSystemDirective

External directive is used to mark a field as owned by another service

func Federate

func Federate(s *gql.Schema) *gql.Schema

Federate adds the Apollo Federation fields and types to the schema, specified in the Apollo Federation specification https://www.apollographql.com/docs/apollo-server/federation/federation-spec

func Key

func Key(fields string) gql.TypeSystemDirective

Key directive is used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface

func Provides

func Provides(fields string) gql.TypeSystemDirective

Provides directive is used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the gateway

func Requires

func Requires(fields string) gql.TypeSystemDirective

Requires directive is used to annotate the required input fieldset from a base type for a resolver. It is used to develop a query plan where the required fields may not be needed by the client, but the service may need additional information from other services

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL