graphql 0.6.1 → 0.6.2

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
  SHA1:
3
- metadata.gz: 16c0fb0de67cb50d74c16528abcccb26ad91b01f
4
- data.tar.gz: 008d40ba5dca1c8fb2c8800f987f02981c64d6f9
3
+ metadata.gz: 08f966586efa49fab35baf8a07f91bf1a8f1b90d
4
+ data.tar.gz: 1906d5e21b82db60e65acea99164cf8bb2f8e946
5
5
  SHA512:
6
- metadata.gz: 2573ce8d132b479472db3a680861289e996ad213c6173ad1fadac0ed3377219a7cc41cf7089149b60e81b2dc75fe5c50a38fc6af51e201744b129fc2bf934019
7
- data.tar.gz: 79877bafa23685bedf218e78f9572a1795a30383433943586842ba7605696a71eb391fcf429cc66f6992a9ff29121fff6086d9b428d925541a0f655ef20c90f5
6
+ metadata.gz: c191f4862f354f98264c330040e001d7b5eeea2e5c97008bf13d19b196213d6018e4f9e4f48b0e11cb066b0851857791bc445af114caef4560213dbfe6f71436
7
+ data.tar.gz: e1ee28e2a7450bd018aa32816f7e8461791c8e236a5afa443955a594430d9ae7a12faa567b4056261d2903936e9404cbd1367bf3a13b5562d7ac3b68e2d95ad0
@@ -92,7 +92,7 @@ module GraphQL::Language
92
92
  rule(:value_array) { (str("[") >> (value >> separator?).repeat(0) >> str("]")).as(:array) }
93
93
  rule(:value_boolean) { (str("true") | str("false")).as(:boolean) }
94
94
  rule(:value_float) { (value_sign? >> match('\d').repeat(1) >> str(".") >> match('\d').repeat(1) >> (match("[eE]") >> value_sign? >> match('\d').repeat(1)).maybe).as(:float) }
95
- rule(:value_input_object) { str("{") >> value_input_object_pair.repeat(1).as(:input_object) >> str("}") }
95
+ rule(:value_input_object) { str("{") >> space? >> value_input_object_pair.repeat(1).as(:input_object) >> space? >> str("}") }
96
96
  rule(:value_input_object_pair) { space? >> name.as(:input_object_name) >> space? >> str(":") >> space? >> value.as(:input_object_value) >> separator? }
97
97
  rule(:value_int) { (value_sign? >> match('\d').repeat(1)).as(:int) }
98
98
  rule(:value_string) { str('"') >> value_string_char.repeat.as(:string) >> str('"')}
@@ -1,3 +1,3 @@
1
1
  module GraphQL
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
data/readme.md CHANGED
@@ -80,6 +80,15 @@ See also:
80
80
  - [`queries_controller.rb`](https://github.com/rmosolgo/graphql-ruby-demo/blob/master/app/controllers/queries_controller.rb) for a Rails example
81
81
  - Try it on [heroku](http://graphql-ruby-demo.herokuapp.com)
82
82
 
83
+
84
+ #### Use with Relay
85
+
86
+ If you're building a backend for [Relay](http://facebook.github.io/relay/), you'll need:
87
+
88
+ - A JSON dump of the schema, which you can get by sending [`GraphQL::Introspection::INTROSPECTION_QUERY`](https://github.com/rmosolgo/graphql-ruby/blob/master/lib/graphql/introspection/introspection_query.rb)
89
+ - Relay-specific helpers for GraphQL like Connections, node fields, and global ids. Here's one example of those: [`graphql-relay`](https://github.com/rmosolgo/graphql-relay-ruby)
90
+
91
+
83
92
  ## To Do
84
93
 
85
94
  - To match spec:
@@ -93,11 +102,11 @@ See also:
93
102
  - https://github.com/graphql/graphql-js/issues/19#issuecomment-118515077
94
103
  - Code clean-up
95
104
  - Accept native Ruby types in definitions, then convert them to GraphQL types
96
- - Make Schema validations run before TypeReducer
97
105
  - Remove deprecated `params:` keyword
98
- - Make sure to raise if you try to configure an attribute which doesnt suit the type
106
+ - Raise if you try to configure an attribute which doesn't suit the type
99
107
  - Cook up some path other than "n+1s everywhere"
100
108
  - See Sangria's `project` approach ([in progress](https://github.com/rmosolgo/graphql-ruby/pull/15))
109
+ - Try debounced approach?
101
110
 
102
111
  ## Goals
103
112
 
@@ -118,6 +127,7 @@ See also:
118
127
  - Other implementations: [graphql-links](https://github.com/emmenko/graphql-links)
119
128
  - `graphql-ruby` + Rails demo ([src](https://github.com/rmosolgo/graphql-ruby-demo) / [heroku](http://graphql-ruby-demo.herokuapp.com))
120
129
  - [GraphQL Slack](https://graphql-slack.herokuapp.com/)
130
+ - [Example Relay support](https://github.com/rmosolgo/graphql-relay-ruby) in Ruby
121
131
 
122
132
  ## P.S.
123
133
 
@@ -67,7 +67,7 @@ describe GraphQL::Language::Parser do
67
67
  assert(parser.field.parse_with_debug(%|myField { name, id }|), 'gets subselections')
68
68
  assert(parser.field.parse_with_debug(%{myAlias: myField}), 'gets an alias')
69
69
  assert(parser.field.parse_with_debug(%{myField(intKey: 1, floatKey: 1.1e5)}), 'gets arguments')
70
- assert(parser.field.parse_with_debug('myAlias: myField(stringKey: "\"my_string\"", boolKey: false, objKey: {key : true})'), 'gets alias and arguments')
70
+ assert(parser.field.parse_with_debug('myAlias: myField(stringKey: "\"my_string\"", boolKey: false, objKey: { key : true }, otherObjKey: {key: true})'), 'gets alias and arguments')
71
71
  assert(parser.field.parse_with_debug(%|myField @withFlag, @skip(if: true) { name, id }|), 'gets with directive')
72
72
  end
73
73
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-16 00:00:00.000000000 Z
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet