graphql 1.7.12 → 1.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a882dfe82e8c55c450f99d2db8747c05712c379421e0785419631f6f8165b354
4
- data.tar.gz: ff0b29cd2b90a16d5d0e306f213be53c5fcb040f3cda72c7828a990905bae18f
3
+ metadata.gz: 48328205063447093cf672bfb523fbd04daff07d79070f2f0848c05550198de2
4
+ data.tar.gz: d56689df8a571faa92ab90a434afe18561fc2b1b1713800bfb5b883e338703d9
5
5
  SHA512:
6
- metadata.gz: d4cdc5e2ebf997844186e7dcabaecaf37b3045fb713448f9e89500505adf65daa1e058fd8f75bd4056184b0997a4486bfe2bacaa3911f464c56ceffa2c0dd794
7
- data.tar.gz: 05cd603720c1b2b03ca833459f26596110014fa62808aed20f004137bf33c11758855b6907ee847e88ca36f635f8a392a7b0b77da0f3273c400e1e5661fd5412
6
+ metadata.gz: 1ce5c01f9aa6b1a5dab90b1bd94b0235042cd594ba7e07dea9773b8918fbdd9f4c57289990f7f773e6bd3f46c03086947101db0fb8fdb9bad904b1516855d33e
7
+ data.tar.gz: b9924f719422270083d1a8275f4b9435f4c206d77d18bb933fd6f82f401d3c32f5a358f080a9a44838d564d4e6192cd14673cd4dd64fba94e57066615d3e055c
@@ -554,7 +554,7 @@ module GraphQL
554
554
  # @param except [<#call(member, ctx)>]
555
555
  # @return [Hash] GraphQL result
556
556
  def as_json(only: nil, except: nil, context: {})
557
- execute(Introspection::INTROSPECTION_QUERY, only: only, except: except, context: context)
557
+ execute(Introspection::INTROSPECTION_QUERY, only: only, except: except, context: context).to_h
558
558
  end
559
559
 
560
560
  # Returns the JSON response of {Introspection::INTROSPECTION_QUERY}.
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "1.7.12"
3
+ VERSION = "1.7.13"
4
4
  end
@@ -34,7 +34,9 @@ describe GraphQL::RakeTask do
34
34
  end
35
35
  dumped_json = File.read("./schema.json")
36
36
  expected_json = JSON.pretty_generate(RakeTaskSchema.execute(GraphQL::Introspection::INTROSPECTION_QUERY))
37
- assert_equal(expected_json, dumped_json)
37
+
38
+ # Test that that JSON is logically equivalent, not serialized the same
39
+ assert_equal(JSON.parse(expected_json), JSON.parse(dumped_json))
38
40
 
39
41
  dumped_idl = File.read("./schema.graphql")
40
42
  expected_idl = rake_task_schema_defn.chomp
@@ -425,6 +425,13 @@ type Query {
425
425
  end
426
426
  end
427
427
 
428
+ describe "#as_json" do
429
+ it "returns a hash" do
430
+ result = schema.execute(GraphQL::Introspection::INTROSPECTION_QUERY)
431
+ assert_equal result.as_json.class, Hash
432
+ end
433
+ end
434
+
428
435
  describe "#get_field" do
429
436
  it "returns fields by type or type name" do
430
437
  field = schema.get_field("Cheese", "id")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.12
4
+ version: 1.7.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-13 00:00:00.000000000 Z
11
+ date: 2018-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ips