"""
ISO 8601, extended format with nanoseconds, Zulu (or "[+-]seconds" as a string or number relative to now)
"""
scalar Timestamp
type FetchError {
code: FetchErrorCode!
message: String!
"Minimum delay before the next fetch should occur, in seconds."
minDelaySeconds: Float!
}
type Message {
level: MessageLevel!
body: String!
}
"A chunk of persisted queries"
type PersistedQueriesChunk {
"Unique identifier."
id: ID!
"The chunk can be downloaded from any of those URLs, which might be transient."
urls: [String!]!
}
type PersistedQueriesResult {
"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 configuration for a router."
routerConfig(
"The reference to a graph variant, like `engine@prod` or `engine` (i.e. `engine@current`)."
ref: String!,apiKey: String!,
"When specified and the result is not newer, `Unchanged` is returned rather than `RouterConfigResult`."
ifAfterId: ID
): RouterConfigResponse!
"Fetch the current entitlements for a router."
routerEntitlements(apiKey: String!,
"When specified and the result is not newer, `Unchanged` is returned rather than `EntitlementsResult`."
ifAfterId: ID,
"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 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!
}
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
}
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
"Minimum delay before the next fetch should occur, in seconds."
minDelaySeconds: Float!
}
"Response indicating the router configuration available is not newer than the one passed in `ifAfterId`, or the router entitlements currently match `unlessId`."
type Unchanged {
"Variant-unique identifier for the configuration that remains in place."
id: ID!
"Minimum delay before the next fetch should occur, in seconds."
minDelaySeconds: Float!
}
union PersistedQueriesResponse = FetchError | PersistedQueriesResult | Unchanged
union RouterConfigResponse = RouterConfigResult | Unchanged | FetchError
union RouterEntitlementsResponse = RouterEntitlementsResult | Unchanged | FetchError
enum FetchErrorCode {
"This token provided is not a valid graph token. Do not retry."
AUTHENTICATION_FAILED
"This token does not have access to fetch the schema for this ref. Do not retry."
ACCESS_DENIED
"The graphRef passed is not a valid ref or no configuration for that ref is found. Please retry with some backoff, eg in case of undeletion."
UNKNOWN_REF
"An internal server error occurred. Please retry with some backoff."
RETRY_LATER
"This instance of Uplink does not support this feature. Please try another instance."
NOT_IMPLEMENTED_ON_THIS_INSTANCE
}
enum MessageLevel {
ERROR
WARN
INFO
}
enum RouterEntitlementAudience {
SELF_HOSTED
CLOUD
}
"Exposes a URL that specifies the behaviour of this scalar."
directive @specifiedBy(
"The URL that specifies the behaviour of this scalar."
url: String!
) on SCALAR