Skip to content

Instantly share code, notes, and snippets.

@valikos
Created May 7, 2019 20:49
Show Gist options
  • Save valikos/b18ad162198ad981bf245e50be6c02dc to your computer and use it in GitHub Desktop.
Save valikos/b18ad162198ad981bf245e50be6c02dc to your computer and use it in GitHub Desktop.
class Directives::Camelize < GraphQL::Schema::Directive
description "..."
locations(
GraphQL::Schema::Directive::FIELD,
GraphQL::Schema::Directive::FRAGMENT_SPREAD,
GraphQL::Schema::Directive::INLINE_FRAGMENT
)
argument :if, Boolean, required: true, description: "..."
def self.include?(obj, args, ctx)
# implementation
end
def self.resolve(obj, args, ctx)
# implementation
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment