NewsItemType.js (706B)
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 GraphQLString as StringType, 13 GraphQLNonNull as NonNull, 14 } from 'graphql'; 15 16 const NewsItemType = new ObjectType({ 17 name: 'NewsItem', 18 fields: { 19 title: { type: new NonNull(StringType) }, 20 link: { type: new NonNull(StringType) }, 21 author: { type: StringType }, 22 pubDate: { type: new NonNull(StringType) }, 23 content: { type: StringType }, 24 }, 25 }); 26 27 export default NewsItemType;