type Query { organizations: [Organization!]! @auth(user: true) supergraph(ref: String!, isAfter: String): Supergraph! @auth(organization: true) } type Mutation { 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! } union Supergraph = Unchanged | SubGraphs type Unchanged { id: ID! minDelaySeconds: Int! } type SubGraphs { id: ID! minDelaySeconds: Int! sdl: String! subGraphs: [SubGraph!]! } type SubGraph { id: ID! service: String! url: String wsUrl: String sdl: String! changedBy: String! changedAt: Time! } input InputAPIKey { name: String! organizationId: ID! refs: [String!]! read: Boolean! publish: Boolean! } input InputSubGraph { ref: String! service: String! url: String wsUrl: String sdl: String! } scalar Time directive @auth(user: Boolean, organization: Boolean) on FIELD_DEFINITION