graphql-persisted_queries 1.0.2 → 1.1.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: a54ca19186e396ff8a0148b3fc272ed6980dd62e150ca027620d51c105373cb8
4
- data.tar.gz: 5c49f66f61b87648f08259fb93e3f810a656b24fdc4f6ecbcdeed5e2f2b9db8f
3
+ metadata.gz: a1f6baed9c4dff3350c9f18ae31670f00e03638078ea594bb78bccfecc527958
4
+ data.tar.gz: a5cb83ff41381f884a98449616a3c261b4edae707c474d395336b4ca05e4af12
5
5
  SHA512:
6
- metadata.gz: 36d204d8c8874a85c454a0e74884ac750b538cc993ade9e1d70b038e089934012beb515d9aa8d2fc8a5e4ed90c9a7a4e3dce975fef24919271d7472d2e158b77
7
- data.tar.gz: 15f63fca919296e2bdf7624a4eaefd78a05415f17839d6ef5cd56881ba3b8c05e68f9929ccc93b0b503383226607d8dce34a8b11bb9ed99064eabb088f81c3fd
6
+ metadata.gz: 9210b187e0d597400a88fcc00bda7a484654436c617f8a1a228b6e8985c51a448db6e06be0a70d4f153a7d3223606c7c4afd648aa4c591b2cbe7189a1fe358fd
7
+ data.tar.gz: 9613679d98d1747482822749bcda81595262dae17bfc5b148a758a946f4c3e4b75ff5c8428b895bd81d720eaa7ba48c5e01273dd4fa6045a8717b56ac714afe9
@@ -0,0 +1,52 @@
1
+ name: RSpec
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+ schedule:
9
+ - cron: "0 10 * * *"
10
+
11
+ jobs:
12
+ rspec:
13
+ runs-on: ubuntu-latest
14
+
15
+ env:
16
+ CI: true
17
+
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ ruby: [2.3, 2.4, 2.5, 2.6, 2.7]
22
+ gemfile: [
23
+ "gemfiles/graphql_1_8.gemfile",
24
+ "gemfiles/graphql_1_9.gemfile",
25
+ "gemfiles/graphql_1_10.gemfile",
26
+ "gemfiles/graphql_master.gemfile"
27
+ ]
28
+
29
+ steps:
30
+ - uses: actions/checkout@v2
31
+ - uses: actions/cache@v2
32
+ with:
33
+ path: /home/runner/bundle
34
+ key: bundle-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ hashFiles(matrix.gemfile) }}-${{ hashFiles('**/*.gemspec') }}
35
+ restore-keys: |
36
+ bundle-${{ matrix.ruby }}-${{ matrix.gemfile }}-
37
+ - uses: ruby/setup-ruby@v1
38
+ with:
39
+ ruby-version: ${{ matrix.ruby }}
40
+ - name: Install system deps
41
+ run: |
42
+ sudo apt-get update
43
+ sudo apt-get install libsqlite3-dev
44
+ - name: Bundle install
45
+ run: |
46
+ bundle config path /home/runner/bundle
47
+ bundle config --global gemfile ${{ matrix.gemfile }}
48
+ bundle install
49
+ bundle update
50
+ - name: Run RSpec
51
+ run: |
52
+ bundle exec rake spec
@@ -0,0 +1,21 @@
1
+ name: Rubocop
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ rubocop:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: 2.7
18
+ - name: Lint Ruby code with RuboCop
19
+ run: |
20
+ bundle install --gemfile gemfiles/graphql_1_10.gemfile --jobs 4 --retry 3
21
+ bundle exec --gemfile gemfiles/graphql_1_10.gemfile rubocop
@@ -2,13 +2,17 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.1.0 (2020-11-16)
6
+
7
+ - [PR#36](https://github.com/DmitryTsepelev/graphql-ruby-persisted_queries/pull/36) Support Ruby 2.7.0 ([@DmitryTsepelev][])
8
+
5
9
  ## 1.0.2 (2020-06-29)
6
10
 
7
- - [PR#35](https://github.com/DmitryTsepelev/graphql-ruby-persisted_queries/pull/35) fix args for GraphQL::Query::Result ([@ogidow ][])
11
+ - [PR#35](https://github.com/DmitryTsepelev/graphql-ruby-persisted_queries/pull/35) fix args for GraphQL::Query::Result ([@ogidow][])
8
12
 
9
13
  ## 1.0.1 (2020-06-25)
10
14
 
11
- - [PR#34](https://github.com/DmitryTsepelev/graphql-ruby-persisted_queries/pull/34) Return GraphQL::Query::Result when raise error ([@ogidow ][])
15
+ - [PR#34](https://github.com/DmitryTsepelev/graphql-ruby-persisted_queries/pull/34) Return GraphQL::Query::Result when raise error ([@ogidow][])
12
16
 
13
17
  ## 🥳 1.0.0 (2020-03-31)
14
18
 
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
- # GraphQL::PersistedQueries [![Build Status](https://travis-ci.org/DmitryTsepelev/graphql-ruby-persisted_queries.svg?branch=master)](https://travis-ci.org/DmitryTsepelev/graphql-ruby-persisted_queries)
2
-
1
+ # GraphQL::PersistedQueries
3
2
 
4
3
  `GraphQL::PersistedQueries` is the implementation of [persisted queries](https://github.com/apollographql/apollo-link-persisted-queries) for [graphql-ruby](https://github.com/rmosolgo/graphql-ruby). With this plugin your backend will cache all the queries, while frontend will send the full query only when it's not found at the backend storage.
5
4
 
@@ -35,7 +35,8 @@ module GraphQL
35
35
  query_params[:query] = Resolver.new(extensions, @schema).resolve(query_params[:query])
36
36
  rescue Resolver::NotFound, Resolver::WrongHash => e
37
37
  values = { "errors" => [{ "message" => e.message }] }
38
- results[pos] = GraphQL::Query::Result.new(query: GraphQL::Query.new(@schema, query_params[:query]), values: values)
38
+ query = GraphQL::Query.new(@schema, query_params[:query])
39
+ results[pos] = GraphQL::Query::Result.new(query: query, values: values)
39
40
  end
40
41
 
41
42
  def perform_multiplex
@@ -38,7 +38,7 @@ module GraphQL
38
38
  # rubocop: disable Metrics/PerceivedComplexity
39
39
  def build_redis_proc(redis_client)
40
40
  if redis_client.is_a?(Hash)
41
- build_redis_proc(RedisClientBuilder.new(redis_client).build)
41
+ build_redis_proc(RedisClientBuilder.new(**redis_client).build)
42
42
  elsif redis_client.is_a?(Proc)
43
43
  redis_client
44
44
  elsif defined?(::Redis) && redis_client.is_a?(::Redis)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module PersistedQueries
5
- VERSION = "1.0.2"
5
+ VERSION = "1.1.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: 1.0.2
4
+ version: 1.1.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-06-29 00:00:00.000000000 Z
11
+ date: 2020-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql
@@ -115,9 +115,10 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - ".github/workflows/rspec.yml"
119
+ - ".github/workflows/rubocop.yml"
118
120
  - ".gitignore"
119
121
  - ".rubocop.yml"
120
- - ".travis.yml"
121
122
  - CHANGELOG.md
122
123
  - Gemfile
123
124
  - LICENSE.txt
@@ -1,24 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
-
4
- rvm:
5
- - 2.3
6
- - 2.4
7
- - 2.5
8
- - 2.6
9
- - ruby-head
10
-
11
- gemfile:
12
- - gemfiles/graphql_1_8.gemfile
13
- - gemfiles/graphql_1_9.gemfile
14
- - gemfiles/graphql_1_10.gemfile
15
- - gemfiles/graphql_master.gemfile
16
-
17
-
18
- notifications:
19
- email: false
20
-
21
- matrix:
22
- fast_finish: true
23
- allow_failures:
24
- - rvm: ruby-head