All user visible changes to this project will be documented in this file. This project adheres to Semantic Versioning, as described for Rust libraries in RFC #1105
- Async resolvers are now supported (requires juniper 0.15).
- Subscriptions are now supported (requires juniper 0.15).
- Give nice error if you declare custom scalar with same name as built-in.
- Re-export juniper from juniper-from-schema to make sure we're always using the same version.
- Support generating code from
build.rs
instead of a procedural macro. See the docs for more details.
The executor
argument in field_*
methods now requires two lifetime arguments:
fn field_hello_world<'r, 'a>(
&self,
executor: &Executor<'r, 'a, Context>
) -> FieldResult<String> {
todo!()
}
This is due to breaking change in juniper. However with a recent version of Rust you can actually skip declaring the lifetimes at all:
fn field_hello_world(
&self,
executor: &Executor<Context>
) -> FieldResult<String> {
todo!()
}
0.5.2 - 2020-02-19
- Remove
MakeQueryTrail
trait. This is not a breaking change since user's shouldn't be using it. - Require the UUID scalar type to be named
Uuid
. This is to remain consistent with the uuid crate. This is not considered a breaking change since it fixes a bug in code generation with inconsistent case. See #104. - Add derive
Clone
to input types. See #110 - Support all directive definitions in schema but require specific definition for
@juniper
. See the docs for valid definiton of@juniper
. juniper-from-schema doesn't require you to define@juniper
in your schema, but some other external tools might.
0.5.1 - 2019-11-14
- Support making fields infallible with
@juniper(infallible: true)
. - Make sure fields on input object structs are in fact public.
0.5.0 - 2019-10-17
- Remove the second lifetime from generated structs for field arguments. Turns out
'a
fromQueryTrail<'a, _, _>
is all we need. - The
DateTime
scalar has been renamed toDateTimeUtc
to clearly communicate the name Juniper gives it.
0.4.2 - 2019-10-16
- Add support for inspecting arguments to
QueryTrail
. See docs for more info. #83.
0.4.1 - 2019-10-16
- Correctly trigger rebuild of Rust schema if only GraphQL schema changed when using
graphql_schema_from_file!
.
0.4.0 - 2019-10-05
- Support converting
QueryTrail
s for interfaces or unions intoQueryTrail
s for implementors of those interfaces or unions. This makes it possible to use juniper-eager-loading with interface or union types. #63
- The
QueryTrail
type is now part of this library rather than being emitted as part of the generated code. This was done so other libraries could make sure of the type. If you're getting errors about missing methods addinguse crate::graphql_schema::query_trails::*
to you module should fix it. #82
0.3.2 - 2019-09-30
- Juniper 0.14 support.
0.3.1 - 2019-09-24
- Support customizing the name of the context type. #66
- Improve documentation of special case scalar types.
- Implement common traits for generated scalar types.
- Support converting
DateTime
intochrono::NaiveDateTime
for those who don't care about time zones. The behavior can be customized with the@juniper(with_time_zone: true|false)
directive on the scalar definition.
- Special case scalars
Date
,DateTime
,Uuid
, andUrl
no longer support descriptions in the GraphQL schema. See #69 for more details.
- Fix support for special case
Uuid
andUrl
scalars. #69 - Removed some deprecation warnings related to scalar types. #78
- Don't deprecate enum variants in Rust code when marked as deprecated in the schema.
0.3.0 - 2019-06-18
- Will now fail to compile if you schema contains field names in snake_case. #47
0.2.3 - 2019-06-15
- Fix
QueryTrail
walk methods always returningfalse
for fields defined using snake_case in the schema. #46
0.2.2 - 2019-06-10
- Add support for "as_ref" ownership types such as
FieldResult<Option<&T>>
.
0.2.1 - 2019-05-24
- Break crate into two: One that exposes shared types, one that does the code generation. Should not be a breaking change.
0.2.0 - 2019-05-08
- Replace the magic
#[ownership(owned)]
comment with a schema directive.
0.1.7 - 2019-05-07
- Support default values for input objects.
- Support
deprecated
directives on fields and enum values.
- Ensure enum variants used for default values exist. This would previously be a run time error. It is now a compile time error.
0.1.6 - 2019-05-04
- Much better error messages. Basically a rip-off of Rust's compiler errors.
- The
ID
GraphQL type now gets generated intojuniper::ID
instead of a custom newtype wrapper. This is a breaking change but should be straight forward to fix.
- Correctly panic if schema contains unsupported features such as directives or a subscription type.
- Correctly generate docs for all types.
- Fix compile error when using custom scalar.
0.1.5 - 2019-04-26
- Make default argument values work for floats, integers, strings, booleans, enumerations, and lists (of supported types). Objects, variables, and nulls are not supported.
- Field methods that return enumerations no longer get
QueryTrails
. You couldn't really do anything with them since enumerations cannot contain data. - Schemes that don't contain a root mutation type now doesn't fail to compile. It would use
()
for the context, when it should have usedContext
.
0.1.4 - 2019-02-16
- Make
graphql_schema_from_file!
look from same folder as yourCargo.toml
. This fixes issues with finding the schema within a workspace project. Should not be a breaking change. - Added missing
juniper::
qualifications for generated code that referencedExecutor
. - Many documentation improvements, including:
- Table of contents
- Description of how to customize the error type
- Clearer example code by removing
use juniper::*
- Description of how
QueryTrail
works forVec<T>
andOption<T>
- Describe how to view the generated code
- Several typo fixes
0.1.3 - 2019-02-01
QueryTrail
methods now generated for union types.
0.1.2 - 2019-01-14
QueryTrail
methods now generated for interface types.
0.1.1 - 2018-12-21
Just fixed broken homepage link on crates.io
Initial release.