2022-10-09 15:23:52 +02:00
|
|
|
type Query {
|
2023-04-27 07:09:10 +02:00
|
|
|
organizations: [Organization!]! @auth(user: true)
|
|
|
|
|
supergraph(ref: String!, isAfter: String): Supergraph! @auth(organization: true)
|
2022-10-09 15:23:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Mutation {
|
2023-04-27 07:09:10 +02:00
|
|
|
addOrganization(name: String!): Organization! @auth(user: true)
|
|
|
|
|
addAPIKey(input: InputAPIKey): APIKey! @auth(user: true)
|
|
|
|
|
updateSubGraph(input: InputSubGraph!): SubGraph! @auth(organization: true)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Organization {
|
|
|
|
|
id: ID!
|
|
|
|
|
name: String!
|
|
|
|
|
users: [User!]!
|
|
|
|
|
apiKeys: [APIKey!]!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type User {
|
|
|
|
|
id: String!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type APIKey {
|
|
|
|
|
id: ID!
|
|
|
|
|
name: String!
|
|
|
|
|
key: String
|
|
|
|
|
organization: Organization!
|
|
|
|
|
refs: [String!]!
|
|
|
|
|
read: Boolean!
|
|
|
|
|
publish: Boolean!
|
2022-10-09 15:23:52 +02:00
|
|
|
}
|
|
|
|
|
|
2022-10-14 22:41:56 +02:00
|
|
|
union Supergraph = Unchanged | SubGraphs
|
|
|
|
|
|
|
|
|
|
type Unchanged {
|
|
|
|
|
id: ID!
|
|
|
|
|
minDelaySeconds: Int!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type SubGraphs {
|
|
|
|
|
id: ID!
|
|
|
|
|
minDelaySeconds: Int!
|
|
|
|
|
subGraphs: [SubGraph!]!
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-09 15:23:52 +02:00
|
|
|
type SubGraph {
|
|
|
|
|
id: ID!
|
|
|
|
|
service: String!
|
|
|
|
|
url: String
|
|
|
|
|
wsUrl: String
|
|
|
|
|
sdl: String!
|
|
|
|
|
changedBy: String!
|
|
|
|
|
changedAt: Time!
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-27 07:09:10 +02:00
|
|
|
input InputAPIKey {
|
|
|
|
|
name: String!
|
|
|
|
|
organizationId: ID!
|
|
|
|
|
refs: [String!]!
|
|
|
|
|
read: Boolean!
|
|
|
|
|
publish: Boolean!
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-09 15:23:52 +02:00
|
|
|
input InputSubGraph {
|
|
|
|
|
ref: String!
|
|
|
|
|
service: String!
|
|
|
|
|
url: String
|
|
|
|
|
wsUrl: String
|
|
|
|
|
sdl: String!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
scalar Time
|
|
|
|
|
|
2023-04-27 07:09:10 +02:00
|
|
|
directive @auth(user: Boolean, organization: Boolean) on FIELD_DEFINITION
|