Created
December 26, 2017 15:58
-
-
Save thiago-sydow/51a4e7f8fcb1d0d0fe004211179685e2 to your computer and use it in GitHub Desktop.
Files used in the Medium post about Field Instrumentation
This file contains 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
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