graphql-persisted_queries 0.5.1 → 1.0.0

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: 248a30a043f26aabeb1f2fb61599b7dc7479a2a90cc1890c4fd7125fb61426e4
4
- data.tar.gz: 6fbb89bf490bcf11c6681cb624d9153bf7c2be2eeb5bdd486407c288056ab494
3
+ metadata.gz: bdeb7575727fd45b0b40fb17699bc02f700ad20f2475cfa8bb072691f4655d12
4
+ data.tar.gz: 60764c58124de88e7009d9c178dbd418272ffa6b5e965590e90638bf703e6f29
5
5
  SHA512:
6
- metadata.gz: aea67f0744376a70950feea5a331cefd279679c0bc2ed5786f2d2c3fe1a13a31ea87348213b41a0a6d94e7daf32c02cc08364869bb2a088fa0ec2a451f4be793
7
- data.tar.gz: 458ff6a451faac1fff4e1ce51ad42f9b51bc975270e1666d1730549a726f145acd20ce35ed9d630d62d3ea1c9899e8809c8f755af3d3d53e44af3fe6b30a69d2
6
+ metadata.gz: c2d560698a4305ffab013db083faa2665a40bc68d698d2a634435c37efb650564369eabdde5019c1d73f63846318767e6e1012bb399ac16da9e7d492269bbc00
7
+ data.tar.gz: 6f708c05436af2c79df4329b7b12ee75a787bfbc71663834f8ab32ea5be678ed9d38a0942485c88e3e5bf890a749e87db6d3a0195b3e0e730f0dd8c04059d813
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 🥳 1.0.0 (2020-03-31)
6
+
7
+ - [PR#30](https://github.com/DmitryTsepelev/graphql-ruby-persisted_queries/pull/30) **BREAKING CHANGE** Move extenstions to the query context ([@DmitryTsepelev][])
8
+
5
9
  ## 0.5.1 (2020-03-18)
6
10
 
7
11
  - [PR#33](https://github.com/DmitryTsepelev/graphql-ruby-persisted_queries/pull/33) Support AST analyzers ([@DmitryTsepelev][])
data/README.md CHANGED
@@ -51,15 +51,16 @@ class GraphqlSchema < GraphQL::Schema
51
51
  end
52
52
  ```
53
53
 
54
- Pass `:extensions` argument to all calls of `GraphqlSchema#execute`, usually it happens in `GraphqlController`, `GraphqlChannel` and tests.
54
+ Pass `:extensions` argument as part of a `context` to all calls of `GraphqlSchema#execute`, usually it happens in `GraphqlController`, `GraphqlChannel` and tests:
55
55
 
56
56
  ```ruby
57
57
  GraphqlSchema.execute(
58
58
  params[:query],
59
59
  variables: ensure_hash(params[:variables]),
60
- context: {},
61
- operation_name: params[:operationName],
62
- extensions: ensure_hash(params[:extensions])
60
+ context: {
61
+ extensions: ensure_hash(params[:extensions])
62
+ },
63
+ operation_name: params[:operationName]
63
64
  )
64
65
  ```
65
66
 
data/docs/http_cache.md CHANGED
@@ -28,7 +28,14 @@ get "/graphql", to: "graphql#execute"
28
28
  Put the request object to the GraphQL context everywhere you execute GraphQL queries:
29
29
 
30
30
  ```ruby
31
- GraphqlSchema.execute(query, variables: variables, context: { request: request })
31
+ GraphqlSchema.execute(
32
+ query,
33
+ variables: ensure_hash(params[:variables]),
34
+ context: {
35
+ extensions: ensure_hash(params[:extensions])
36
+ request: request
37
+ }
38
+ )
32
39
  ```
33
40
 
34
41
  Turn the `verify_http_method` option when configuring the plugin to enforce using `POST` requests for performing mutations (otherwise the error `Mutations cannot be performed via HTTP GET` will be returned):
@@ -29,7 +29,7 @@ module GraphQL
29
29
  end
30
30
 
31
31
  def resolve_persisted_query(query_params, pos)
32
- extensions = query_params.delete(:extensions)
32
+ extensions = query_params.dig(:context, :extensions)
33
33
  return unless extensions
34
34
 
35
35
  query_params[:query] = Resolver.new(extensions, @schema).resolve(query_params[:query])
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module PersistedQueries
5
- VERSION = "0.5.1"
5
+ VERSION = "1.0.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-persisted_queries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DmitryTsepelev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-18 00:00:00.000000000 Z
11
+ date: 2020-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql