graphql-sources 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eccc9a6d7c7539247982a6a9dad900a481d7e364f54cca4491cd4d6e470d2b72
4
- data.tar.gz: 2c9dfe54e836d8324c0218673b853260e6f5e62a3644215068e640c74b16d291
3
+ metadata.gz: 4e7c380fca740b89a1c8797745da617dd1d0b5eae2de11ca99cb2101b0b666e3
4
+ data.tar.gz: ed39e7db2d5c1ae8cd4a3e723a8277e032f2994bc8c5616f765f8ab04da22034
5
5
  SHA512:
6
- metadata.gz: 642038b97140aadd3c027da4c94c2a40969f370d9be77d1297f927e89bf0d019242724f46d17afbd21e944ed8dd95d516a5d9c29d6e04c03142ccfa8226310e7
7
- data.tar.gz: c80233bea7956c4b704c0c2e393897f3fd6fdb1866142591a5ba39b38657120c38eaf27d0a5b88811868fbb2fbbc4b6ae8b5bcf3399a113a0a5b9aa816e302bf
6
+ metadata.gz: 52d2c0a9b72c0a7cd283ac60854b6827f187bf2e581ff67b1c0ae4f5cf4695721bbd8d704f84f5e773ddcfc1f63a4cb9d68b27356c1e322e4b46e7c18d3dba57
7
+ data.tar.gz: 6e4c3cdcd606af9d5bf43c99759459a80fe9812d7e16fb21340a66097fea9b7effc8b575111287ef6dac6ce3039e7199dceb84c34eef0818508337e80c79f8f9
data/Gemfile CHANGED
@@ -3,5 +3,3 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
-
7
- gem 'debug'
data/README.md CHANGED
@@ -21,6 +21,32 @@ end
21
21
 
22
22
  ## Usage
23
23
 
24
+ ### Loading `belongs_to` Associations
25
+
26
+ ```ruby
27
+ class Purchase < ActiveRecord::Base
28
+ belongs_to :visitor
29
+ end
30
+ ```
31
+
32
+ ```ruby
33
+ class Customer < ActiveRecord::Base
34
+ has_many :purchases
35
+ end
36
+ ```
37
+
38
+ ```ruby
39
+ class PurchaseType < GraphQL::Schema::Object
40
+ field :customer, [CustomerTYpe], null: false
41
+
42
+ def customer
43
+ dataloader
44
+ .with(GraphQL::Sources::ActiveRecordObject, ::Profile, key: :id)
45
+ .load(object.customer_id)
46
+ end
47
+ end
48
+ ```
49
+
24
50
  ### Loading `has_one` Associations
25
51
 
26
52
  ```ruby
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module Sources
5
- VERSION = '1.1.1'
5
+ VERSION = '1.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-sources
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-14 00:00:00.000000000 Z
11
+ date: 2023-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop-factory_bot
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: rubocop-rails
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -220,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
234
  - !ruby/object:Gem::Version
221
235
  version: '0'
222
236
  requirements: []
223
- rubygems_version: 3.3.7
237
+ rubygems_version: 3.4.10
224
238
  signing_key:
225
239
  specification_version: 4
226
240
  summary: A set of common GraphQL DataLoader sources.