SHARE
TWEET

Untitled

a guest May 31st, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import {
  2.     GraphQLObjectType,
  3.     GraphQLNonNull,
  4.     GraphQLID,
  5.     GraphQLString,
  6. } from 'graphql'
  7.  
  8. const User = new GraphQLObjectType({
  9.     name: 'User',
  10.     description: '...',
  11.     fields: () => ({
  12.         userId: {
  13.             type: new GraphQLNonNull(GraphQLID),
  14.             description: '...'
  15.         },
  16.         firstName: {
  17.             type: new GraphQLNonNull(GraphQLString),
  18.             description: 'Users firstname'
  19.         },
  20.         lastName: {
  21.             type: new GraphQLNonNull(GraphQLString),
  22.             description: 'Users lastname'
  23.         },
  24.         email: {
  25.             type: new GraphQLNonNull(GraphQlString),
  26.             description: 'Users email'
  27.         },
  28.         position: {
  29.             type: new GraphQLNonNull(GraphQlString),
  30.             description: 'Positon of the user in the company'
  31.         },
  32.         password: {
  33.             type: new GraphQLNonNull(GraphQLString),
  34.             description: 'Login password for the user'
  35.         },
  36.         company: {
  37.             type: new GraphQLNonNull(GraphQlString),
  38.             description: 'Company the user belongs to'
  39.         }
  40.     })
  41. })
  42.  
  43. export default User
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top