Created
October 11, 2016 23:51
-
-
Save RyanCCollins/1aae670e2254c8137a84530a5d991e7e to your computer and use it in GitHub Desktop.
GraphQL, Rails, React: https://medium.com/@ryancollinsio/building-a-full-on-graphql-app-b261f6cfea93#.qtjma57sx
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
AuthUserType = GraphQL::ObjectType.define do | |
name 'AuthUser' | |
description 'The authenticated user model type' | |
field :id, types.ID, 'The id of this user' | |
field :name, !types.String, 'The name of the user' | |
field :email, !types.String, 'The email of the user' | |
field :bio, types.String, 'The bio of the user' | |
field :created_at, types.String, 'The datetime string when the user was created' | |
field :events, types[EventType], 'The user events' | |
field :avatar, types.String, 'The user avatar' | |
field :auth_token, types.String, 'The user auth token' | |
end | |
UserType = GraphQL::ObjectType.define do | |
name 'User' | |
description 'The user model type' | |
field :id, types.ID, 'The id of this user' | |
field :name, !types.String, 'The name of the user' | |
field :bio, types.String, 'The bio of the user' | |
field :events, types[EventType], 'The user events' | |
field :avatar, types.String, 'The user avatar' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment