Skip to content

Commit

Permalink
Merge pull request #12 from ricardocasares/feat/station-query
Browse files Browse the repository at this point in the history
feat(types): station fields
  • Loading branch information
ricardocasares authored Apr 15, 2019
2 parents 5da4b99 + e0e8a04 commit 0eaec39
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const StationType = new GraphQLObjectType({
name: "Station",
description: "Station object",
fields: () => ({
id: {
type: GraphQLString
},
url: {
type: GraphQLString
},
Expand All @@ -26,6 +29,10 @@ const StationType = new GraphQLObjectType({
type: GraphQLString,
resolve: ({ country }) => country || null
},
state: {
type: GraphQLString,
resolve: ({ state }) => state || null
},
votes: {
type: GraphQLInt,
resolve: ({ votes = 0 }) => Number(votes)
Expand Down

1 comment on commit 0eaec39

@vercel
Copy link

@vercel vercel bot commented on 0eaec39 Apr 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.