Sha256: 1cc0170b70ed72ef0a61a57a121bcce3499e529d3bdcafdb8cdbf43ff96efc67

Contents?: true

Size: 494 Bytes

Versions: 29

Compression:

Stored size: 494 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.all_fields
    if !arguments["includeDeprecated"]
      fields = fields.select {|f| !f.deprecation_reason }
    end
    fields.sort_by(&:name)
  }
end

Version data entries

29 entries across 29 versions & 1 rubygems

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