spherehq/sphere

View on GitHub
packages/api/src/modules/account/schema/schema.graphql

Summary

Maintainability
Test Coverage
# import SphereWhereUniqueInput, SphereWhereInput, SphereOrderByInput, Sphere, AccountWhereInput, Account from './../../../../schema/generated/prisma.graphql'
 
type Query {
spheres(
where: SphereWhereInput
orderBy: SphereOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Sphere]!
sphere(where: SphereWhereUniqueInput!): Sphere
account(where: AccountWhereUniqueInput!): Account
}
 
input ExchangeTokenInput {
opaqueToken: String!
}
 
input VerifySphereInput {
code: String!
url: String!
}
 
enum ExchangeTokenError {
INVALID_TOKEN
ACCOUNT_NOT_ACTIVE
APPLICATION_ERROR
}
 
enum VerifySphereError {
UNKNOWN_CODE
INVALID_ACCOUNT_AND_CODE_PAIR
ALREADY_CLAIMED
}
 
type ExchangeTokenResponse {
token: String
error: ExchangeTokenError
}
 
type GenerateVerificationCodeResponse {
code: String!
}
 
type VerifySphereResponse {
error: VerifySphereError
}
 
type Mutation {
exchangeToken(input: ExchangeTokenInput!): ExchangeTokenResponse
generateVerificationCode: GenerateVerificationCodeResponse
verifySphere(input: VerifySphereInput!): VerifySphereResponse
}