Commit graph

110 commits

Author SHA1 Message Date
Magnus Hallin
f336a9a97a Fix tests after removing internal fields from introspection 2017-06-15 17:02:08 +02:00
Magnus Hallin
6aed455f03 Prepare for 0.8.0 release 2017-06-15 16:53:27 +02:00
Magnus Hallin
39e1cba49b Rename the empty mutation type and hide __ fields from introspection
This makes GraphiQL stop emitting deprecation warnings
2017-06-15 16:22:52 +02:00
Magnus Hallin
ab7e262f7c Update to latest GraphiQL 2017-06-15 16:12:36 +02:00
Magnus Hallin
8e104204a3 Drop i64 support, add i32 support
This is a breaking change, but having i64 support is both against the
specification and a bad idea when interfacing with e.g. JavaScript or
transmitting it via JSON
2017-06-15 10:48:58 +02:00
Magnus Hallin
cecf50735b Limit incoming integers to the 32 bit signed range
Also related to  - unsigned integers will no longer be represented
as floats.

While this spec might break clients, it makes Juniper follow the GraphQL
specification more closely
2017-06-15 10:37:30 +02:00
Magnus Hallin
b673f5bd1f Validate scalar values passed as variables
Related to  - prevents panics in later stages of execution
2017-06-15 10:36:07 +02:00
Magnus Hallin
4d8c3611d2 Only build HTTP tests when a HTTP integration has been enabled 2017-06-15 10:34:59 +02:00
Magnus Hallin
b23374c868 Remove printlns in non-test code 2017-06-15 09:22:18 +02:00
Magnus Hallin
3f277ba8b4 Add Rocket integration to the HTTP test suite 2017-06-14 18:21:05 +02:00
Magnus Hallin
565f14ceef Factor out HTTP integration tests to http module 2017-06-14 17:24:50 +02:00
Magnus Hallin
e82534aced Initial work on Rocket integration 2017-06-14 15:50:27 +02:00
Magnus Hallin
a7a6778b18 Extract general HTTP/JSON functions from Iron integration 2017-06-14 15:50:14 +02:00
Magnus Hallin
41a33a3238 Merge branch 'serde-1.0' of https://github.com/zaeleus/juniper into zaeleus-serde-1.0
# Conflicts:
#	Cargo.toml
2017-06-14 09:05:56 +02:00
Magnus Hallin
7d7e7e6252 Don't depend on serde_json by default, rename some structs 2017-06-14 09:02:56 +02:00
Michael Macias
0f5182460f Upgrade to serde 1.0
serde 1.0.0 introduces breaking changes. See the release notes for more
details: <https://github.com/serde-rs/serde/releases/tag/v1.0.0>.

