UserType.js (573B)
1 /** 2 * React Starter Kit (https://www.reactstarterkit.com/) 3 * 4 * Copyright © 2014-present Kriasoft, LLC. All rights reserved. 5 * 6 * This source code is licensed under the MIT license found in the 7 * LICENSE.txt file in the root directory of this source tree. 8 */ 9 10 import { 11 GraphQLObjectType as ObjectType, 12 GraphQLID as ID, 13 GraphQLString as StringType, 14 GraphQLNonNull as NonNull, 15 } from 'graphql'; 16 17 const UserType = new ObjectType({ 18 name: 'User', 19 fields: { 20 id: { type: new NonNull(ID) }, 21 email: { type: StringType }, 22 }, 23 }); 24 25 export default UserType;