Sha256: 658c27ef759df5b37c018237dbb7dde32260bdb36e918bdbae856bd6fe0211b0

Contents?: true

Size: 593 Bytes

Versions: 1

Compression:

Stored size: 593 Bytes

Contents

require "graphql"
require "graphql-preview/version"
require "graphql-preview/schema_modification"
require "graphql-preview/mask"
require "graphql-preview/extensions/enabled_previews"

module GraphQLPreview

end

module GraphQL
  Schema.class_eval do
    # To support `graphql-ruby`'s `.define` based API
    include GraphQLPreview::Extensions::EnabledPreviews

    accepts_definitions \
      enabled_previews: -> (schema, previews = nil) { schema.enabled_previews(previews) }

    # To support `graphql-ruby`'s class-based API
    extend GraphQLPreview::Extensions::EnabledPreviews
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
graphql-preview-0.0.6 lib/graphql-preview.rb