Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 32 additions & 21 deletions apollo-router/src/uplink/uplink.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type FetchError {
minDelaySeconds: Float!
}
type Message {
level: MessageLevel!
body: String!
level: MessageLevel!
}
"A chunk of persisted queries"
type PersistedQueriesChunk {
Expand All @@ -22,14 +22,21 @@ type PersistedQueriesChunk {
urls: [String!]!
}
type PersistedQueriesResult {
"List of URLs chunks are to be fetched from; chunks should be cached by ID between updates. null indicates there is no configured persisted query list."
chunks: [PersistedQueriesChunk!]
"Unique identifier."
id: ID!
"Minimum delay before the next fetch should occur, in seconds."
minDelaySeconds: Float!
"List of URLs chunks are to be fetched from; chunks should be cached by ID between updates. null indicates there is no configured persisted query list."
chunks: [PersistedQueriesChunk!]
}
type Query {
"Fetch the persisted queries for a router."
persistedQueries(apiKey: String!,
"When specified and the result is not newer, `Unchanged` is returned rather than `PersistedQueriesResult`."
ifAfterId: ID,
"The reference to a graph variant, like `engine@prod` or `engine` (i.e. `engine@current`)."
ref: String!
): PersistedQueriesResponse!
"Fetch the configuration for a router."
routerConfig(
"The reference to a graph variant, like `engine@prod` or `engine` (i.e. `engine@current`)."
Expand All @@ -44,13 +51,6 @@ type Query {
"The reference to a graph variant, like `engine@prod` or `engine` (i.e. `engine@current`)."
ref: String!
): RouterEntitlementsResponse!
"Fetch the persisted queries for a router."
persistedQueries(apiKey: String!,
"When specified and the result is not newer, `Unchanged` is returned rather than `PersistedQueriesResult`."
ifAfterId: ID,
"The reference to a graph variant, like `engine@prod` or `engine` (i.e. `engine@current`)."
ref: String!
): PersistedQueriesResponse!
}
type RateLimit {
count: Long!
Expand All @@ -59,31 +59,31 @@ type RateLimit {
type RouterConfigResult {
"Variant-unique identifier."
id: ID!
"The configuration as core schema."
supergraphSDL: String!
"Messages that should be reported back to the operators of this router, eg through logs and/or monitoring."
messages: [Message!]!
"Minimum delay before the next fetch should occur, in seconds."
minDelaySeconds: Float!
"The configuration as core schema."
supergraphSDL: String!
}
type RouterEntitlement {
"RFC 8037 Ed25519 JWT signed representation of sibling fields."
jwt: String!
subject: String!
"Which audiences this entitlemnt applies to. Cloud and on-premise routers each require the presence of their own audience."
audience: [RouterEntitlementAudience!]!
"Router should stop serving requests after this time if commercial features are in use."
haltAt: Timestamp
"Router should warn users after this time if commercial features are in use."
warnAt: Timestamp
"RFC 8037 Ed25519 JWT signed representation of sibling fields."
jwt: String!
subject: String!
"Router should service requests only till the throughput limits specified in this map."
throughputLimit: RateLimit
"Router should warn users after this time if commercial features are in use."
warnAt: Timestamp
}
type RouterEntitlementsResult {
"Unique identifier for this result, to be passed in as `entitlements(unlessId:)`."
id: ID!
"The best available entitlement if any. May have expired already."
entitlement: RouterEntitlement
"Unique identifier for this result, to be passed in as `entitlements(unlessId:)`."
id: ID!
"Minimum delay before the next fetch should occur, in seconds."
minDelaySeconds: Float!
}
Expand All @@ -95,8 +95,8 @@ type Unchanged {
minDelaySeconds: Float!
}
union PersistedQueriesResponse = FetchError | PersistedQueriesResult | Unchanged
union RouterConfigResponse = RouterConfigResult | Unchanged | FetchError
union RouterEntitlementsResponse = RouterEntitlementsResult | Unchanged | FetchError
union RouterConfigResponse = FetchError | RouterConfigResult | Unchanged
union RouterEntitlementsResponse = FetchError | RouterEntitlementsResult | Unchanged
enum FetchErrorCode {
"This token provided is not a valid graph token. Do not retry."
AUTHENTICATION_FAILED
Expand All @@ -123,3 +123,14 @@ directive @specifiedBy(
"The URL that specifies the behaviour of this scalar."
url: String!
) on SCALAR
"Indicates an Input Object is a OneOf Input Object."
directive @oneOf on INPUT_OBJECT
"This directive allows results to be deferred during execution"
directive @defer(
"Deferred behaviour is controlled by this argument"
if: Boolean! = true,
"A unique label that represents the fragment being deferred"
label: String
) on FRAGMENT_SPREAD | INLINE_FRAGMENT
"This directive disables error propagation when a non nullable field returns null for the given operation."
directive @experimental_disableErrorPropagation on QUERY | MUTATION | SUBSCRIPTION