Skip to content

Instantly share code, notes, and snippets.

@thiago-sydow
Last active December 26, 2017 15:40
Show Gist options
  • Save thiago-sydow/b92311d4e63e746daa3531c149455145 to your computer and use it in GitHub Desktop.
Save thiago-sydow/b92311d4e63e746daa3531c149455145 to your computer and use it in GitHub Desktop.
Files used in the Medium post about Field Instrumentation
GraphQL::Field.accepts_definitions(
access_permission: GraphQL::Define.assign_metadata_key(:access_permission)
)
Schema = GraphQL::Schema.define do
...
instrument(:field, FieldAuthorization.new)
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment