query root for this schema" field :user do type UserType argument :email, types.String argument :id, types.ID resolve -> (obj, args, ctx) do if args['id'] User.find(args['id']) else User.find_by(email: args['email']) end end end end
"The query root for this schema" field :user do type UserType argument :email, types.String argument :id, types.ID resolve -> (obj, args, ctx) do if args['id'] User.find(args['id']) else User.find_by(email: args['email']) end end end end
"The query root for this schema" field :user do type UserType argument :email, types.String argument :id, types.ID resolve -> (obj, args, ctx) do if args['id'] User.find(args['id']) else User.find_by(email: args['email']) end end end end
"The query root for this schema" field :user do type UserType argument :email, types.String argument :id, types.ID resolve -> (obj, args, ctx) do if args['id'] User.find(args['id']) else User.find_by(email: args['email']) end end end end
"The query root for this schema" field :user do type UserType argument :email, types.String argument :id, types.ID resolve -> (obj, args, ctx) do if args['id'] User.find(args['id']) else User.find_by(email: args['email']) end end end end
"The query root for this schema" field :user do type UserType argument :email, types.String argument :id, types.ID resolve -> (obj, args, ctx) do if args['id'] User.find(args['id']) elsif args[‘email’] User.find_by(email: args['email']) end end end end
'A user' field :id, !types.ID field :name, types.String, property: :name field :email, types.String, property: :email field :picture, types.Picture, property: :picture end resolve -> (o, a, c) { o.public_send(property) }