172 lines
3.6 KiB
GraphQL
172 lines
3.6 KiB
GraphQL
### This file was generated by Nexus Schema
|
|
### Do not make changes to this file directly
|
|
|
|
"""
|
|
Testing directive in all positions
|
|
"""
|
|
directive @TestAllDirective on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | SCHEMA | UNION
|
|
|
|
"""
|
|
Testing the object directive
|
|
"""
|
|
directive @TestFieldDirective(bool: Boolean) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
|
|
|
|
"""
|
|
Testing a repeatable directive
|
|
"""
|
|
directive @TestRepeatableDirective repeatable on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | SCHEMA | UNION
|
|
|
|
"""
|
|
Testing with required arg
|
|
"""
|
|
directive @TestRequiredArgDirective(bool: Boolean!) on OBJECT
|
|
|
|
"""
|
|
Testing type directives
|
|
"""
|
|
directive @TestTypeDirective(bool: Boolean) on ENUM | INTERFACE | OBJECT | SCALAR
|
|
|
|
interface I {
|
|
hello: String @TestFieldDirective(bool: true)
|
|
}
|
|
|
|
type Mutation {
|
|
createUser(firstName: String, lastName: String): User
|
|
}
|
|
|
|
"""
|
|
No-Op scalar for testing purposes only
|
|
"""
|
|
scalar MyCustomScalar @TestAllDirective
|
|
|
|
interface Node {
|
|
id: ID!
|
|
}
|
|
|
|
type OfI implements I @TestTypeDirective {
|
|
hello: String @TestFieldDirective(bool: true)
|
|
}
|
|
|
|
type OfI2 implements I & Node {
|
|
composite: String
|
|
hello: String @TestFieldDirective(bool: true)
|
|
id: ID!
|
|
}
|
|
|
|
"""
|
|
PageInfo cursor, as defined in https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo
|
|
"""
|
|
type PageInfo {
|
|
"""
|
|
The cursor corresponding to the last nodes in edges. Null if the connection is empty.
|
|
"""
|
|
endCursor: String
|
|
|
|
"""
|
|
Used to indicate whether more edges exist following the set defined by the clients arguments.
|
|
"""
|
|
hasNextPage: Boolean!
|
|
|
|
"""
|
|
Used to indicate whether more edges exist prior to the set defined by the clients arguments.
|
|
"""
|
|
hasPreviousPage: Boolean!
|
|
|
|
"""
|
|
The cursor corresponding to the first nodes in edges. Null if the connection is empty.
|
|
"""
|
|
startCursor: String
|
|
}
|
|
|
|
type Post @TestRequiredArgDirective(bool: true) {
|
|
body: String
|
|
title: String
|
|
}
|
|
|
|
type PostConnection {
|
|
"""
|
|
https://relay.dev/graphql/connections.htm#sec-Edge-Types
|
|
"""
|
|
edges: [PostEdge]
|
|
|
|
"""
|
|
https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo
|
|
"""
|
|
pageInfo: PageInfo!
|
|
totalCount: Int!
|
|
}
|
|
|
|
type PostEdge {
|
|
"""
|
|
https://relay.dev/graphql/connections.htm#sec-Cursor
|
|
"""
|
|
cursor: String!
|
|
delta(format: String): String
|
|
|
|
"""
|
|
https://relay.dev/graphql/connections.htm#sec-Node
|
|
"""
|
|
node: Post
|
|
}
|
|
|
|
input PostSearchInput {
|
|
body: String
|
|
title: String
|
|
}
|
|
|
|
type Query @TestRepeatableDirective @TestRepeatableDirective {
|
|
customScalar: MyCustomScalar
|
|
foo: String
|
|
searchPosts(input: PostSearchInput): [Post]
|
|
user(id: ID, status: UserStatus = ACTIVE @TestAllDirective): User
|
|
}
|
|
|
|
input Something {
|
|
id: Int!
|
|
}
|
|
|
|
type Subscription {
|
|
someBoolean: Boolean
|
|
someBooleanFromExtendType: Boolean
|
|
someBooleanFromSubscriptionField: Boolean
|
|
someField: Int
|
|
someFields: [Int]
|
|
someFloat: Float
|
|
someID: ID
|
|
someInt: Int @TestAllDirective
|
|
someInts: [Int]
|
|
someString: String @TestFieldDirective(bool: true)
|
|
}
|
|
|
|
type User {
|
|
firstName: String
|
|
lastName: String
|
|
posts(
|
|
"""
|
|
Returns the elements in the list that come after the specified cursor
|
|
"""
|
|
after: String
|
|
|
|
"""
|
|
Returns the elements in the list that come before the specified cursor
|
|
"""
|
|
before: String
|
|
|
|
"""
|
|
Returns the first n elements from the list.
|
|
"""
|
|
first: Int
|
|
|
|
"""
|
|
Returns the last n elements from the list.
|
|
"""
|
|
last: Int
|
|
): PostConnection
|
|
telephone: String
|
|
}
|
|
|
|
enum UserStatus {
|
|
ACTIVE
|
|
PENDING
|
|
}
|