Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Graph
- module Types
- User = GraphQL::ObjectType.define do
- name 'User'
- description 'A User'
- implements GraphQL::Relay::Node.interface
- field :id, !types.ID, property: :uuid
- field :name, types.String
- # ...
- field :errors, types[types.String], "Reasons the object couldn't be created or updated" do
- resolve ->(obj, args, ctx) { obj.errors.full_messages }
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment