Skip to content

Instantly share code, notes, and snippets.

@tiagopog
Created March 4, 2019 14:24
Show Gist options
  • Select an option

  • Save tiagopog/3084b34e4af4802f690ca7d0b503ffad to your computer and use it in GitHub Desktop.

Select an option

Save tiagopog/3084b34e4af4802f690ca7d0b503ffad to your computer and use it in GitHub Desktop.

Revisions

  1. tiagopog created this gist Mar 4, 2019.
    22 changes: 22 additions & 0 deletions sample_api
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    type Query {
    allPersons(last: Int): [Person!]!
    }

    type Mutation {
    createPerson(name: String!, age: Int!): Person!
    }

    type Subscription {
    newPerson: Person!
    }

    type Person {
    name: String!
    age: Int!
    posts: [Post!]!
    }

    type Post {
    title: String!
    author: Person!
    }