Fixes 
2017-05-26 16:15:03 -05:00
rpiper
ba15579531 Added conditional compliation logic. 2017-05-14 20:10:46 -06:00
rpiper
d3b1433748 Added more support for get requests and the get and post handlers leverage the GraphQlQuery struct. Added a couple more tests for get requests. 2017-05-14 19:37:47 -06:00
rpiper
998faec4cb Removed iexpect macro, added urlencoded and serde_derive dependencies. 2017-05-14 19:34:34 -06:00
rpiper
e890e9b4bd Removed from_json, leveraged the already implemented serialization trait and added a serialization implementation for the graphql result. 2017-05-14 19:33:37 -06:00
rpiper
1e334becda Implemented from_json for InputValue. 2017-04-30 20:22:04 -06:00
rpiper
494628a7c7 Removed rustc-serialization as a dependency. 2017-04-30 20:20:41 -06:00
rpiper
54cfbeb010 - Replaced rustc-serialization logic with Serde.
- Added a GraphQlIronError
- Changed execute from lib.rs to execute_query
2017-04-30 20:20:08 -06:00
rpiper
9adc0c4479 Removed rustc-serialization as dependency and updated the docs that referenced rustc. 2017-04-30 20:09:10 -06:00
rpiper
41112d0b6d Drop support for rustc-serialization and use serde by default. 2017-04-30 20:07:36 -06:00
Mrmaxmeier
545a70771d remove panic in Parser::next 2017-04-27 21:10:50 +02:00
Magnus Hallin
20df66f8f0 Add fields to improve tooling compatibility
This adds some non-standard/deprecated fields to better work with
tools such as GraphiQL or GraphQLViz.
2017-02-27 21:15:13 +01:00
Magnus Hallin
b7a2f577ef Add more default value documentation 2017-02-26 12:56:07 +01:00
Magnus Hallin
47ce85bd72 Use 1D variable to not depend on HashMap order in tests 2017-02-26 11:59:30 +01:00
Magnus Hallin
ba2ef34387 Add tests for complex default arguments 2017-02-26 11:42:58 +01:00
Magnus Hallin
d66bac39da Implement ToInputValue when creating input objects 2017-02-26 11:41:47 +01:00
Magnus Hallin
f7e0ffa1a7 Merge pull request from Mrmaxmeier/fix-clippy-warnings
Fix a bunch of clippy warnings
2017-02-26 10:14:56 +01:00
Magnus Hallin
3035eb84cf Merge pull request from zaeleus/iron-0.5
Update to iron 0.5
2017-02-26 09:21:36 +01:00
Mrmaxmeier
5d7634c975 Fix a bunch of clippy warnings 2017-02-25 14:49:46 +01:00
Magnus Hallin
0a3bbf8f21 Fix bug in input object macro 2017-02-19 12:58:12 +01:00
Magnus Hallin
2f79f33a82 Document input object default values 2017-02-19 12:51:12 +01:00
Magnus Hallin
0b07dbe99a Add support for default values in input objects 2017-02-19 12:08:52 +01:00
Magnus Hallin
e0c6b03171 Add more input value null value tests
These correspond to the table in "3.1.6 Input Objects" in the GraphQL
specification.
2017-02-19 10:29:37 +01:00
Michael Macias
b2e75bf4f6 Update to iron 0.5
* `Url::into_generic_url` was deprecated in 0.4.1. The `Into` trait is
    used instead.
  * iron/logger removed support for ANSI terminal colors in 0.2.0, which
    makes logging work in the Command Prompt on Windows.

Fixes 
2017-02-16 02:08:26 -06:00
Magnus Hallin
40cc76d2b9 Merge pull request from zaeleus/explicit-null
Accept explicit null input values in queries
2017-02-04 13:25:15 +01:00
Magnus Hallin
90054cf9d1 (Maybe) fix macro compatibility for older Rusts 2017-02-04 11:52:27 +01:00
Magnus Hallin
c5a1f975ed Allow strings to be parsed into enums in variables
Fixes .
2017-02-04 11:08:00 +01:00
Magnus Hallin
d8b07e8c68 Implement __typename for GraphQL objects
Fixes .
2017-02-04 10:45:25 +01:00
Magnus Hallin
c1d8e6c19b Remove some unused imports 2017-02-04 10:29:53 +01:00
Magnus Hallin
c51930aae5 Merge pull request from zaeleus/serde-0.9
Update to serde 0.9
2017-02-04 10:16:26 +01:00
Magnus Hallin
555962c915 Merge pull request from zaeleus/warnings
Fix compiler warnings when testing
2017-02-04 10:16:06 +01:00
Michael Macias
98b662c88e Accept explicit null input values in queries
Explicit `null` values are valid for nullable input values. See
<https://facebook.github.io/graphql/#sec-Types.Non-Null>.

Fixes 
2017-01-27 01:45:29 -06:00
Michael Macias
a834115d87 Update to serde 0.9
serde 0.9.0 introduces breaking changes. See the release notes for more
details: <https://github.com/serde-rs/serde/releases/tag/v0.9.0>.
2017-01-26 17:25:17 -06:00
Michael Macias
b61281b63a Implement traits for ID to make it usable outside its module
ID is a named tuple with a private String field. This prevents any
creation of an ID outside its own module. Traits, such as conversion and
dereference, are added to make ID usable without exposing its inner
field.
2017-01-20 03:29:37 -06:00
Michael Macias
c7adbaede7 Fix compiler warnings when testing 2017-01-20 03:29:26 -06:00