Federation Scalars
Apollo Federation scalar types used in pyck
Audience: Programmer
Federation scalars are special scalar types used by Apollo Federation for distributed GraphQL schema composition. These scalars are primarily used internally by the federation runtime and are not typically used directly in client queries.
Available Federation Scalars
join__FieldSet
A string representation of a selection set used to specify fields for federation key directives.
Type: String
Usage: Used in @key directives to define entity keys across services.
type InventoryItem @key(fields: "id") @key(fields: "sku") {
id: ID!
sku: String!
name: String!
}link__Import
Represents an import statement for federation directives and types.
Type: String
Usage: Used to import federation specifications and features.
Understanding Federation in pyck
pyck uses Apollo Federation to compose multiple GraphQL services into a single unified API:
Attachments Service: Handles file uploads and attachments
Inventory Service: Manages inventory items, movements, and repositories
MainData Service: Handles master data (customers, suppliers, data types)
Management Service: Manages companies, users, and access control
Picking Service: Handles picking orders and order fulfillment
Receiving Service: Manages inbound shipments and receiving
WorkflowService: Orchestrates Temporal workflows
Federation Directives
While not scalars, these directives work with federation scalars:
@key: Defines the primary key for an entity@requires: Specifies fields needed from other services@provides: Indicates fields provided by this service@external: Marks fields defined in another service@extends: Extends a type from another service
Example: Federated Entity
Client Perspective
From a client's perspective, federation is transparent. You query the unified schema without needing to know about the underlying service boundaries:
Best Practices
Let Federation Handle It: These scalars are managed by the federation runtime
Focus on the API: As a client developer, work with the composed schema
Understand Service Boundaries: Knowing which service owns which data can help with performance optimization
See Also
Schema Overview for the complete composed schema
Architecture for service architecture details
Apollo Federation Docs for detailed federation concepts
Last updated
Was this helpful?
