graphlient 0.8.0 → 0.9.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 +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +38 -38
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -20
- data/.github/workflows/ci.yml +33 -30
- data/.github/workflows/danger-comment.yml +10 -0
- data/.github/workflows/danger.yml +13 -22
- data/.github/workflows/rubocop.yml +19 -19
- data/.gitignore +59 -52
- data/.rspec +1 -1
- data/.rubocop.yml +26 -28
- data/.rubocop_todo.yml +72 -48
- data/CHANGELOG.md +128 -113
- data/CONTRIBUTING.md +125 -125
- data/Dangerfile +24 -24
- data/Gemfile +35 -27
- data/LICENSE +21 -21
- data/README.md +800 -533
- data/RELEASING.md +63 -63
- data/Rakefile +15 -15
- data/UPGRADING.md +23 -23
- data/graphlient.gemspec +19 -19
- data/lib/graphlient/adapters/http/adapter.rb +41 -41
- data/lib/graphlient/adapters/http/faraday_adapter.rb +79 -79
- data/lib/graphlient/adapters/http/http_adapter.rb +40 -39
- data/lib/graphlient/adapters/http.rb +3 -3
- data/lib/graphlient/adapters.rb +1 -1
- data/lib/graphlient/client.rb +98 -80
- data/lib/graphlient/errors/client_error.rb +6 -6
- data/lib/graphlient/errors/connection_failed_error.rb +6 -6
- data/lib/graphlient/errors/error.rb +13 -12
- data/lib/graphlient/errors/execution_error.rb +29 -29
- data/lib/graphlient/errors/faraday_server_error.rb +12 -12
- data/lib/graphlient/errors/graphql_error.rb +53 -52
- data/lib/graphlient/errors/http_options_error.rb +6 -6
- data/lib/graphlient/errors/http_server_error.rb +13 -13
- data/lib/graphlient/errors/server_error.rb +7 -7
- data/lib/graphlient/errors/timeout_error.rb +6 -6
- data/lib/graphlient/errors.rb +10 -10
- data/lib/graphlient/extensions/query.rb +15 -15
- data/lib/graphlient/extensions.rb +1 -1
- data/lib/graphlient/query/directive.rb +47 -0
- data/lib/graphlient/query/serializer/arguments.rb +67 -0
- data/lib/graphlient/query/serializer/directives.rb +17 -0
- data/lib/graphlient/query/serializer/evaluator.rb +15 -0
- data/lib/graphlient/query/serializer/fragments.rb +28 -0
- data/lib/graphlient/query/serializer/scalars.rb +63 -0
- data/lib/graphlient/query/serializer.rb +153 -0
- data/lib/graphlient/query.rb +29 -128
- data/lib/graphlient/schema.rb +27 -26
- data/lib/graphlient/version.rb +3 -3
- data/lib/graphlient.rb +8 -8
- data/spec/graphlient/adapters/http/faraday_adapter_spec.rb +172 -167
- data/spec/graphlient/adapters/http/http_adapter_spec.rb +60 -60
- data/spec/graphlient/client_dsl_spec.rb +153 -0
- data/spec/graphlient/client_query_spec.rb +369 -346
- data/spec/graphlient/client_schema_spec.rb +75 -75
- data/spec/graphlient/extensions/query_spec.rb +16 -16
- data/spec/graphlient/github_query_spec.rb +32 -32
- data/spec/graphlient/query_dsl_spec.rb +231 -0
- data/spec/graphlient/query_spec.rb +105 -105
- data/spec/graphlient/schema_spec.rb +56 -56
- data/spec/graphlient/static_client_query_spec.rb +75 -68
- data/spec/graphlient/webmock_client_query_spec.rb +41 -41
- data/spec/spec_helper.rb +26 -14
- data/spec/support/context/dummy_client.rb +33 -26
- data/spec/support/context/github_client.rb +18 -18
- data/spec/support/dummy_app.rb +21 -19
- data/spec/support/dummy_schema.rb +17 -17
- data/spec/support/fixtures/github/schema.yml +14282 -14282
- data/spec/support/fixtures/github/user.yml +76 -76
- data/spec/support/fixtures/github/viewer.yml +76 -76
- data/spec/support/fixtures/invoice_api.json +1288 -1288
- data/spec/support/mutations/create_invoice.rb +18 -18
- data/spec/support/queries/query.rb +48 -47
- data/spec/support/schema/github.json +44479 -44479
- data/spec/support/types/invoice_type.rb +13 -13
- data/spec/support/types/mutation_type.rb +5 -5
- data/spec/support/vcr.rb +9 -9
- metadata +13 -8
- data/Gemfile.danger +0 -5
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
---
|
|
2
|
-
http_interactions:
|
|
3
|
-
- request:
|
|
4
|
-
method: post
|
|
5
|
-
uri: https://api.github.com/graphql
|
|
6
|
-
body:
|
|
7
|
-
encoding: UTF-8
|
|
8
|
-
string: '{"query":"query GraphQL__Client__OperationDefinition_70134032199420($login:
|
|
9
|
-
String!) {\n user(login: $login) {\n name\n }\n}","operationName":"GraphQL__Client__OperationDefinition_70134032199420","variables":{"login":"orta"}}'
|
|
10
|
-
headers:
|
|
11
|
-
Authorization:
|
|
12
|
-
- Bearer token
|
|
13
|
-
Content-Type:
|
|
14
|
-
- application/json
|
|
15
|
-
User-Agent:
|
|
16
|
-
- Faraday v0.15.2
|
|
17
|
-
Accept-Encoding:
|
|
18
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
19
|
-
Accept:
|
|
20
|
-
- "*/*"
|
|
21
|
-
response:
|
|
22
|
-
status:
|
|
23
|
-
code: 200
|
|
24
|
-
message: OK
|
|
25
|
-
headers:
|
|
26
|
-
Server:
|
|
27
|
-
- GitHub.com
|
|
28
|
-
Date:
|
|
29
|
-
- Tue, 14 Aug 2018 21:56:12 GMT
|
|
30
|
-
Content-Type:
|
|
31
|
-
- application/json; charset=utf-8
|
|
32
|
-
Transfer-Encoding:
|
|
33
|
-
- chunked
|
|
34
|
-
Status:
|
|
35
|
-
- 200 OK
|
|
36
|
-
X-Ratelimit-Limit:
|
|
37
|
-
- '5000'
|
|
38
|
-
X-Ratelimit-Remaining:
|
|
39
|
-
- '4996'
|
|
40
|
-
X-Ratelimit-Reset:
|
|
41
|
-
- '1534286196'
|
|
42
|
-
Cache-Control:
|
|
43
|
-
- no-cache
|
|
44
|
-
X-Oauth-Scopes:
|
|
45
|
-
- public_repo
|
|
46
|
-
X-Accepted-Oauth-Scopes:
|
|
47
|
-
- repo
|
|
48
|
-
X-Github-Media-Type:
|
|
49
|
-
- github.v4; format=json
|
|
50
|
-
Access-Control-Expose-Headers:
|
|
51
|
-
- ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
|
|
52
|
-
X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
|
53
|
-
Access-Control-Allow-Origin:
|
|
54
|
-
- "*"
|
|
55
|
-
Strict-Transport-Security:
|
|
56
|
-
- max-age=31536000; includeSubdomains; preload
|
|
57
|
-
X-Frame-Options:
|
|
58
|
-
- deny
|
|
59
|
-
X-Content-Type-Options:
|
|
60
|
-
- nosniff
|
|
61
|
-
X-Xss-Protection:
|
|
62
|
-
- 1; mode=block
|
|
63
|
-
Referrer-Policy:
|
|
64
|
-
- origin-when-cross-origin, strict-origin-when-cross-origin
|
|
65
|
-
Content-Security-Policy:
|
|
66
|
-
- default-src 'none'
|
|
67
|
-
X-Runtime-Rack:
|
|
68
|
-
- '0.048718'
|
|
69
|
-
X-Github-Request-Id:
|
|
70
|
-
- D9E8:0EC8:9EF657:126FDB5:5B734FFC
|
|
71
|
-
body:
|
|
72
|
-
encoding: ASCII-8BIT
|
|
73
|
-
string: '{"data":{"user":{"name":"Orta"}}}'
|
|
74
|
-
http_version:
|
|
75
|
-
recorded_at: Tue, 14 Aug 2018 21:56:12 GMT
|
|
76
|
-
recorded_with: VCR 4.0.0
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.github.com/graphql
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string: '{"query":"query GraphQL__Client__OperationDefinition_70134032199420($login:
|
|
9
|
+
String!) {\n user(login: $login) {\n name\n }\n}","operationName":"GraphQL__Client__OperationDefinition_70134032199420","variables":{"login":"orta"}}'
|
|
10
|
+
headers:
|
|
11
|
+
Authorization:
|
|
12
|
+
- Bearer token
|
|
13
|
+
Content-Type:
|
|
14
|
+
- application/json
|
|
15
|
+
User-Agent:
|
|
16
|
+
- Faraday v0.15.2
|
|
17
|
+
Accept-Encoding:
|
|
18
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
19
|
+
Accept:
|
|
20
|
+
- "*/*"
|
|
21
|
+
response:
|
|
22
|
+
status:
|
|
23
|
+
code: 200
|
|
24
|
+
message: OK
|
|
25
|
+
headers:
|
|
26
|
+
Server:
|
|
27
|
+
- GitHub.com
|
|
28
|
+
Date:
|
|
29
|
+
- Tue, 14 Aug 2018 21:56:12 GMT
|
|
30
|
+
Content-Type:
|
|
31
|
+
- application/json; charset=utf-8
|
|
32
|
+
Transfer-Encoding:
|
|
33
|
+
- chunked
|
|
34
|
+
Status:
|
|
35
|
+
- 200 OK
|
|
36
|
+
X-Ratelimit-Limit:
|
|
37
|
+
- '5000'
|
|
38
|
+
X-Ratelimit-Remaining:
|
|
39
|
+
- '4996'
|
|
40
|
+
X-Ratelimit-Reset:
|
|
41
|
+
- '1534286196'
|
|
42
|
+
Cache-Control:
|
|
43
|
+
- no-cache
|
|
44
|
+
X-Oauth-Scopes:
|
|
45
|
+
- public_repo
|
|
46
|
+
X-Accepted-Oauth-Scopes:
|
|
47
|
+
- repo
|
|
48
|
+
X-Github-Media-Type:
|
|
49
|
+
- github.v4; format=json
|
|
50
|
+
Access-Control-Expose-Headers:
|
|
51
|
+
- ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
|
|
52
|
+
X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
|
53
|
+
Access-Control-Allow-Origin:
|
|
54
|
+
- "*"
|
|
55
|
+
Strict-Transport-Security:
|
|
56
|
+
- max-age=31536000; includeSubdomains; preload
|
|
57
|
+
X-Frame-Options:
|
|
58
|
+
- deny
|
|
59
|
+
X-Content-Type-Options:
|
|
60
|
+
- nosniff
|
|
61
|
+
X-Xss-Protection:
|
|
62
|
+
- 1; mode=block
|
|
63
|
+
Referrer-Policy:
|
|
64
|
+
- origin-when-cross-origin, strict-origin-when-cross-origin
|
|
65
|
+
Content-Security-Policy:
|
|
66
|
+
- default-src 'none'
|
|
67
|
+
X-Runtime-Rack:
|
|
68
|
+
- '0.048718'
|
|
69
|
+
X-Github-Request-Id:
|
|
70
|
+
- D9E8:0EC8:9EF657:126FDB5:5B734FFC
|
|
71
|
+
body:
|
|
72
|
+
encoding: ASCII-8BIT
|
|
73
|
+
string: '{"data":{"user":{"name":"Orta"}}}'
|
|
74
|
+
http_version:
|
|
75
|
+
recorded_at: Tue, 14 Aug 2018 21:56:12 GMT
|
|
76
|
+
recorded_with: VCR 4.0.0
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
---
|
|
2
|
-
http_interactions:
|
|
3
|
-
- request:
|
|
4
|
-
method: post
|
|
5
|
-
uri: https://api.github.com/graphql
|
|
6
|
-
body:
|
|
7
|
-
encoding: UTF-8
|
|
8
|
-
string: '{"query":"query GraphQL__Client__OperationDefinition_70283598546520
|
|
9
|
-
{\n viewer {\n name\n }\n}","operationName":"GraphQL__Client__OperationDefinition_70283598546520","variables":{}}'
|
|
10
|
-
headers:
|
|
11
|
-
Authorization:
|
|
12
|
-
- Bearer token
|
|
13
|
-
Content-Type:
|
|
14
|
-
- application/json
|
|
15
|
-
User-Agent:
|
|
16
|
-
- Faraday v0.15.2
|
|
17
|
-
Accept-Encoding:
|
|
18
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
19
|
-
Accept:
|
|
20
|
-
- "*/*"
|
|
21
|
-
response:
|
|
22
|
-
status:
|
|
23
|
-
code: 200
|
|
24
|
-
message: OK
|
|
25
|
-
headers:
|
|
26
|
-
Server:
|
|
27
|
-
- GitHub.com
|
|
28
|
-
Date:
|
|
29
|
-
- Tue, 14 Aug 2018 21:53:53 GMT
|
|
30
|
-
Content-Type:
|
|
31
|
-
- application/json; charset=utf-8
|
|
32
|
-
Transfer-Encoding:
|
|
33
|
-
- chunked
|
|
34
|
-
Status:
|
|
35
|
-
- 200 OK
|
|
36
|
-
X-Ratelimit-Limit:
|
|
37
|
-
- '5000'
|
|
38
|
-
X-Ratelimit-Remaining:
|
|
39
|
-
- '4997'
|
|
40
|
-
X-Ratelimit-Reset:
|
|
41
|
-
- '1534286196'
|
|
42
|
-
Cache-Control:
|
|
43
|
-
- no-cache
|
|
44
|
-
X-Oauth-Scopes:
|
|
45
|
-
- public_repo
|
|
46
|
-
X-Accepted-Oauth-Scopes:
|
|
47
|
-
- repo
|
|
48
|
-
X-Github-Media-Type:
|
|
49
|
-
- github.v4; format=json
|
|
50
|
-
Access-Control-Expose-Headers:
|
|
51
|
-
- ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
|
|
52
|
-
X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
|
53
|
-
Access-Control-Allow-Origin:
|
|
54
|
-
- "*"
|
|
55
|
-
Strict-Transport-Security:
|
|
56
|
-
- max-age=31536000; includeSubdomains; preload
|
|
57
|
-
X-Frame-Options:
|
|
58
|
-
- deny
|
|
59
|
-
X-Content-Type-Options:
|
|
60
|
-
- nosniff
|
|
61
|
-
X-Xss-Protection:
|
|
62
|
-
- 1; mode=block
|
|
63
|
-
Referrer-Policy:
|
|
64
|
-
- origin-when-cross-origin, strict-origin-when-cross-origin
|
|
65
|
-
Content-Security-Policy:
|
|
66
|
-
- default-src 'none'
|
|
67
|
-
X-Runtime-Rack:
|
|
68
|
-
- '0.031129'
|
|
69
|
-
X-Github-Request-Id:
|
|
70
|
-
- D9E5:0EC6:4C812D:A61781:5B734F71
|
|
71
|
-
body:
|
|
72
|
-
encoding: ASCII-8BIT
|
|
73
|
-
string: '{"data":{"viewer":{"name":"Daniel Doubrovkine (dB.) @dblockdotorg"}}}'
|
|
74
|
-
http_version:
|
|
75
|
-
recorded_at: Tue, 14 Aug 2018 21:53:53 GMT
|
|
76
|
-
recorded_with: VCR 4.0.0
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.github.com/graphql
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string: '{"query":"query GraphQL__Client__OperationDefinition_70283598546520
|
|
9
|
+
{\n viewer {\n name\n }\n}","operationName":"GraphQL__Client__OperationDefinition_70283598546520","variables":{}}'
|
|
10
|
+
headers:
|
|
11
|
+
Authorization:
|
|
12
|
+
- Bearer token
|
|
13
|
+
Content-Type:
|
|
14
|
+
- application/json
|
|
15
|
+
User-Agent:
|
|
16
|
+
- Faraday v0.15.2
|
|
17
|
+
Accept-Encoding:
|
|
18
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
19
|
+
Accept:
|
|
20
|
+
- "*/*"
|
|
21
|
+
response:
|
|
22
|
+
status:
|
|
23
|
+
code: 200
|
|
24
|
+
message: OK
|
|
25
|
+
headers:
|
|
26
|
+
Server:
|
|
27
|
+
- GitHub.com
|
|
28
|
+
Date:
|
|
29
|
+
- Tue, 14 Aug 2018 21:53:53 GMT
|
|
30
|
+
Content-Type:
|
|
31
|
+
- application/json; charset=utf-8
|
|
32
|
+
Transfer-Encoding:
|
|
33
|
+
- chunked
|
|
34
|
+
Status:
|
|
35
|
+
- 200 OK
|
|
36
|
+
X-Ratelimit-Limit:
|
|
37
|
+
- '5000'
|
|
38
|
+
X-Ratelimit-Remaining:
|
|
39
|
+
- '4997'
|
|
40
|
+
X-Ratelimit-Reset:
|
|
41
|
+
- '1534286196'
|
|
42
|
+
Cache-Control:
|
|
43
|
+
- no-cache
|
|
44
|
+
X-Oauth-Scopes:
|
|
45
|
+
- public_repo
|
|
46
|
+
X-Accepted-Oauth-Scopes:
|
|
47
|
+
- repo
|
|
48
|
+
X-Github-Media-Type:
|
|
49
|
+
- github.v4; format=json
|
|
50
|
+
Access-Control-Expose-Headers:
|
|
51
|
+
- ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
|
|
52
|
+
X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
|
53
|
+
Access-Control-Allow-Origin:
|
|
54
|
+
- "*"
|
|
55
|
+
Strict-Transport-Security:
|
|
56
|
+
- max-age=31536000; includeSubdomains; preload
|
|
57
|
+
X-Frame-Options:
|
|
58
|
+
- deny
|
|
59
|
+
X-Content-Type-Options:
|
|
60
|
+
- nosniff
|
|
61
|
+
X-Xss-Protection:
|
|
62
|
+
- 1; mode=block
|
|
63
|
+
Referrer-Policy:
|
|
64
|
+
- origin-when-cross-origin, strict-origin-when-cross-origin
|
|
65
|
+
Content-Security-Policy:
|
|
66
|
+
- default-src 'none'
|
|
67
|
+
X-Runtime-Rack:
|
|
68
|
+
- '0.031129'
|
|
69
|
+
X-Github-Request-Id:
|
|
70
|
+
- D9E5:0EC6:4C812D:A61781:5B734F71
|
|
71
|
+
body:
|
|
72
|
+
encoding: ASCII-8BIT
|
|
73
|
+
string: '{"data":{"viewer":{"name":"Daniel Doubrovkine (dB.) @dblockdotorg"}}}'
|
|
74
|
+
http_version:
|
|
75
|
+
recorded_at: Tue, 14 Aug 2018 21:53:53 GMT
|
|
76
|
+
recorded_with: VCR 4.0.0
|