GraphQL Custom Types

From Logic Wiki
Revision as of 12:11, 7 January 2019 by AliIybar (Talk | contribs) (AliIybar moved page GraphQL Cutom Types to GraphQL Custom Types without leaving a redirect)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


 const typeDefs = `
   type Query { 
      title: String!
      me: User!
      ...
    }

   type User{
     id:ID!
     name: String!
     ...
   }
  `
 const resolvers = {
  Query: {
    title() {
      return 'The War of Art'
    },
    me() {
      return {
        id:'1234',
        name:'Ali'
    } 
  }
}