github.com/codykaup/genqlient@v0.6.2/generate/testdata/queries/schema.graphql (about)

     1  """DateTime is a scalar.
     2  
     3  We don't really have anything useful to do with this description though.
     4  """
     5  scalar DateTime
     6  scalar Date
     7  scalar Junk
     8  scalar ComplexJunk
     9  
    10  """Role is a type a user may have."""
    11  enum Role {
    12    """What is a student?
    13    
    14    A student is primarily a person enrolled in a school or other educational institution and who is under learning with goals of acquiring knowledge, developing professions and achieving employment at desired field. In the broader sense, a student is anyone who applies themselves to the intensive intellectual engagement with some matter necessary to master it as part of some practical affair in which such mastery is basic or decisive.
    15  
    16    (from [Wikipedia](https://en.wikipedia.org/wiki/Student))
    17    """
    18    STUDENT
    19  
    20    """Teacher is a teacher, who teaches the students."""
    21    TEACHER
    22  }
    23  
    24  input PokemonInput {
    25    species: String!
    26    level: Int!
    27  }
    28  
    29  type Pokemon {
    30    species: String!
    31    level: Int!
    32  }
    33  
    34  """UserQueryInput is the argument to Query.users.
    35  
    36  Ideally this would support anything and everything!
    37  Or maybe ideally it wouldn't.
    38  Really I'm just talking to make this documentation longer.
    39  """
    40  input UserQueryInput {
    41    email: String
    42    name: String
    43    """id looks the user up by ID.  It's a great way to look up users."""
    44    id: ID
    45    role: Role
    46    names: [String]
    47    hasPokemon: PokemonInput
    48    birthdate: Date
    49  }
    50  
    51  type AuthMethod {
    52    provider: String
    53    email: String
    54  }
    55  
    56  """A User is a user!"""
    57  type User {
    58    """id is the user's ID.
    59    
    60    It is stable, unique, and opaque, like all good IDs."""
    61    id: ID!
    62    roles: [Role!]
    63    name: String
    64    emails: [String!]!
    65    emailsOrNull: [String!]
    66    emailsWithNulls: [String]!
    67    emailsWithNullsOrNull: [String]
    68    authMethods: [AuthMethod!]!
    69    pokemon: [Pokemon!]
    70    greeting: Clip
    71    birthdate: Date
    72  }
    73  
    74  """An audio clip, such as of a user saying hello."""
    75  type Clip implements HasDuration {
    76    id: ID!
    77    duration: Int!
    78  }
    79  
    80  """Content is implemented by various types like Article, Video, and Topic."""
    81  interface Content {
    82    """ID is the identifier of the content."""
    83    id: ID!
    84    name: String!
    85    parent: Topic
    86    url: String!
    87    next: Content
    88    related: [Content!]
    89  }
    90  
    91  """An object with a duration, like a video."""
    92  interface HasDuration {
    93    duration: Int!
    94  }
    95  
    96  """LeafContent represents content items that can't have child-nodes."""
    97  union LeafContent = Article | Video
    98  
    99  type Article implements Content {
   100    """ID is documented in the Content interface."""
   101    id: ID!
   102    name: String!
   103    parent: Topic!
   104    url: String!
   105    text: String!
   106    thumbnail: StuffThumbnail
   107    next: Content
   108    related: [Content!]
   109  }
   110  
   111  type StuffThumbnail {  # for articles, but let's give the name-generator a hard time.
   112    id: ID!
   113    thumbnailUrl: String!
   114  }
   115  
   116  type Video implements Content & HasDuration {
   117    """ID is documented in the Content interface."""
   118    id: ID!
   119    name: String!
   120    parent: Topic!
   121    url: String!
   122    duration: Int!
   123    thumbnail: Thumbnail
   124    next: Content
   125    related: [Content!]
   126  }
   127  
   128  type Thumbnail {  # for videos, but let's give the name-generator a hard time.
   129    id: ID!
   130    timestampSec: Int!
   131  }
   132  
   133  type Topic implements Content {
   134    """ID is documented in the Content interface."""
   135    id: ID!
   136    name: String!
   137    parent: Topic
   138    url: String!
   139    children: [Content!]!
   140    videoChildren: [Video!]!
   141    schoolGrade: String
   142    next: Topic
   143    related: [Topic!]
   144  }
   145  
   146  input RecursiveInput {
   147    rec: [RecursiveInput]
   148  }
   149  
   150  type Recursive {
   151    id: ID!
   152    rec: Recursive
   153  }
   154  
   155  """Query's description is probably ignored by almost all callers."""
   156  type Query {
   157    """user looks up a user by some stuff.
   158  
   159    See UserQueryInput for what stuff is supported.
   160    If query is null, returns the current user.
   161    """
   162    user(query: UserQueryInput): User
   163  
   164    users(query: [UserQueryInput]): [User]
   165  
   166    """usersWithRole looks a user up by role."""
   167    usersWithRole(role: Role!): [User!]!
   168  
   169    usersBornOn(date: Date!): [User!]!
   170  
   171    root: Topic!
   172    randomItem: Content!
   173    randomLeaf: LeafContent!
   174    randomVideo: Video!
   175    convert(dt: DateTime!, tz: String): DateTime!
   176    maybeConvert(dt: DateTime, tz: String): DateTime
   177    getJunk: Junk
   178    getComplexJunk: ComplexJunk
   179    listOfListsOfLists: [[[String!]!]!]!
   180    listOfListsOfListsOfContent: [[[Content!]!]!]!
   181    recur(input: RecursiveInput!): Recursive
   182    acceptsListOfListOfListsOfDates(datesss: [[[Date!]!]!]!): Boolean
   183    getPokemon(where: getPokemonBoolExp): [Pokemon!]!
   184  }
   185  
   186  type Mutation {
   187    createUser(name: String!, email: String): User
   188    # The following query is non-sensical, but tests that argument names don't 
   189    # collide with local var names in generated functions
   190    updateUser(data: String!, req: Int, resp: Int, client: String): User
   191  }
   192  
   193  input getPokemonBoolExp {
   194    _and: [getPokemonBoolExp!]
   195    _not: getPokemonBoolExp
   196    _or: [getPokemonBoolExp!]
   197    level: IntComparisonExp
   198  }
   199  
   200  input IntComparisonExp {
   201    _eq: Int
   202    _gt: Int
   203    _gte: Int
   204    _in: [Int!]
   205    _isNull: Boolean
   206    _lt: Int
   207    _lte: Int
   208    _neq: Int
   209    _nin: [Int!]
   210  }