Sha256: 4ac8d36ee9ab035d8b06c813b6802986a40e4d88897ef682899c44cc3880cdaf

Contents?: true

Size: 481 Bytes

Versions: 23

Compression:

Stored size: 481 Bytes

Contents

GraphQL::Introspection::FieldsField = GraphQL::Field.define do
  description "List of fields on this object"
  type -> { types[!GraphQL::Introspection::FieldType] }
  argument :includeDeprecated, GraphQL::BOOLEAN_TYPE, default_value: false
  resolve -> (object, arguments, context) {
    return nil if !object.kind.fields?
    fields = object.fields.values
    if !arguments["includeDeprecated"]
      fields = fields.select {|f| !f.deprecation_reason }
    end
    fields
  }
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
graphql-0.11.0 lib/graphql/introspection/fields_field.rb
graphql-0.10.9 lib/graphql/introspection/fields_field.rb
graphql-0.10.8 lib/graphql/introspection/fields_field.rb
graphql-0.10.7 lib/graphql/introspection/fields_field.rb
graphql-0.10.6 lib/graphql/introspection/fields_field.rb
graphql-0.10.5 lib/graphql/introspection/fields_field.rb
graphql-0.10.4 lib/graphql/introspection/fields_field.rb
graphql-0.10.3 lib/graphql/introspection/fields_field.rb
graphql-0.10.2 lib/graphql/introspection/fields_field.rb
graphql-0.10.1 lib/graphql/introspection/fields_field.rb
graphql-0.10.0 lib/graphql/introspection/fields_field.rb
graphql-0.9.5 lib/graphql/introspection/fields_field.rb
graphql-0.9.4 lib/graphql/introspection/fields_field.rb
graphql-0.9.3 lib/graphql/introspection/fields_field.rb
graphql-0.9.2 lib/graphql/introspection/fields_field.rb
graphql-0.8.1 lib/graphql/introspection/fields_field.rb
graphql-0.8.0 lib/graphql/introspection/fields_field.rb
graphql-0.7.1 lib/graphql/introspection/fields_field.rb
graphql-0.7.0 lib/graphql/introspection/fields_field.rb
graphql-0.6.2 lib/graphql/introspection/fields_field.rb