Created
September 13, 2019 19:03
-
-
Save renanmav/3ed7d66887c14f4645c57155c4341d13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { GraphQLInterfaceType, GraphQLString, GraphQLInt } from 'graphql' | |
import UserType from '../modules/user/UserType' | |
const PostType = new GraphQLInterfaceType({ | |
name: 'Post', | |
description: 'Post interface to enforce some fields', | |
fields: () => ({ | |
content: { type: GraphQLString }, | |
upvotes: { type: GraphQLInt }, | |
downvotes: { type: GraphQLInt }, | |
author: { type: UserType }, | |
createdAt: { type: GraphQLString }, | |
updatedAt: { type: GraphQLString } | |
}) | |
}) | |
export default PostType |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment