agoo 2.14.0 → 2.14.1
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/CHANGELOG.md +6 -0
- data/README.md +1 -2
- data/ext/agoo/gqleval.c +1 -1
- data/ext/agoo/gqljson.c +1 -0
- data/lib/agoo/version.rb +1 -1
- data/test/graphql_test.rb +36 -6
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fbaa8a1e2f42cda657178256643bcf0161f93d9be09e90512084eb877b12aa9
|
4
|
+
data.tar.gz: e33135684316f9e0244f0cc2e781561f99374888c7756866e0d2ed33db1c0446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 630cf6226a74119dbb5417a8a33df2893e08e61acd6037f61d6d6a1d424c22a7bb61bfa59c65420b3e4026a421764b128b36ca9ae5dc2087722f338228f2e732
|
7
|
+
data.tar.gz: 6798931eaa91d29ccc0e6abe701cc62cc44b129b22e34f0f0dc53e26f409ca27c7a001424197f9c4c2f02820a8a670e38609e408ca4b6e5069957c9981a6b49f
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
All changes to the Agoo gem are documented here. Releases follow semantic versioning.
|
4
4
|
|
5
|
+
## [2.14.1] - 2021-06-09
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
- Evaluating an empty GraphQL request with comments only no longer crashes.
|
9
|
+
- JSON parser bug fixed.
|
10
|
+
|
5
11
|
## [2.14.0] - 2020-11-07
|
6
12
|
|
7
13
|
### Added
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# agoo
|
1
|
+
# [](http://www.ohler.com/agoo) Agoo
|
2
2
|
|
3
3
|
[](http://travis-ci.org/ohler55/agoo?branch=master)
|
4
4
|
[](https://badge.fury.io/rb/agoo)
|
@@ -164,4 +164,3 @@ the develop branch. Pull requests should be made against the develop branch.
|
|
164
164
|
|
165
165
|
- *Perfer* *repo*: https://github.com/ohler55/perfer
|
166
166
|
|
167
|
-
Follow [@peterohler on Twitter](http://twitter.com/#!/peterohler) for announcements and news about the Agoo gem.
|
data/ext/agoo/gqleval.c
CHANGED
data/ext/agoo/gqljson.c
CHANGED
@@ -307,6 +307,7 @@ parse_object(agooErr err, agooDoc doc) {
|
|
307
307
|
agoo_doc_skip_jwhite(doc);
|
308
308
|
if ('}' != *doc->cur) {
|
309
309
|
for (; doc->cur < doc->end; doc->cur++) {
|
310
|
+
agoo_doc_skip_jwhite(doc);
|
310
311
|
if ('"' != *doc->cur) {
|
311
312
|
return return_parse_err(err, doc, "expected an object key as a string", value);
|
312
313
|
}
|
data/lib/agoo/version.rb
CHANGED
data/test/graphql_test.rb
CHANGED
@@ -79,6 +79,7 @@ end
|
|
79
79
|
$songs_sdl = %^
|
80
80
|
type Query @ruby(class: "Query") {
|
81
81
|
artist(name: String!): Artist
|
82
|
+
artists: [Artist!]
|
82
83
|
}
|
83
84
|
|
84
85
|
type Mutation {
|
@@ -120,26 +121,30 @@ type Song {
|
|
120
121
|
^
|
121
122
|
|
122
123
|
class Query
|
123
|
-
attr_reader :
|
124
|
+
attr_reader :artistHash
|
124
125
|
|
125
126
|
def initialize(artists)
|
126
|
-
@
|
127
|
+
@artistHash = artists
|
127
128
|
end
|
128
129
|
|
129
130
|
def artist(args)
|
130
|
-
@
|
131
|
+
@artistHash[args['name']]
|
132
|
+
end
|
133
|
+
|
134
|
+
def artists(args)
|
135
|
+
@artistHash.values
|
131
136
|
end
|
132
137
|
end
|
133
138
|
|
134
139
|
class Mutation
|
135
|
-
attr_reader :
|
140
|
+
attr_reader :artistHash
|
136
141
|
|
137
142
|
def initialize(artists)
|
138
|
-
@
|
143
|
+
@artistHash = artists
|
139
144
|
end
|
140
145
|
|
141
146
|
def like(args)
|
142
|
-
artist = @
|
147
|
+
artist = @artistHash[args['artist']]
|
143
148
|
artist.like
|
144
149
|
artist
|
145
150
|
end
|
@@ -187,6 +192,7 @@ type Mutation @ruby(class: "Mutation") {
|
|
187
192
|
|
188
193
|
type Query @ruby(class: "Query") {
|
189
194
|
artist(name: String!): Artist
|
195
|
+
artists: [Artist!]
|
190
196
|
}
|
191
197
|
|
192
198
|
type Song @ruby(class: "Song") {
|
@@ -452,6 +458,30 @@ fragment basic on Artist {
|
|
452
458
|
post_test(uri, body, 'application/graphql', expect)
|
453
459
|
end
|
454
460
|
|
461
|
+
def test_post_json_fragment
|
462
|
+
uri = URI('http://localhost:6472/graphql?indent=2')
|
463
|
+
body = %^{
|
464
|
+
"query": "fragment basic on Artist {name origin} query list($filter: String) {artists {...basic}}",
|
465
|
+
"operationName": "list",
|
466
|
+
"variables": {"filters": {}}
|
467
|
+
}^
|
468
|
+
expect = %^{
|
469
|
+
"data":{
|
470
|
+
"artists":[
|
471
|
+
{
|
472
|
+
"name":"Fazerdaze",
|
473
|
+
"origin":[
|
474
|
+
"Morningside",
|
475
|
+
"Auckland",
|
476
|
+
"New Zealand"
|
477
|
+
]
|
478
|
+
}
|
479
|
+
]
|
480
|
+
}
|
481
|
+
}^
|
482
|
+
post_test(uri, body, 'application/json', expect)
|
483
|
+
end
|
484
|
+
|
455
485
|
def test_post_inline
|
456
486
|
uri = URI('http://localhost:6472/graphql?indent=2')
|
457
487
|
body = %^
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.14.
|
4
|
+
version: 2.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -163,7 +163,7 @@ homepage: https://github.com/ohler55/agoo
|
|
163
163
|
licenses:
|
164
164
|
- MIT
|
165
165
|
metadata: {}
|
166
|
-
post_install_message:
|
166
|
+
post_install_message:
|
167
167
|
rdoc_options:
|
168
168
|
- "-t"
|
169
169
|
- Agoo
|
@@ -189,17 +189,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: '0'
|
190
190
|
requirements:
|
191
191
|
- Linux or macOS
|
192
|
-
rubygems_version: 3.
|
193
|
-
signing_key:
|
192
|
+
rubygems_version: 3.2.3
|
193
|
+
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: An HTTP server
|
196
196
|
test_files:
|
197
|
-
- test/graphql_test.rb
|
198
|
-
- test/hijack_test.rb
|
199
|
-
- test/rack_handler_test.rb
|
200
197
|
- test/base_handler_test.rb
|
201
|
-
- test/
|
198
|
+
- test/bind_test.rb
|
202
199
|
- test/domain_test.rb
|
203
200
|
- test/early_hints_test.rb
|
204
|
-
- test/
|
201
|
+
- test/graphql_test.rb
|
202
|
+
- test/hijack_test.rb
|
203
|
+
- test/log_test.rb
|
204
|
+
- test/rack_handler_test.rb
|
205
205
|
- test/static_test.rb
|