Sha256: 8bd6e922d1ea106f97b6c1a5ae788f1c7fbee53efa55128ae23dde3b2cc9ca5b
Contents?: true
Size: 492 Bytes
Versions: 1
Compression:
Stored size: 492 Bytes
Contents
GraphQL::FieldsField = GraphQL::Field.new do |f| f.description "List of fields on this object" f.type -> { GraphQL::ListType.new(of_type: GraphQL::NonNullType.new(of_type: GraphQL::FieldType)) } f.arguments({ includeDeprecated: {type: GraphQL::BOOLEAN_TYPE, default_value: false} }) f.resolve -> (object, arguments, context) { fields = object.fields.values if !arguments["includeDeprecated"] fields = fields.select {|f| !f.deprecated? } end fields } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
graphql-0.1.0 | lib/graph_ql/introspection/fields_field.rb |