Sha256: f2147f01235b7971f84128c4367df711483ff9180996a45cc66d288875bb4077

Contents?: true

Size: 324 Bytes

Versions: 29

Compression:

Stored size: 324 Bytes

Contents

GraphQL::Introspection::PossibleTypesField = GraphQL::Field.define do
  description "Types which compose this Union or Interface"
  type -> { types[!GraphQL::Introspection::TypeType] }
  resolve -> (target, args, ctx) {
    if target.kind.resolves?
      ctx.schema.possible_types(target)
    else
      nil
    end
  }
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
graphql-0.18.15 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.14 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.13 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.12 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.11 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.10 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.9 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.8 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.7 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.6 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.5 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.4 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.3 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.2 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.1 lib/graphql/introspection/possible_types_field.rb
graphql-0.18.0 lib/graphql/introspection/possible_types_field.rb
graphql-0.17.2 lib/graphql/introspection/possible_types_field.rb
graphql-0.17.1 lib/graphql/introspection/possible_types_field.rb
graphql-0.17.0 lib/graphql/introspection/possible_types_field.rb
graphql-0.16.1 lib/graphql/introspection/possible_types_field.rb