schema.js 562 B

1234567891011121314151617181920212223
  1. module.exports = `
  2. type Query {
  3. getWorldById(id:Int!): World,
  4. singleDatabaseQuery: World,
  5. multipleDatabaseQueries(total:Int!): [World],
  6. getAllWorlds: [World],
  7. helloWorld: String,
  8. getAllFortunes: [Fortune],
  9. getRandomAndUpdate(total:Int!): [World]
  10. }
  11. type Mutation {
  12. createWorld: World!,
  13. updateWorld(id:Int! randomNumber:String!): World!
  14. }
  15. type World {
  16. id: Int!,
  17. randomNumber: Int!
  18. }
  19. type Fortune {
  20. id: Int!
  21. message: String!
  22. }
  23. `;