Skip to content

Instantly share code, notes, and snippets.

@thiago-sydow
Created December 26, 2017 15:58
Show Gist options
  • Save thiago-sydow/51a4e7f8fcb1d0d0fe004211179685e2 to your computer and use it in GitHub Desktop.
Save thiago-sydow/51a4e7f8fcb1d0d0fe004211179685e2 to your computer and use it in GitHub Desktop.
Files used in the Medium post about Field Instrumentation
OrganizationType = GraphQL::ObjectType.define do
name "Organization"
field :members, types.[UserType], "Members of the organization" do
scoped_collection(policy_class: UsersPolicy)
resolve ->(obj, args, ctx) {
obj.members_dataset
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment