From a32140cd46f17491d3f7a93b4a6c67732a29b0e8 Mon Sep 17 00:00:00 2001 From: ilslv <47687266+ilslv@users.noreply.github.com> Date: Tue, 28 Jun 2022 18:32:08 +0300 Subject: [PATCH] Update all links to October 2021 spec (#1075, #1000) Co-authored-by: Kai Ren --- README.md | 4 +- book/src/README.md | 4 +- book/src/types/interfaces.md | 4 +- book/src/types/objects/error_handling.md | 4 +- book/src/types/scalars.md | 4 +- book/src/types/unions.md | 6 +- juniper/src/schema/meta.rs | 2 +- .../src/schema/translate/graphql_parser.rs | 6 +- juniper/src/types/async_await.rs | 12 ++-- juniper/src/types/base.rs | 36 +++++----- juniper/src/types/marker.rs | 42 +++++------ juniper/src/types/subscriptions.rs | 6 +- juniper/src/value/scalar.rs | 10 +-- juniper_codegen/src/common/field/arg.rs | 42 +++++------ juniper_codegen/src/common/field/mod.rs | 54 +++++++------- juniper_codegen/src/common/gen.rs | 4 +- .../src/common/parse/downcaster.rs | 4 +- juniper_codegen/src/graphql_interface/mod.rs | 64 ++++++++--------- juniper_codegen/src/graphql_object/mod.rs | 70 +++++++++---------- .../src/graphql_subscription/mod.rs | 8 +-- juniper_codegen/src/graphql_union/attr.rs | 2 +- juniper_codegen/src/graphql_union/derive.rs | 2 +- juniper_codegen/src/graphql_union/mod.rs | 66 ++++++++--------- juniper_codegen/src/lib.rs | 18 ++--- juniper_codegen/src/result.rs | 4 +- .../derive_name_double_underscored.stderr | 2 +- .../enum/derive_variant_with_field.stderr | 2 +- .../input-object/derive_no_underscore.stderr | 2 +- .../attr_field_double_underscored.stderr | 2 +- .../struct/attr_fields_duplicate.stderr | 2 +- .../attr_name_double_underscored.stderr | 2 +- .../interface/struct/attr_no_fields.stderr | 2 +- .../struct/attr_unnamed_field.stderr | 2 +- .../derive_field_double_underscored.stderr | 2 +- .../struct/derive_fields_duplicate.stderr | 2 +- .../derive_name_double_underscored.stderr | 2 +- .../interface/struct/derive_no_fields.stderr | 2 +- .../struct/derive_unnamed_field.stderr | 2 +- .../trait/argument_double_underscored.stderr | 2 +- .../trait/field_double_underscored.stderr | 2 +- .../interface/trait/fields_duplicate.stderr | 2 +- .../trait/method_default_impl.stderr | 2 +- .../trait/name_double_underscored.stderr | 2 +- .../fail/interface/trait/no_fields.stderr | 2 +- .../object/argument_double_underscored.stderr | 2 +- .../fail/object/attr_fields_duplicate.stderr | 2 +- .../attr_name_double_underscored.stderr | 2 +- .../codegen/fail/object/attr_no_fields.stderr | 2 +- .../derive_field_double_underscored.stderr | 2 +- .../object/derive_fields_duplicate.stderr | 2 +- .../derive_name_double_underscored.stderr | 2 +- .../fail/object/derive_no_fields.stderr | 2 +- .../argument_double_underscored.stderr | 2 +- .../fail/subscription/field_not_async.stderr | 2 +- .../fail/subscription/fields_duplicate.stderr | 2 +- .../name_double_underscored.stderr | 2 +- .../fail/subscription/no_fields.stderr | 2 +- ...s_with_variant_external_resolver_fn.stderr | 2 +- .../union/enum_name_double_underscored.stderr | 2 +- .../codegen/fail/union/enum_no_fields.stderr | 2 +- .../fail/union/enum_same_type_pretty.stderr | 2 +- .../union/enum_wrong_variant_field.stderr | 4 +- .../struct_name_double_underscored.stderr | 2 +- .../fail/union/struct_no_fields.stderr | 2 +- ...conflicts_with_external_resolver_fn.stderr | 2 +- .../trait_name_double_underscored.stderr | 2 +- .../codegen/fail/union/trait_no_fields.stderr | 2 +- .../fail/union/trait_same_type_pretty.stderr | 2 +- .../union/trait_with_attr_on_method.stderr | 2 +- .../trait_wrong_method_input_args.stderr | 2 +- .../trait_wrong_method_return_type.stderr | 2 +- 71 files changed, 286 insertions(+), 286 deletions(-) diff --git a/README.md b/README.md index 3bd500489..5a028b050 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ see the [actix][actix_examples], [hyper][hyper_examples], [rocket][rocket_exampl ## Features Juniper supports the full GraphQL query language according to the -[specification][graphql_spec], including interfaces, unions, schema +[specification (October 2021)][graphql_spec], including interfaces, unions, schema introspection, and validations. It can also output the schema in the [GraphQL Schema Language][schema_language]. As an exception to other GraphQL libraries for other languages, Juniper builds @@ -97,7 +97,7 @@ Juniper has not reached 1.0 yet, thus some API instability should be expected. [graphiql]: https://github.com/graphql/graphiql [playground]: https://github.com/prisma/graphql-playground [iron]: https://github.com/iron/iron -[graphql_spec]: http://facebook.github.io/graphql +[graphql_spec]: https://spec.graphql.org/October2021 [schema_language]: https://graphql.org/learn/schema/#type-language [schema_approach]: https://blog.logrocket.com/code-first-vs-schema-first-development-graphql/ [test_schema_rs]: https://github.com/graphql-rust/juniper/blob/master/juniper/src/tests/fixtures/starwars/schema.rs diff --git a/book/src/README.md b/book/src/README.md index 07968a555..367f16cd5 100644 --- a/book/src/README.md +++ b/book/src/README.md @@ -21,7 +21,7 @@ embedded [Graphiql][graphiql] for easy debugging. ## Features Juniper supports the full GraphQL query language according to the -[specification][graphql_spec], including interfaces, unions, schema +[specification (October 2021)][graphql_spec], including interfaces, unions, schema introspection, and validations. It does not, however, support the schema language. @@ -57,7 +57,7 @@ Juniper has not reached 1.0 yet, thus some API instability should be expected. [graphql]: http://graphql.org [graphiql]: https://github.com/graphql/graphiql [iron]: https://github.com/iron/iron -[graphql_spec]: http://facebook.github.io/graphql +[graphql_spec]: https://spec.graphql.org/October2021 [test_schema_rs]: https://github.com/graphql-rust/juniper/blob/master/juniper/src/tests/schema.rs [tokio]: https://github.com/tokio-rs/tokio [hyper_examples]: https://github.com/graphql-rust/juniper/tree/master/juniper_hyper/examples diff --git a/book/src/types/interfaces.md b/book/src/types/interfaces.md index 949344f9f..6a394cebb 100644 --- a/book/src/types/interfaces.md +++ b/book/src/types/interfaces.md @@ -473,9 +473,9 @@ struct Droid { -[1]: https://spec.graphql.org/June2018/#sec-Interfaces +[1]: https://spec.graphql.org/October2021#sec-Interfaces [2]: https://doc.rust-lang.org/reference/types/trait-object.html [3]: https://docs.rs/juniper/latest/juniper/trait.ScalarValue.html [4]: https://docs.rs/juniper/latest/juniper/struct.Executor.html -[5]: https://spec.graphql.org/June2018/#sec-Objects +[5]: https://spec.graphql.org/October2021#sec-Objects [6]: https://docs.rs/juniper/0.14.2/juniper/trait.Context.html diff --git a/book/src/types/objects/error_handling.md b/book/src/types/objects/error_handling.md index 4adc269fa..1d4d82477 100644 --- a/book/src/types/objects/error_handling.md +++ b/book/src/types/objects/error_handling.md @@ -60,7 +60,7 @@ there - those errors are automatically converted into `FieldError`. ## Error payloads, `null`, and partial errors -Juniper's error behavior conforms to the [GraphQL specification](https://spec.graphql.org/June2018/#sec-Errors-and-Non-Nullability). +Juniper's error behavior conforms to the [GraphQL specification](https://spec.graphql.org/October2021#sec-Handling-Field-Errors). When a field returns an error, the field's result is replaced by `null`, an additional `errors` object is created at the top level of the response, and the @@ -168,7 +168,7 @@ impl Example { # fn main() {} ``` -The specified structured error information is included in the [`extensions`](https://facebook.github.io/graphql/June2018/#sec-Errors) key: +The specified structured error information is included in the [`extensions`](https://spec.graphql.org/October2021#sec-Errors) key: ```json { diff --git a/book/src/types/scalars.md b/book/src/types/scalars.md index a17e07a2c..8981eaac2 100644 --- a/book/src/types/scalars.md +++ b/book/src/types/scalars.md @@ -24,10 +24,10 @@ Juniper has built-in support for: * `String` and `&str` as `String` * `bool` as `Boolean` * `juniper::ID` as `ID`. This type is defined [in the - spec](http://facebook.github.io/graphql/#sec-ID) as a type that is serialized + spec](https://spec.graphql.org/October2021#sec-ID) as a type that is serialized as a string but can be parsed from both a string and an integer. -Note that there is no built-in support for `i64`/`u64`, as the GraphQL spec [doesn't define any built-in scalars for `i64`/`u64` by default](https://spec.graphql.org/June2018/#sec-Int). You may wish to leverage a [custom GraphQL scalar](#custom-scalars) in your schema to support them. +Note that there is no built-in support for `i64`/`u64`, as the GraphQL spec [doesn't define any built-in scalars for `i64`/`u64` by default](https://spec.graphql.org/October2021#sec-Int). You may wish to leverage a [custom GraphQL scalar](#custom-scalars) in your schema to support them. **Third party types**: diff --git a/book/src/types/unions.md b/book/src/types/unions.md index ac5d7db26..bfce7f777 100644 --- a/book/src/types/unions.md +++ b/book/src/types/unions.md @@ -130,7 +130,7 @@ impl Character { # fn main() {} ``` -With an external resolver function we can even declare a new [GraphQL union][1] variant where the Rust type is absent in the initial enum definition. The attribute syntax `#[graphql(on VariantType = resolver_fn)]` follows the [GraphQL syntax for dispatching union variants](https://spec.graphql.org/June2018/#example-f8163). +With an external resolver function we can even declare a new [GraphQL union][1] variant where the Rust type is absent in the initial enum definition. The attribute syntax `#[graphql(on VariantType = resolver_fn)]` follows the [GraphQL syntax for dispatching union variants](https://spec.graphql.org/October2021#example-f8163). ```rust # #![allow(dead_code)] @@ -485,7 +485,7 @@ enum Character { -[1]: https://spec.graphql.org/June2018/#sec-Unions +[1]: https://spec.graphql.org/October2021#sec-Unions [2]: https://docs.rs/juniper/latest/juniper/trait.ScalarValue.html -[5]: https://spec.graphql.org/June2018/#sec-Interfaces +[5]: https://spec.graphql.org/October2021#sec-Interfaces [6]: https://docs.rs/juniper/0.14.2/juniper/trait.Context.html diff --git a/juniper/src/schema/meta.rs b/juniper/src/schema/meta.rs index eecef5905..5ef83cc89 100644 --- a/juniper/src/schema/meta.rs +++ b/juniper/src/schema/meta.rs @@ -405,7 +405,7 @@ impl<'a, S> MetaType<'a, S> { // "used exclusively by GraphQL’s introspection system" { name.starts_with("__") || - // + // https://spec.graphql.org/October2021#sec-Scalars name == "Boolean" || name == "String" || name == "Int" || name == "Float" || name == "ID" || // Our custom empty markers name == "_EmptyMutation" || name == "_EmptySubscription" diff --git a/juniper/src/schema/translate/graphql_parser.rs b/juniper/src/schema/translate/graphql_parser.rs index c3864561c..5532c0fbe 100644 --- a/juniper/src/schema/translate/graphql_parser.rs +++ b/juniper/src/schema/translate/graphql_parser.rs @@ -298,9 +298,9 @@ where } } -// Right now the only directive supported is `@deprecated`. `@skip` and `@include` -// are dealt with elsewhere. -// +// Right now the only directive supported is `@deprecated`. +// `@skip` and `@include` are dealt with elsewhere. +// https://spec.graphql.org/October2021#sec-Type-System.Directives.Built-in-Directives fn generate_directives<'a, T>(status: &DeprecationStatus) -> Vec> where T: Text<'a>, diff --git a/juniper/src/types/async_await.rs b/juniper/src/types/async_await.rs index e32732757..80c653cff 100644 --- a/juniper/src/types/async_await.rs +++ b/juniper/src/types/async_await.rs @@ -30,7 +30,7 @@ where /// /// The default implementation panics. /// - /// [3]: https://spec.graphql.org/June2018/#sec-Objects + /// [3]: https://spec.graphql.org/October2021#sec-Objects fn resolve_field_async<'a>( &'a self, _info: &'a Self::TypeInfo, @@ -54,9 +54,9 @@ where /// /// The default implementation panics. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces - /// [2]: https://spec.graphql.org/June2018/#sec-Unions - /// [3]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces + /// [2]: https://spec.graphql.org/October2021#sec-Unions + /// [3]: https://spec.graphql.org/October2021#sec-Objects fn resolve_into_type_async<'a>( &'a self, info: &'a Self::TypeInfo, @@ -91,8 +91,8 @@ where /// /// The default implementation panics, if `selection_set` is [`None`]. /// - /// [0]: https://spec.graphql.org/June2018/#sec-Errors-and-Non-Nullability - /// [3]: https://spec.graphql.org/June2018/#sec-Objects + /// [0]: https://spec.graphql.org/October2021#sec-Handling-Field-Errors + /// [3]: https://spec.graphql.org/October2021#sec-Objects fn resolve_async<'a>( &'a self, info: &'a Self::TypeInfo, diff --git a/juniper/src/types/base.rs b/juniper/src/types/base.rs index d5c9e3941..e43134f10 100644 --- a/juniper/src/types/base.rs +++ b/juniper/src/types/base.rs @@ -150,14 +150,14 @@ impl<'a, S> Arguments<'a, S> { /// This trait is intended to be used in a conjunction with a [`GraphQLType`] trait. See the example /// in the documentation of a [`GraphQLType`] trait. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Interfaces -/// [2]: https://spec.graphql.org/June2018/#sec-Unions -/// [3]: https://spec.graphql.org/June2018/#sec-Objects -/// [4]: https://spec.graphql.org/June2018/#sec-Scalars -/// [5]: https://spec.graphql.org/June2018/#sec-Enums -/// [6]: https://spec.graphql.org/June2018/#sec-Type-System.List -/// [7]: https://spec.graphql.org/June2018/#sec-Type-System.Non-Null -/// [8]: https://spec.graphql.org/June2018/#sec-Input-Objects +/// [1]: https://spec.graphql.org/October2021#sec-Interfaces +/// [2]: https://spec.graphql.org/October2021#sec-Unions +/// [3]: https://spec.graphql.org/October2021#sec-Objects +/// [4]: https://spec.graphql.org/October2021#sec-Scalars +/// [5]: https://spec.graphql.org/October2021#sec-Enums +/// [6]: https://spec.graphql.org/October2021#sec-List +/// [7]: https://spec.graphql.org/October2021#sec-Non-Null +/// [8]: https://spec.graphql.org/October2021#sec-Input-Objects /// [11]: https://doc.rust-lang.org/reference/items/traits.html#object-safety /// [12]: https://doc.rust-lang.org/reference/types/trait-object.html pub trait GraphQLValue @@ -196,7 +196,7 @@ where /// /// The default implementation panics. /// - /// [3]: https://spec.graphql.org/June2018/#sec-Objects + /// [3]: https://spec.graphql.org/October2021#sec-Objects fn resolve_field( &self, _info: &Self::TypeInfo, @@ -217,9 +217,9 @@ where /// /// The default implementation panics. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces - /// [2]: https://spec.graphql.org/June2018/#sec-Unions - /// [3]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces + /// [2]: https://spec.graphql.org/October2021#sec-Unions + /// [3]: https://spec.graphql.org/October2021#sec-Objects fn resolve_into_type( &self, info: &Self::TypeInfo, @@ -243,9 +243,9 @@ where /// /// The default implementation panics. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces - /// [2]: https://spec.graphql.org/June2018/#sec-Unions - /// [3]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces + /// [2]: https://spec.graphql.org/October2021#sec-Unions + /// [3]: https://spec.graphql.org/October2021#sec-Objects #[allow(unused_variables)] fn concrete_type_name(&self, context: &Self::Context, info: &Self::TypeInfo) -> String { panic!( @@ -271,8 +271,8 @@ where /// /// The default implementation panics, if `selection_set` is [`None`]. /// - /// [0]: https://spec.graphql.org/June2018/#sec-Errors-and-Non-Nullability - /// [3]: https://spec.graphql.org/June2018/#sec-Objects + /// [0]: https://spec.graphql.org/October2021#sec-Errors-and-Non-Nullability + /// [3]: https://spec.graphql.org/October2021#sec-Objects fn resolve( &self, info: &Self::TypeInfo, @@ -385,7 +385,7 @@ where /// } /// ``` /// -/// [3]: https://spec.graphql.org/June2018/#sec-Objects +/// [3]: https://spec.graphql.org/October2021#sec-Objects pub trait GraphQLType: GraphQLValue where S: ScalarValue, diff --git a/juniper/src/types/marker.rs b/juniper/src/types/marker.rs index 2dd22789e..d1885e3f9 100644 --- a/juniper/src/types/marker.rs +++ b/juniper/src/types/marker.rs @@ -17,19 +17,19 @@ use crate::{GraphQLType, ScalarValue}; /// [GraphQL objects][1]. Other types ([scalars][2], [enums][3], [interfaces][4], [input objects][5] /// and [unions][6]) are not allowed. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Objects -/// [2]: https://spec.graphql.org/June2018/#sec-Scalars -/// [3]: https://spec.graphql.org/June2018/#sec-Enums -/// [4]: https://spec.graphql.org/June2018/#sec-Interfaces -/// [5]: https://spec.graphql.org/June2018/#sec-Input-Objects -/// [6]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Objects +/// [2]: https://spec.graphql.org/October2021#sec-Scalars +/// [3]: https://spec.graphql.org/October2021#sec-Enums +/// [4]: https://spec.graphql.org/October2021#sec-Interfaces +/// [5]: https://spec.graphql.org/October2021#sec-Input-Objects +/// [6]: https://spec.graphql.org/October2021#sec-Unions pub trait GraphQLObject: GraphQLType { /// An arbitrary function without meaning. /// /// May contain compile timed check logic which ensures that types are used correctly according /// to the [GraphQL specification][1]. /// - /// [1]: https://spec.graphql.org/June2018/ + /// [1]: https://spec.graphql.org/October2021 fn mark() {} } @@ -74,19 +74,19 @@ where /// [GraphQL interfaces][1]. Other types ([scalars][2], [enums][3], [objects][4], [input objects][5] /// and [unions][6]) are not allowed. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Interfaces -/// [2]: https://spec.graphql.org/June2018/#sec-Scalars -/// [3]: https://spec.graphql.org/June2018/#sec-Enums -/// [4]: https://spec.graphql.org/June2018/#sec-Objects -/// [5]: https://spec.graphql.org/June2018/#sec-Input-Objects -/// [6]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Interfaces +/// [2]: https://spec.graphql.org/October2021#sec-Scalars +/// [3]: https://spec.graphql.org/October2021#sec-Enums +/// [4]: https://spec.graphql.org/October2021#sec-Objects +/// [5]: https://spec.graphql.org/October2021#sec-Input-Objects +/// [6]: https://spec.graphql.org/October2021#sec-Unions pub trait GraphQLInterface: GraphQLType { /// An arbitrary function without meaning. /// /// May contain compile timed check logic which ensures that types are used correctly according /// to the [GraphQL specification][1]. /// - /// [1]: https://spec.graphql.org/June2018/ + /// [1]: https://spec.graphql.org/October2021 fn mark() {} } @@ -131,19 +131,19 @@ where /// [GraphQL unions][1]. Other types ([scalars][2], [enums][3], [objects][4], [input objects][5] and /// [interfaces][6]) are not allowed. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Unions -/// [2]: https://spec.graphql.org/June2018/#sec-Scalars -/// [3]: https://spec.graphql.org/June2018/#sec-Enums -/// [4]: https://spec.graphql.org/June2018/#sec-Objects -/// [5]: https://spec.graphql.org/June2018/#sec-Input-Objects -/// [6]: https://spec.graphql.org/June2018/#sec-Interfaces +/// [1]: https://spec.graphql.org/October2021#sec-Unions +/// [2]: https://spec.graphql.org/October2021#sec-Scalars +/// [3]: https://spec.graphql.org/October2021#sec-Enums +/// [4]: https://spec.graphql.org/October2021#sec-Objects +/// [5]: https://spec.graphql.org/October2021#sec-Input-Objects +/// [6]: https://spec.graphql.org/October2021#sec-Interfaces pub trait GraphQLUnion: GraphQLType { /// An arbitrary function without meaning. /// /// May contain compile timed check logic which ensures that types are used correctly according /// to the [GraphQL specification][1]. /// - /// [1]: https://spec.graphql.org/June2018/ + /// [1]: https://spec.graphql.org/October2021 fn mark() {} } diff --git a/juniper/src/types/subscriptions.rs b/juniper/src/types/subscriptions.rs index e99a5aafa..29140579d 100644 --- a/juniper/src/types/subscriptions.rs +++ b/juniper/src/types/subscriptions.rs @@ -94,8 +94,8 @@ pub trait SubscriptionConnection: futures::Stream> /// /// See trait methods for more detailed explanation on how this trait works. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Subscription -/// [2]: https://spec.graphql.org/June2018/#sec-Objects +/// [1]: https://spec.graphql.org/October2021#sec-Subscription +/// [2]: https://spec.graphql.org/October2021#sec-Objects pub trait GraphQLSubscriptionValue: GraphQLValue + Sync where Self::TypeInfo: Sync, @@ -204,7 +204,7 @@ crate::sa::assert_obj_safe!(GraphQLSubscriptionValue: GraphQLSubscriptionValue + GraphQLType where diff --git a/juniper/src/value/scalar.rs b/juniper/src/value/scalar.rs index d14e8a6a7..d93b14fa9 100644 --- a/juniper/src/value/scalar.rs +++ b/juniper/src/value/scalar.rs @@ -228,20 +228,20 @@ pub trait ScalarValue: /// /// These types closely follow the [GraphQL specification][0]. /// -/// [0]: https://spec.graphql.org/June2018 +/// [0]: https://spec.graphql.org/October2021 #[derive(Clone, Debug, PartialEq, ScalarValue, Serialize)] #[serde(untagged)] pub enum DefaultScalarValue { /// [`Int` scalar][0] as a signed 32‐bit numeric non‐fractional value. /// - /// [0]: https://spec.graphql.org/June2018/#sec-Int + /// [0]: https://spec.graphql.org/October2021#sec-Int #[value(as_float, as_int)] Int(i32), /// [`Float` scalar][0] as a signed double‐precision fractional values as /// specified by [IEEE 754]. /// - /// [0]: https://spec.graphql.org/June2018/#sec-Float + /// [0]: https://spec.graphql.org/October2021#sec-Float /// [IEEE 754]: https://en.wikipedia.org/wiki/IEEE_floating_point #[value(as_float)] Float(f64), @@ -249,13 +249,13 @@ pub enum DefaultScalarValue { /// [`String` scalar][0] as a textual data, represented as UTF‐8 character /// sequences. /// - /// [0]: https://spec.graphql.org/June2018/#sec-String + /// [0]: https://spec.graphql.org/October2021#sec-String #[value(as_str, as_string, into_string)] String(String), /// [`Boolean` scalar][0] as a `true` or `false` value. /// - /// [0]: https://spec.graphql.org/June2018/#sec-Boolean + /// [0]: https://spec.graphql.org/October2021#sec-Boolean #[value(as_bool)] Boolean(bool), } diff --git a/juniper_codegen/src/common/field/arg.rs b/juniper_codegen/src/common/field/arg.rs index 9eeb72cf6..517c9eb4d 100644 --- a/juniper_codegen/src/common/field/arg.rs +++ b/juniper_codegen/src/common/field/arg.rs @@ -1,7 +1,7 @@ //! Common functions, definitions and extensions for parsing and code generation //! of [GraphQL arguments][1] //! -//! [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments. +//! [1]: https://spec.graphql.org/October2021#sec-Language.Arguments. use std::mem; @@ -29,7 +29,7 @@ use crate::{ /// Available metadata (arguments) behind `#[graphql]` attribute placed on a /// method argument, when generating code for [GraphQL argument][1]. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments +/// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments #[derive(Debug, Default)] pub(crate) struct Attr { /// Explicitly specified name of a [GraphQL argument][1] represented by this @@ -37,13 +37,13 @@ pub(crate) struct Attr { /// /// If [`None`], then `camelCased` Rust argument name is used by default. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments pub(crate) name: Option>, /// Explicitly specified [description][2] of this [GraphQL argument][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments - /// [2]: https://spec.graphql.org/June2018/#sec-Descriptions + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments + /// [2]: https://spec.graphql.org/October2021#sec-Descriptions pub(crate) description: Option>, /// Explicitly specified [default value][2] of this [GraphQL argument][1]. @@ -54,8 +54,8 @@ pub(crate) struct Attr { /// If [`None`], then this [GraphQL argument][1] is considered as /// [required][2]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments - /// [2]: https://spec.graphql.org/June2018/#sec-Required-Arguments + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments + /// [2]: https://spec.graphql.org/October2021#sec-Required-Arguments pub(crate) default: Option>>, /// Explicitly specified marker indicating that this method argument doesn't @@ -66,8 +66,8 @@ pub(crate) struct Attr { /// if it's named `context` or `ctx`. /// /// [`Context`]: juniper::Context - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments - /// [2]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments + /// [2]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) context: Option>, /// Explicitly specified marker indicating that this method argument doesn't @@ -78,8 +78,8 @@ pub(crate) struct Attr { /// if it's named `executor`. /// /// [`Executor`]: juniper::Executor - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments - /// [2]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments + /// [2]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) executor: Option>, } @@ -223,24 +223,24 @@ impl Attr { /// Representation of a [GraphQL field argument][1] for code generation. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments +/// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments #[derive(Debug)] pub(crate) struct OnField { /// Rust type that this [GraphQL field argument][1] is represented by. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments pub(crate) ty: syn::Type, /// Name of this [GraphQL field argument][2] in GraphQL schema. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments pub(crate) name: String, /// [Description][2] of this [GraphQL field argument][1] to put into GraphQL /// schema. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments - /// [2]: https://spec.graphql.org/June2018/#sec-Descriptions + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments + /// [2]: https://spec.graphql.org/October2021#sec-Descriptions pub(crate) description: Option, /// Default value of this [GraphQL field argument][1] in GraphQL schema. @@ -250,8 +250,8 @@ pub(crate) struct OnField { /// /// If inner [`Option`] is [`None`], then the [`Default`] value is used. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments - /// [2]: https://spec.graphql.org/June2018/#sec-Required-Arguments + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments + /// [2]: https://spec.graphql.org/October2021#sec-Required-Arguments pub(crate) default: Option>, } @@ -260,19 +260,19 @@ pub(crate) struct OnField { pub(crate) enum OnMethod { /// Regular [GraphQL field argument][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Arguments + /// [1]: https://spec.graphql.org/October2021#sec-Language.Arguments Regular(Box), /// [`Context`] passed into a [GraphQL field][2] resolving method. /// /// [`Context`]: juniper::Context - /// [2]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [2]: https://spec.graphql.org/October2021#sec-Language.Fields Context(Box), /// [`Executor`] passed into a [GraphQL field][2] resolving method. /// /// [`Executor`]: juniper::Executor - /// [2]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [2]: https://spec.graphql.org/October2021#sec-Language.Fields Executor, } diff --git a/juniper_codegen/src/common/field/mod.rs b/juniper_codegen/src/common/field/mod.rs index d9fc7526b..7487380e9 100644 --- a/juniper_codegen/src/common/field/mod.rs +++ b/juniper_codegen/src/common/field/mod.rs @@ -1,7 +1,7 @@ //! Common functions, definitions and extensions for parsing and code generation //! of [GraphQL fields][1] //! -//! [1]: https://spec.graphql.org/June2018/#sec-Language.Fields +//! [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) mod arg; @@ -30,14 +30,14 @@ pub(crate) use self::arg::OnMethod as MethodArgument; /// Available metadata (arguments) behind `#[graphql]` attribute placed on a /// [GraphQL field][1] definition. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields +/// [1]: https://spec.graphql.org/October2021#sec-Language.Fields #[derive(Debug, Default)] pub(crate) struct Attr { /// Explicitly specified name of this [GraphQL field][1]. /// /// If [`None`], then `camelCased` Rust method name is used by default. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) name: Option>, /// Explicitly specified [description][2] of this [GraphQL field][1]. @@ -45,8 +45,8 @@ pub(crate) struct Attr { /// If [`None`], then Rust doc comment will be used as the [description][2], /// if any. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields - /// [2]: https://spec.graphql.org/June2018/#sec-Descriptions + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields + /// [2]: https://spec.graphql.org/October2021#sec-Descriptions pub(crate) description: Option>, /// Explicitly specified [deprecation][2] of this [GraphQL field][1]. @@ -54,15 +54,15 @@ pub(crate) struct Attr { /// If [`None`], then Rust `#[deprecated]` attribute will be used as the /// [deprecation][2], if any. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields - /// [2]: https://spec.graphql.org/June2018/#sec-Deprecation + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields + /// [2]: https://spec.graphql.org/October2021#sec-Deprecation pub(crate) deprecated: Option>>, /// Explicitly specified marker indicating that this method (or struct /// field) should be omitted by code generation and not considered as the /// [GraphQL field][1] definition. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) ignore: Option>, } @@ -129,7 +129,7 @@ impl Attr { /// Parses [`Attr`] from the given multiple `name`d [`syn::Attribute`]s /// placed on a [GraphQL field][1] definition. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) fn from_attrs(name: &str, attrs: &[syn::Attribute]) -> syn::Result { let mut attr = filter_attrs(name, attrs) .map(|attr| attr.parse_args()) @@ -164,24 +164,24 @@ impl Attr { /// Representation of a [GraphQL field][1] for code generation. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields +/// [1]: https://spec.graphql.org/October2021#sec-Language.Fields #[derive(Debug)] pub(crate) struct Definition { /// Rust type that this [GraphQL field][1] is represented by (method return /// type or struct field type). /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) ty: syn::Type, /// Name of this [GraphQL field][1] in GraphQL schema. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) name: String, /// [Description][2] of this [GraphQL field][1] to put into GraphQL schema. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields - /// [2]: https://spec.graphql.org/June2018/#sec-Descriptions + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields + /// [2]: https://spec.graphql.org/October2021#sec-Descriptions pub(crate) description: Option, /// [Deprecation][2] of this [GraphQL field][1] to put into GraphQL schema. @@ -189,14 +189,14 @@ pub(crate) struct Definition { /// If inner [`Option`] is [`None`], then deprecation has no message /// attached. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields - /// [2]: https://spec.graphql.org/June2018/#sec-Deprecation + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields + /// [2]: https://spec.graphql.org/October2021#sec-Deprecation pub(crate) deprecated: Option>, /// Ident of the Rust method (or struct field) representing this /// [GraphQL field][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) ident: syn::Ident, /// Rust [`MethodArgument`]s required to call the method representing this @@ -205,19 +205,19 @@ pub(crate) struct Definition { /// If [`None`] then this [GraphQL field][1] is represented by a struct /// field. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) arguments: Option>, /// Indicator whether the Rust method representing this [GraphQL field][1] /// has a [`syn::Receiver`]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) has_receiver: bool, /// Indicator whether this [GraphQL field][1] should be resolved /// asynchronously. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) is_async: bool, } @@ -225,7 +225,7 @@ impl Definition { /// Indicates whether this [GraphQL field][1] is represented by a method, /// not a struct field. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields #[must_use] pub(crate) fn is_method(&self) -> bool { self.arguments.is_some() @@ -235,7 +235,7 @@ impl Definition { /// tried to be resolved in the [`GraphQLValue::resolve_field`] method. /// /// [`GraphQLValue::resolve_field`]: juniper::GraphQLValue::resolve_field - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields #[must_use] pub(crate) fn method_resolve_field_err_no_field_tokens( scalar: &scalar::Type, @@ -255,7 +255,7 @@ impl Definition { /// which performs static checks for this [GraphQL field][1]. /// /// [`marker::IsOutputType::mark`]: juniper::marker::IsOutputType::mark - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields #[must_use] pub(crate) fn method_mark_tokens( &self, @@ -291,7 +291,7 @@ impl Definition { /// /// [`GraphQLType::meta`]: juniper::GraphQLType::meta /// [`Registry`]: juniper::Registry - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields #[must_use] pub(crate) fn method_meta_tokens( &self, @@ -336,8 +336,8 @@ impl Definition { /// resolves this [GraphQL field][1] as [subscription][2]. /// /// [0]: juniper::GraphQLSubscriptionValue::resolve_field_into_stream - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields - /// [2]: https://spec.graphql.org/June2018/#sec-Subscription + /// [1]: https://spec.graphql.org/October2021#sec-Language.Fields + /// [2]: https://spec.graphql.org/October2021#sec-Subscription #[must_use] pub(crate) fn method_resolve_field_into_stream_tokens( &self, @@ -401,7 +401,7 @@ impl Definition { /// Checks whether all [GraphQL fields][1] fields have different names. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Language.Fields +/// [1]: https://spec.graphql.org/October2021#sec-Language.Fields #[must_use] pub(crate) fn all_different(fields: &[Definition]) -> bool { let mut names: Vec<_> = fields.iter().map(|f| &f.name).collect(); diff --git a/juniper_codegen/src/common/gen.rs b/juniper_codegen/src/common/gen.rs index dc5adc139..eccd52c74 100644 --- a/juniper_codegen/src/common/gen.rs +++ b/juniper_codegen/src/common/gen.rs @@ -8,7 +8,7 @@ use quote::quote; /// Value of a [GraphQL type][1] should be stored in a `res` binding in the generated code, before /// including this piece of code. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Types +/// [1]: https://spec.graphql.org/October2021#sec-Types pub(crate) fn sync_resolving_code() -> TokenStream { quote! { ::juniper::IntoResolvable::into(res, executor.context()) @@ -29,7 +29,7 @@ pub(crate) fn sync_resolving_code() -> TokenStream { /// /// [`Future`]: std::future::Future /// [`Future::Output`]: std::future::Future::Output -/// [1]: https://spec.graphql.org/June2018/#sec-Types +/// [1]: https://spec.graphql.org/October2021#sec-Types pub(crate) fn async_resolving_code(ty: Option<&syn::Type>) -> TokenStream { let ty = ty.map(|t| quote! { : #t }); diff --git a/juniper_codegen/src/common/parse/downcaster.rs b/juniper_codegen/src/common/parse/downcaster.rs index 89dd67cdc..2a4e13690 100644 --- a/juniper_codegen/src/common/parse/downcaster.rs +++ b/juniper_codegen/src/common/parse/downcaster.rs @@ -1,8 +1,8 @@ //! Common functions, definitions and extensions for parsing downcasting functions, used by GraphQL //! [interfaces][1] and [unions][2] definitions to downcast its type to a concrete implementer type. //! -//! [1]: https://spec.graphql.org/June2018/#sec-Interfaces -//! [2]: https://spec.graphql.org/June2018/#sec-Unions +//! [1]: https://spec.graphql.org/October2021#sec-Interfaces +//! [2]: https://spec.graphql.org/October2021#sec-Unions use proc_macro2::Span; use syn::{ext::IdentExt as _, spanned::Spanned as _}; diff --git a/juniper_codegen/src/graphql_interface/mod.rs b/juniper_codegen/src/graphql_interface/mod.rs index 18c3749d2..f8d98351e 100644 --- a/juniper_codegen/src/graphql_interface/mod.rs +++ b/juniper_codegen/src/graphql_interface/mod.rs @@ -1,6 +1,6 @@ //! Code generation for [GraphQL interface][1]. //! -//! [1]: https://spec.graphql.org/June2018/#sec-Interfaces +//! [1]: https://spec.graphql.org/October2021#sec-Interfaces pub mod attr; pub mod derive; @@ -35,7 +35,7 @@ use crate::{ /// on it and enum alias which generic arguments are filled with /// [GraphQL interface][1] implementers. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Interfaces +/// [1]: https://spec.graphql.org/October2021#sec-Interfaces fn enum_idents( trait_ident: &syn::Ident, alias_ident: Option<&syn::Ident>, @@ -54,14 +54,14 @@ fn enum_idents( /// trait or struct definition, when generating code for [GraphQL interface][1] /// type. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Interfaces +/// [1]: https://spec.graphql.org/October2021#sec-Interfaces #[derive(Debug, Default)] struct Attr { /// Explicitly specified name of [GraphQL interface][1] type. /// /// If [`None`], then Rust trait name is used by default. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces name: Option>, /// Explicitly specified [description][2] of [GraphQL interface][1] type. @@ -69,8 +69,8 @@ struct Attr { /// If [`None`], then Rust doc comment will be used as the [description][2], /// if any. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces - /// [2]: https://spec.graphql.org/June2018/#sec-Descriptions + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces + /// [2]: https://spec.graphql.org/October2021#sec-Descriptions description: Option>, /// Explicitly specified identifier of the type alias of Rust enum type @@ -79,14 +79,14 @@ struct Attr { /// /// If [`None`], then `{trait_name}Value` identifier will be used. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces r#enum: Option>, /// Explicitly specified Rust types of [GraphQL objects][2] or /// [interfaces][1] implementing this [GraphQL interface][1] type. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces - /// [2]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces + /// [2]: https://spec.graphql.org/October2021#sec-Objects implemented_for: HashSet>, /// Explicitly specified [GraphQL interfaces, implemented][1] by this @@ -102,7 +102,7 @@ struct Attr { /// If [`None`], then unit type `()` is assumed as a type of [`Context`]. /// /// [`Context`]: juniper::Context - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces context: Option>, /// Explicitly specified type (or type parameter with its bounds) of @@ -116,7 +116,7 @@ struct Attr { /// /// [`GraphQLType`]: juniper::GraphQLType /// [`ScalarValue`]: juniper::ScalarValue - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces scalar: Option>, /// Explicitly specified marker indicating that the Rust trait should be @@ -131,7 +131,7 @@ struct Attr { /// /// If [`None`] then the default rule will be [`RenameRule::CamelCase`]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces rename_fields: Option>, /// Indicator whether the generated code is intended to be used only inside @@ -277,18 +277,18 @@ impl Attr { /// Definition of [GraphQL interface][1] for code generation. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Interfaces +/// [1]: https://spec.graphql.org/October2021#sec-Interfaces struct Definition { /// [`syn::Generics`] of the trait or struct describing the /// [GraphQL interface][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces generics: syn::Generics, /// [`syn::Visibility`] of the trait or struct describing the /// [GraphQL interface][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces vis: syn::Visibility, /// Name of the generic enum describing all [`implementers`]. It's generic @@ -319,7 +319,7 @@ struct Definition { /// /// [`GraphQLType`]: juniper::GraphQLType /// [`Context`]: juniper::Context - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces context: syn::Type, /// [`ScalarValue`] parametrization to generate [`GraphQLType`] @@ -327,18 +327,18 @@ struct Definition { /// /// [`GraphQLType`]: juniper::GraphQLType /// [`ScalarValue`]: juniper::ScalarValue - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces scalar: scalar::Type, /// Defined [GraphQL fields][2] of this [GraphQL interface][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces - /// [2]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces + /// [2]: https://spec.graphql.org/October2021#sec-Language.Fields fields: Vec, /// Defined [`Implementer`]s of this [GraphQL interface][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces implemented_for: Vec, /// [GraphQL interfaces implemented][1] by this [GraphQL interface][0]. @@ -352,7 +352,7 @@ struct Definition { /// [GraphQL interface][1]. We generate hacky `const` which doesn't actually /// use it, but suppresses this warning. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces suppress_dead_code: Option<(syn::Ident, syn::Fields)>, /// Intra-doc link to the [`syn::Item`] defining this @@ -440,13 +440,13 @@ impl Definition { "Enum building an opaque value represented by [`{}`]({}) \ [GraphQL interface][0].\ \n\n\ - [0]: https://spec.graphql.org/June2018/#sec-Interfaces", + [0]: https://spec.graphql.org/October2021#sec-Interfaces", self.name, self.src_intra_doc_link, ); let enum_alias_doc = format!( "Opaque value represented by [`{}`]({}) [GraphQL interface][0].\ \n\n\ - [0]: https://spec.graphql.org/June2018/#sec-Interfaces", + [0]: https://spec.graphql.org/October2021#sec-Interfaces", self.name, self.src_intra_doc_link, ); @@ -513,7 +513,7 @@ impl Definition { /// [GraphQL interface][1]. /// /// [`GraphQLInterface`]: juniper::GraphQLInterface - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces #[must_use] fn impl_graphql_interface_tokens(&self) -> TokenStream { let ty = &self.enum_alias_ident; @@ -603,7 +603,7 @@ impl Definition { /// this [GraphQL interface][1]. /// /// [`marker::IsOutputType`]: juniper::marker::IsOutputType - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces #[must_use] fn impl_output_type_tokens(&self) -> TokenStream { let ty = &self.enum_alias_ident; @@ -679,7 +679,7 @@ impl Definition { /// [GraphQL interface][1]. /// /// [`GraphQLType`]: juniper::GraphQLType - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces #[must_use] fn impl_graphql_type_tokens(&self) -> TokenStream { let ty = &self.enum_alias_ident; @@ -753,7 +753,7 @@ impl Definition { /// [GraphQL interface][1]. /// /// [`GraphQLValue`]: juniper::GraphQLValue - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces #[must_use] fn impl_graphql_value_tokens(&self) -> TokenStream { let ty = &self.enum_alias_ident; @@ -835,7 +835,7 @@ impl Definition { /// [GraphQL interface][1]. /// /// [`GraphQLValueAsync`]: juniper::GraphQLValueAsync - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces #[must_use] fn impl_graphql_value_async_tokens(&self) -> TokenStream { let ty = &self.enum_alias_ident; @@ -901,7 +901,7 @@ impl Definition { /// [`BaseType`]: juniper::macros::reflect::BaseType /// [`Fields`]: juniper::macros::reflect::Fields /// [`WrappedType`]: juniper::macros::reflect::WrappedType - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces #[must_use] fn impl_reflection_traits_tokens(&self) -> TokenStream { let ty = &self.enum_alias_ident; @@ -966,7 +966,7 @@ impl Definition { /// [GraphQL interface][1]. /// /// [`FieldMeta`]: juniper::macros::reflect::FieldMeta - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces fn impl_field_meta_tokens(&self) -> TokenStream { let ty = &self.enum_alias_ident; let context = &self.context; @@ -1027,7 +1027,7 @@ impl Definition { /// this [GraphQL interface][1]. /// /// [`Field`]: juniper::macros::reflect::Field - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces fn impl_field_tokens(&self) -> TokenStream { let ty = &self.enum_alias_ident; let scalar = &self.scalar; @@ -1107,7 +1107,7 @@ impl Definition { /// of this [GraphQL interface][1]. /// /// [`AsyncField`]: juniper::macros::reflect::AsyncField - /// [1]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Interfaces fn impl_async_field_tokens(&self) -> TokenStream { let ty = &self.enum_alias_ident; let scalar = &self.scalar; diff --git a/juniper_codegen/src/graphql_object/mod.rs b/juniper_codegen/src/graphql_object/mod.rs index 88afd9964..4f20df2a3 100644 --- a/juniper_codegen/src/graphql_object/mod.rs +++ b/juniper_codegen/src/graphql_object/mod.rs @@ -1,6 +1,6 @@ //! Code generation for [GraphQL object][1]. //! -//! [1]: https://spec.graphql.org/June2018/#sec-Objects +//! [1]: https://spec.graphql.org/October2021#sec-Objects pub mod attr; pub mod derive; @@ -32,14 +32,14 @@ use syn::ext::IdentExt; /// Available arguments behind `#[graphql]` (or `#[graphql_object]`) attribute /// when generating code for [GraphQL object][1] type. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Objects +/// [1]: https://spec.graphql.org/October2021#sec-Objects #[derive(Debug, Default)] pub(crate) struct Attr { /// Explicitly specified name of this [GraphQL object][1] type. /// /// If [`None`], then Rust type name is used by default. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) name: Option>, /// Explicitly specified [description][2] of this [GraphQL object][1] type. @@ -47,8 +47,8 @@ pub(crate) struct Attr { /// If [`None`], then Rust doc comment will be used as the [description][2], /// if any. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects - /// [2]: https://spec.graphql.org/June2018/#sec-Descriptions + /// [1]: https://spec.graphql.org/October2021#sec-Objects + /// [2]: https://spec.graphql.org/October2021#sec-Descriptions pub(crate) description: Option>, /// Explicitly specified type of [`Context`] to use for resolving this @@ -57,7 +57,7 @@ pub(crate) struct Attr { /// If [`None`], then unit type `()` is assumed as a type of [`Context`]. /// /// [`Context`]: juniper::Context - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) context: Option>, /// Explicitly specified type (or type parameter with its bounds) of @@ -71,14 +71,14 @@ pub(crate) struct Attr { /// /// [`GraphQLType`]: juniper::GraphQLType /// [`ScalarValue`]: juniper::ScalarValue - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) scalar: Option>, /// Explicitly specified [GraphQL interfaces][2] this [GraphQL object][1] /// type implements. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects - /// [2]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Objects + /// [2]: https://spec.graphql.org/October2021#sec-Interfaces pub(crate) interfaces: HashSet>, /// Explicitly specified [`RenameRule`] for all fields of this @@ -86,7 +86,7 @@ pub(crate) struct Attr { /// /// If [`None`] then the default rule will be [`RenameRule::CamelCase`]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) rename_fields: Option>, /// Indicator whether the generated code is intended to be used only inside @@ -204,30 +204,30 @@ impl Attr { /// Definition of [GraphQL object][1] for code generation. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Objects +/// [1]: https://spec.graphql.org/October2021#sec-Objects #[derive(Debug)] pub(crate) struct Definition { /// Name of this [GraphQL object][1] in GraphQL schema. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) name: String, /// Rust type that this [GraphQL object][1] is represented with. /// /// It should contain all its generics, if any. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) ty: syn::Type, /// Generics of the Rust type that this [GraphQL object][1] is implemented /// for. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) generics: syn::Generics, /// Description of this [GraphQL object][1] to put into GraphQL schema. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) description: Option, /// Rust type of [`Context`] to generate [`GraphQLType`] implementation with @@ -235,7 +235,7 @@ pub(crate) struct Definition { /// /// [`GraphQLType`]: juniper::GraphQLType /// [`Context`]: juniper::Context - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) context: syn::Type, /// [`ScalarValue`] parametrization to generate [`GraphQLType`] @@ -243,28 +243,28 @@ pub(crate) struct Definition { /// /// [`GraphQLType`]: juniper::GraphQLType /// [`ScalarValue`]: juniper::ScalarValue - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects pub(crate) scalar: scalar::Type, /// Defined [GraphQL fields][2] of this [GraphQL object][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects - /// [2]: https://spec.graphql.org/June2018/#sec-Language.Fields + /// [1]: https://spec.graphql.org/October2021#sec-Objects + /// [2]: https://spec.graphql.org/October2021#sec-Language.Fields pub(crate) fields: Vec, /// [GraphQL interfaces][2] implemented by this [GraphQL object][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Objects - /// [2]: https://spec.graphql.org/June2018/#sec-Interfaces + /// [1]: https://spec.graphql.org/October2021#sec-Objects + /// [2]: https://spec.graphql.org/October2021#sec-Interfaces pub(crate) interfaces: HashSet, /// [GraphQL operation][1] this [`Definition`] should generate code for. /// /// Either [GraphQL query][2] or [GraphQL subscription][3]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Language.Operations - /// [2]: https://spec.graphql.org/June2018/#sec-Query - /// [3]: https://spec.graphql.org/June2018/#sec-Subscription + /// [1]: https://spec.graphql.org/October2021#sec-Language.Operations + /// [2]: https://spec.graphql.org/October2021#sec-Query + /// [3]: https://spec.graphql.org/October2021#sec-Subscription pub(crate) _operation: PhantomData>, } @@ -277,7 +277,7 @@ impl Definition { /// /// [`GraphQLAsyncValue`]: juniper::GraphQLAsyncValue /// [`GraphQLType`]: juniper::GraphQLType - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] pub(crate) fn impl_generics(&self, for_async: bool) -> (TokenStream, Option) { let mut generics = self.generics.clone(); @@ -334,7 +334,7 @@ impl Definition { /// this [GraphQL object][1]. /// /// [`marker::IsOutputType`]: juniper::marker::IsOutputType - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] pub(crate) fn impl_output_type_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -369,7 +369,7 @@ impl Definition { /// [`BaseType`]: juniper::macros::reflect::BaseType /// [`Fields`]: juniper::macros::reflect::Fields /// [`WrappedType`]: juniper::macros::reflect::WrappedType - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] pub(crate) fn impl_reflection_traits_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -428,7 +428,7 @@ impl Definition { /// [GraphQL object][1]. /// /// [`GraphQLType`]: juniper::GraphQLType - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] pub(crate) fn impl_graphql_type_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -491,7 +491,7 @@ impl Definition { /// [GraphQL query operation][2] of the [`Definition`] to generate code for. /// -/// [2]: https://spec.graphql.org/June2018/#sec-Query +/// [2]: https://spec.graphql.org/October2021#sec-Query struct Query; impl ToTokens for Definition { @@ -513,7 +513,7 @@ impl Definition { /// [GraphQL object][1]. /// /// [`GraphQLObject`]: juniper::GraphQLObject - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] fn impl_graphql_object_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -561,7 +561,7 @@ impl Definition { /// of this [GraphQL object][1]. /// /// [`FieldMeta`]: juniper::FieldMeta - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] fn impl_field_meta_tokens(&self) -> TokenStream { let impl_ty = &self.ty; @@ -622,7 +622,7 @@ impl Definition { /// this [GraphQL object][1]. /// /// [`Field`]: juniper::Field - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] fn impl_field_tokens(&self) -> TokenStream { let (impl_ty, scalar) = (&self.ty, &self.scalar); @@ -695,7 +695,7 @@ impl Definition { /// of this [GraphQL object][1]. /// /// [`AsyncField`]: juniper::AsyncField - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] fn impl_async_field_tokens(&self) -> TokenStream { let (impl_ty, scalar) = (&self.ty, &self.scalar); @@ -757,7 +757,7 @@ impl Definition { /// [GraphQL object][1]. /// /// [`GraphQLValue`]: juniper::GraphQLValue - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] fn impl_graphql_value_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -824,7 +824,7 @@ impl Definition { /// [GraphQL object][1]. /// /// [`GraphQLValueAsync`]: juniper::GraphQLValueAsync - /// [1]: https://spec.graphql.org/June2018/#sec-Objects + /// [1]: https://spec.graphql.org/October2021#sec-Objects #[must_use] fn impl_graphql_value_async_tokens(&self) -> TokenStream { let scalar = &self.scalar; diff --git a/juniper_codegen/src/graphql_subscription/mod.rs b/juniper_codegen/src/graphql_subscription/mod.rs index 3c07c9ae9..a326e52d5 100644 --- a/juniper_codegen/src/graphql_subscription/mod.rs +++ b/juniper_codegen/src/graphql_subscription/mod.rs @@ -1,6 +1,6 @@ //! Code generation for [GraphQL subscription][1]. //! -//! [1]: https://spec.graphql.org/June2018/#sec-Subscription +//! [1]: https://spec.graphql.org/October2021#sec-Subscription pub mod attr; @@ -13,7 +13,7 @@ use crate::{common::field, graphql_object::Definition}; /// [GraphQL subscription operation][2] of the [`Definition`] to generate code /// for. /// -/// [2]: https://spec.graphql.org/June2018/#sec-Subscription +/// [2]: https://spec.graphql.org/October2021#sec-Subscription struct Subscription; impl ToTokens for Definition { @@ -31,7 +31,7 @@ impl Definition { /// [GraphQL subscription][1]. /// /// [`GraphQLValue`]: juniper::GraphQLValue - /// [1]: https://spec.graphql.org/June2018/#sec-Subscription + /// [1]: https://spec.graphql.org/October2021#sec-Subscription #[must_use] fn impl_graphql_value_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -80,7 +80,7 @@ impl Definition { /// for this [GraphQL subscription][1]. /// /// [`GraphQLSubscriptionValue`]: juniper::GraphQLSubscriptionValue - /// [1]: https://spec.graphql.org/June2018/#sec-Subscription + /// [1]: https://spec.graphql.org/October2021#sec-Subscription #[must_use] fn impl_graphql_subscription_value_tokens(&self) -> TokenStream { let scalar = &self.scalar; diff --git a/juniper_codegen/src/graphql_union/attr.rs b/juniper_codegen/src/graphql_union/attr.rs index ae2be4db4..fb9c29140 100644 --- a/juniper_codegen/src/graphql_union/attr.rs +++ b/juniper_codegen/src/graphql_union/attr.rs @@ -112,7 +112,7 @@ fn expand_on_trait( /// On failure returns [`None`] and internally fills up [`proc_macro_error`] /// with the corresponding errors. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions fn parse_variant_from_trait_method( method: &mut syn::TraitItemMethod, trait_ident: &syn::Ident, diff --git a/juniper_codegen/src/graphql_union/derive.rs b/juniper_codegen/src/graphql_union/derive.rs index 1c1bc5c1d..de6eb4957 100644 --- a/juniper_codegen/src/graphql_union/derive.rs +++ b/juniper_codegen/src/graphql_union/derive.rs @@ -98,7 +98,7 @@ fn expand_enum(ast: syn::DeriveInput) -> syn::Result { /// On failure returns [`None`] and internally fills up [`proc_macro_error`] /// with the corresponding errors. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions fn parse_variant_from_enum_variant( var: syn::Variant, enum_ident: &syn::Ident, diff --git a/juniper_codegen/src/graphql_union/mod.rs b/juniper_codegen/src/graphql_union/mod.rs index c59b67321..34984ee84 100644 --- a/juniper_codegen/src/graphql_union/mod.rs +++ b/juniper_codegen/src/graphql_union/mod.rs @@ -1,6 +1,6 @@ //! Code generation for [GraphQL union][1]. //! -//! [1]: https://spec.graphql.org/June2018/#sec-Unions +//! [1]: https://spec.graphql.org/October2021#sec-Unions pub mod attr; pub mod derive; @@ -35,14 +35,14 @@ type AttrResolvers = HashMap>; /// Available arguments behind `#[graphql]` (or `#[graphql_union]`) attribute /// when generating code for [GraphQL union][1] type. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions #[derive(Debug, Default)] struct Attr { /// Explicitly specified name of [GraphQL union][1] type. /// /// If [`None`], then Rust type name is used by default. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions name: Option>, /// Explicitly specified [description][2] of [GraphQL union][1] type. @@ -50,8 +50,8 @@ struct Attr { /// If [`None`], then Rust doc comment will be used as the [description][2], /// if any. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions - /// [2]: https://spec.graphql.org/June2018/#sec-Descriptions + /// [1]: https://spec.graphql.org/October2021#sec-Unions + /// [2]: https://spec.graphql.org/October2021#sec-Descriptions description: Option>, /// Explicitly specified type of [`Context`] to use for resolving this @@ -60,7 +60,7 @@ struct Attr { /// If [`None`], then unit type `()` is assumed as a type of [`Context`]. /// /// [`Context`]: juniper::Context - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions context: Option>, /// Explicitly specified type of [`ScalarValue`] to use for resolving this @@ -74,7 +74,7 @@ struct Attr { /// /// [`GraphQLType`]: juniper::GraphQLType /// [`ScalarValue`]: juniper::ScalarValue - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions scalar: Option>, /// Explicitly specified external resolver functions for [GraphQL union][1] @@ -85,7 +85,7 @@ struct Attr { /// external resolver function has sense, when some custom [union][1] /// variant resolving logic is involved, or variants cannot be inferred. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions external_resolvers: AttrResolvers, /// Indicator whether the generated code is intended to be used only inside @@ -192,13 +192,13 @@ impl Attr { /// Available arguments behind `#[graphql]` attribute when generating code for /// [GraphQL union][1]'s variant. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions #[derive(Debug, Default)] struct VariantAttr { /// Explicitly specified marker for the variant/field being ignored and not /// included into [GraphQL union][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions ignore: Option>, /// Explicitly specified external resolver function for this [GraphQL union][1] variant. @@ -207,7 +207,7 @@ struct VariantAttr { /// Usually, specifying an external resolver function has sense, when some custom resolving /// logic is involved. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions external_resolver: Option>, } @@ -259,22 +259,22 @@ impl VariantAttr { /// Definition of [GraphQL union][1] for code generation. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions struct Definition { /// Name of this [GraphQL union][1] in GraphQL schema. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions name: String, /// Rust type that this [GraphQL union][1] is represented with. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions ty: syn::Type, /// Generics of the Rust type that this [GraphQL union][1] is implemented /// for. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions generics: syn::Generics, /// Indicator whether code should be generated for a trait object, rather @@ -283,7 +283,7 @@ struct Definition { /// Description of this [GraphQL union][1] to put into GraphQL schema. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions description: Option, /// Rust type of [`Context`] to generate [`GraphQLType`] implementation with @@ -291,7 +291,7 @@ struct Definition { /// /// [`Context`]: juniper::Context /// [`GraphQLType`]: juniper::GraphQLType - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions context: syn::Type, /// Rust type of [`ScalarValue`] to generate [`GraphQLType`] implementation @@ -305,12 +305,12 @@ struct Definition { /// /// [`GraphQLType`]: juniper::GraphQLType /// [`ScalarValue`]: juniper::ScalarValue - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions scalar: scalar::Type, /// Variants definitions of this [GraphQL union][1]. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions variants: Vec, } @@ -334,7 +334,7 @@ impl Definition { /// /// [`GraphQLAsyncValue`]: juniper::GraphQLAsyncValue /// [`GraphQLType`]: juniper::GraphQLType - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions #[must_use] fn impl_generics( &self, @@ -411,7 +411,7 @@ impl Definition { /// [GraphQL union][1]. /// /// [`GraphQLUnion`]: juniper::GraphQLUnion - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions #[must_use] fn impl_graphql_union_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -439,7 +439,7 @@ impl Definition { /// this [GraphQL union][1]. /// /// [`marker::IsOutputType`]: juniper::marker::IsOutputType - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions #[must_use] fn impl_output_type_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -463,7 +463,7 @@ impl Definition { /// [GraphQL union][1]. /// /// [`GraphQLType`]: juniper::GraphQLType - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions #[must_use] fn impl_graphql_type_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -507,7 +507,7 @@ impl Definition { /// [GraphQL union][1]. /// /// [`GraphQLValue`]: juniper::GraphQLValue - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions #[must_use] fn impl_graphql_value_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -574,7 +574,7 @@ impl Definition { /// [GraphQL union][1]. /// /// [`GraphQLValueAsync`]: juniper::GraphQLValueAsync - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions #[must_use] fn impl_graphql_value_async_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -618,7 +618,7 @@ impl Definition { /// [`BaseSubTypes`]: juniper::macros::reflect::BaseSubTypes /// [`BaseType`]: juniper::macros::reflect::BaseType /// [`WrappedType`]: juniper::macros::reflect::WrappedType - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions #[must_use] pub(crate) fn impl_reflection_traits_tokens(&self) -> TokenStream { let scalar = &self.scalar; @@ -659,22 +659,22 @@ impl Definition { /// Definition of [GraphQL union][1] variant for code generation. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions struct VariantDefinition { /// Rust type that this [GraphQL union][1] variant resolves into. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions ty: syn::Type, /// Rust code for value resolution of this [GraphQL union][1] variant. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions resolver_code: syn::Expr, /// Rust code for checking whether [GraphQL union][1] should be resolved /// into this variant. /// - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions resolver_check: syn::Expr, /// Rust type of [`Context`] that this [GraphQL union][1] variant requires @@ -684,7 +684,7 @@ struct VariantDefinition { /// trait method contains context argument. /// /// [`Context`]: juniper::Context - /// [1]: https://spec.graphql.org/June2018/#sec-Unions + /// [1]: https://spec.graphql.org/October2021#sec-Unions context: Option, } @@ -763,7 +763,7 @@ impl VariantDefinition { /// If duplication happens, then resolving code is overwritten with the one from /// `external_resolvers`. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions fn emerge_union_variants_from_attr( variants: &mut Vec, external_resolvers: AttrResolvers, @@ -810,7 +810,7 @@ fn emerge_union_variants_from_attr( /// used to enforce this requirement in the generated code. However, due to the /// bad error message this implementation should stay and provide guidance. /// -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions /// [2]: juniper::sa::assert_type_ne_all fn all_variants_different(variants: &[VariantDefinition]) -> bool { let mut types: Vec<_> = variants.iter().map(|var| &var.ty).collect(); diff --git a/juniper_codegen/src/lib.rs b/juniper_codegen/src/lib.rs index b0eeb0536..3158aa0d1 100644 --- a/juniper_codegen/src/lib.rs +++ b/juniper_codegen/src/lib.rs @@ -1287,8 +1287,8 @@ pub fn derive_scalar_value(input: TokenStream) -> TokenStream { /// [`Context`]: juniper::Context /// [`Executor`]: juniper::Executor /// [`ScalarValue`]: juniper::ScalarValue -/// [0]: https://spec.graphql.org/June2018 -/// [1]: https://spec.graphql.org/June2018/#sec-Interfaces +/// [0]: https://spec.graphql.org/October2021 +/// [1]: https://spec.graphql.org/October2021#sec-Interfaces /// [2]: https://doc.rust-lang.org/stable/reference/items/traits.html#object-safety /// [3]: https://doc.rust-lang.org/stable/reference/types/trait-object.html /// [4]: https://doc.rust-lang.org/stable/std/primitive.unit.html @@ -1328,7 +1328,7 @@ pub fn graphql_interface(attr: TokenStream, body: TokenStream) -> TokenStream { /// For more info and possibilities see [`#[graphql_interface]`] macro. /// /// [`#[graphql_interface]`]: crate::graphql_interface -/// [1]: https://spec.graphql.org/June2018/#sec-Interfaces +/// [1]: https://spec.graphql.org/October2021#sec-Interfaces #[proc_macro_error] #[proc_macro_derive(GraphQLInterface, attributes(graphql))] pub fn derive_interface(body: TokenStream) -> TokenStream { @@ -1465,7 +1465,7 @@ pub fn derive_interface(body: TokenStream) -> TokenStream { /// ``` /// /// [`ScalarValue`]: juniper::ScalarValue -/// [1]: https://spec.graphql.org/June2018/#sec-Objects +/// [1]: https://spec.graphql.org/October2021#sec-Objects #[proc_macro_error] #[proc_macro_derive(GraphQLObject, attributes(graphql))] pub fn derive_object(body: TokenStream) -> TokenStream { @@ -1789,8 +1789,8 @@ pub fn derive_object(body: TokenStream) -> TokenStream { /// [`GraphQLType`]: juniper::GraphQLType /// [`GraphQLValue`]: juniper::GraphQLValue /// [`ScalarValue`]: juniper::ScalarValue -/// [0]: https://spec.graphql.org/June2018 -/// [1]: https://spec.graphql.org/June2018/#sec-Objects +/// [0]: https://spec.graphql.org/October2021 +/// [1]: https://spec.graphql.org/October2021#sec-Objects #[proc_macro_error] #[proc_macro_attribute] pub fn graphql_object(attr: TokenStream, body: TokenStream) -> TokenStream { @@ -1843,7 +1843,7 @@ pub fn graphql_object(attr: TokenStream, body: TokenStream) -> TokenStream { /// [`GraphQLType`]: juniper::GraphQLType /// [`GraphQLSubscriptionValue`]: juniper::GraphQLSubscriptionValue /// [`Stream`]: futures::Stream -/// [1]: https://spec.graphql.org/June2018/#sec-Subscription +/// [1]: https://spec.graphql.org/October2021#sec-Subscription #[proc_macro_error] #[proc_macro_attribute] pub fn graphql_subscription(attr: TokenStream, body: TokenStream) -> TokenStream { @@ -2150,7 +2150,7 @@ pub fn graphql_subscription(attr: TokenStream, body: TokenStream) -> TokenStream /// /// [`Context`]: juniper::Context /// [`ScalarValue`]: juniper::ScalarValue -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions /// [4]: https://doc.rust-lang.org/stable/std/primitive.unit.html #[proc_macro_error] #[proc_macro_derive(GraphQLUnion, attributes(graphql))] @@ -2440,7 +2440,7 @@ pub fn derive_union(body: TokenStream) -> TokenStream { /// /// [`Context`]: juniper::Context /// [`ScalarValue`]: juniper::ScalarValue -/// [1]: https://spec.graphql.org/June2018/#sec-Unions +/// [1]: https://spec.graphql.org/October2021#sec-Unions /// [2]: https://doc.rust-lang.org/stable/reference/items/traits.html#object-safety /// [3]: https://doc.rust-lang.org/stable/reference/types/trait-object.html /// [4]: https://doc.rust-lang.org/stable/std/primitive.unit.html diff --git a/juniper_codegen/src/result.rs b/juniper_codegen/src/result.rs index 9ec3793b5..24a0fa8f4 100644 --- a/juniper_codegen/src/result.rs +++ b/juniper_codegen/src/result.rs @@ -5,8 +5,8 @@ use std::fmt; use proc_macro2::Span; use proc_macro_error::{Diagnostic, Level}; -/// URL of the GraphQL specification (June 2018 Edition). -pub const SPEC_URL: &str = "https://spec.graphql.org/June2018/"; +/// URL of the GraphQL specification (October 2021 Edition). +pub const SPEC_URL: &str = "https://spec.graphql.org/October2021"; pub enum GraphQLScope { EnumDerive, diff --git a/tests/codegen/fail/enum/derive_name_double_underscored.stderr b/tests/codegen/fail/enum/derive_name_double_underscored.stderr index 6b00b6bd0..36955ef36 100644 --- a/tests/codegen/fail/enum/derive_name_double_underscored.stderr +++ b/tests/codegen/fail/enum/derive_name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 4 | enum __Test { | ^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/enum/derive_variant_with_field.stderr b/tests/codegen/fail/enum/derive_variant_with_field.stderr index 96cae1a79..be3bc256a 100644 --- a/tests/codegen/fail/enum/derive_variant_with_field.stderr +++ b/tests/codegen/fail/enum/derive_variant_with_field.stderr @@ -4,4 +4,4 @@ error: GraphQL enum no fields allowed for non-ignored variants 5 | Variant(i32), | ^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Enums + = note: https://spec.graphql.org/October2021#sec-Enums diff --git a/tests/codegen/fail/input-object/derive_no_underscore.stderr b/tests/codegen/fail/input-object/derive_no_underscore.stderr index b30b8aa9d..98deeaa19 100644 --- a/tests/codegen/fail/input-object/derive_no_underscore.stderr +++ b/tests/codegen/fail/input-object/derive_no_underscore.stderr @@ -5,4 +5,4 @@ error: All types and directives defined within a schema must not have a name whi 6 | | test: String, | |________________^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/interface/struct/attr_field_double_underscored.stderr b/tests/codegen/fail/interface/struct/attr_field_double_underscored.stderr index 31648f4e1..85e575649 100644 --- a/tests/codegen/fail/interface/struct/attr_field_double_underscored.stderr +++ b/tests/codegen/fail/interface/struct/attr_field_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 5 | __id: String, | ^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/interface/struct/attr_fields_duplicate.stderr b/tests/codegen/fail/interface/struct/attr_fields_duplicate.stderr index b6a25f246..109f2b7c6 100644 --- a/tests/codegen/fail/interface/struct/attr_fields_duplicate.stderr +++ b/tests/codegen/fail/interface/struct/attr_fields_duplicate.stderr @@ -9,4 +9,4 @@ error: GraphQL interface must have a different name for each field 9 | | } | |_^ | - = note: https://spec.graphql.org/June2018/#sec-Interfaces + = note: https://spec.graphql.org/October2021#sec-Interfaces diff --git a/tests/codegen/fail/interface/struct/attr_name_double_underscored.stderr b/tests/codegen/fail/interface/struct/attr_name_double_underscored.stderr index 15db17f68..df34c85e0 100644 --- a/tests/codegen/fail/interface/struct/attr_name_double_underscored.stderr +++ b/tests/codegen/fail/interface/struct/attr_name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 4 | struct __Character { | ^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/interface/struct/attr_no_fields.stderr b/tests/codegen/fail/interface/struct/attr_no_fields.stderr index 6920674e2..f8fc279a2 100644 --- a/tests/codegen/fail/interface/struct/attr_no_fields.stderr +++ b/tests/codegen/fail/interface/struct/attr_no_fields.stderr @@ -4,4 +4,4 @@ error: GraphQL interface must have at least one field 4 | struct Character {} | ^^^^^^^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Interfaces + = note: https://spec.graphql.org/October2021#sec-Interfaces diff --git a/tests/codegen/fail/interface/struct/attr_unnamed_field.stderr b/tests/codegen/fail/interface/struct/attr_unnamed_field.stderr index 6fa918e25..6ad849690 100644 --- a/tests/codegen/fail/interface/struct/attr_unnamed_field.stderr +++ b/tests/codegen/fail/interface/struct/attr_unnamed_field.stderr @@ -4,4 +4,4 @@ error: GraphQL interface expected named struct field 4 | struct Character(i32); | ^^^ | - = note: https://spec.graphql.org/June2018/#sec-Interfaces + = note: https://spec.graphql.org/October2021#sec-Interfaces diff --git a/tests/codegen/fail/interface/struct/derive_field_double_underscored.stderr b/tests/codegen/fail/interface/struct/derive_field_double_underscored.stderr index 37b88b689..f8330549c 100644 --- a/tests/codegen/fail/interface/struct/derive_field_double_underscored.stderr +++ b/tests/codegen/fail/interface/struct/derive_field_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 5 | __id: String, | ^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/interface/struct/derive_fields_duplicate.stderr b/tests/codegen/fail/interface/struct/derive_fields_duplicate.stderr index a00789895..63d03bc9a 100644 --- a/tests/codegen/fail/interface/struct/derive_fields_duplicate.stderr +++ b/tests/codegen/fail/interface/struct/derive_fields_duplicate.stderr @@ -9,4 +9,4 @@ error: GraphQL interface must have a different name for each field 9 | | } | |_^ | - = note: https://spec.graphql.org/June2018/#sec-Interfaces + = note: https://spec.graphql.org/October2021#sec-Interfaces diff --git a/tests/codegen/fail/interface/struct/derive_name_double_underscored.stderr b/tests/codegen/fail/interface/struct/derive_name_double_underscored.stderr index 0996adac9..9b41f141b 100644 --- a/tests/codegen/fail/interface/struct/derive_name_double_underscored.stderr +++ b/tests/codegen/fail/interface/struct/derive_name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 4 | struct __Character { | ^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/interface/struct/derive_no_fields.stderr b/tests/codegen/fail/interface/struct/derive_no_fields.stderr index d0718a6de..742c337a9 100644 --- a/tests/codegen/fail/interface/struct/derive_no_fields.stderr +++ b/tests/codegen/fail/interface/struct/derive_no_fields.stderr @@ -4,4 +4,4 @@ error: GraphQL interface must have at least one field 4 | struct Character {} | ^^^^^^^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Interfaces + = note: https://spec.graphql.org/October2021#sec-Interfaces diff --git a/tests/codegen/fail/interface/struct/derive_unnamed_field.stderr b/tests/codegen/fail/interface/struct/derive_unnamed_field.stderr index 8a826c10c..9783cb53d 100644 --- a/tests/codegen/fail/interface/struct/derive_unnamed_field.stderr +++ b/tests/codegen/fail/interface/struct/derive_unnamed_field.stderr @@ -4,4 +4,4 @@ error: GraphQL interface expected named struct field 4 | struct Character(i32); | ^^^ | - = note: https://spec.graphql.org/June2018/#sec-Interfaces + = note: https://spec.graphql.org/October2021#sec-Interfaces diff --git a/tests/codegen/fail/interface/trait/argument_double_underscored.stderr b/tests/codegen/fail/interface/trait/argument_double_underscored.stderr index 817231404..4cf82f0a2 100644 --- a/tests/codegen/fail/interface/trait/argument_double_underscored.stderr +++ b/tests/codegen/fail/interface/trait/argument_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 5 | fn id(&self, __num: i32) -> &str; | ^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/interface/trait/field_double_underscored.stderr b/tests/codegen/fail/interface/trait/field_double_underscored.stderr index 979daae6a..3069e574e 100644 --- a/tests/codegen/fail/interface/trait/field_double_underscored.stderr +++ b/tests/codegen/fail/interface/trait/field_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 5 | fn __id(&self) -> &str; | ^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/interface/trait/fields_duplicate.stderr b/tests/codegen/fail/interface/trait/fields_duplicate.stderr index e7fc50807..4750e9589 100644 --- a/tests/codegen/fail/interface/trait/fields_duplicate.stderr +++ b/tests/codegen/fail/interface/trait/fields_duplicate.stderr @@ -9,4 +9,4 @@ error: GraphQL interface must have a different name for each field 9 | | } | |_^ | - = note: https://spec.graphql.org/June2018/#sec-Interfaces + = note: https://spec.graphql.org/October2021#sec-Interfaces diff --git a/tests/codegen/fail/interface/trait/method_default_impl.stderr b/tests/codegen/fail/interface/trait/method_default_impl.stderr index b95687d48..0e95cc3d3 100644 --- a/tests/codegen/fail/interface/trait/method_default_impl.stderr +++ b/tests/codegen/fail/interface/trait/method_default_impl.stderr @@ -7,4 +7,4 @@ error: GraphQL interface trait method can't have default implementation 7 | | } | |_____^ | - = note: https://spec.graphql.org/June2018/#sec-Interfaces + = note: https://spec.graphql.org/October2021#sec-Interfaces diff --git a/tests/codegen/fail/interface/trait/name_double_underscored.stderr b/tests/codegen/fail/interface/trait/name_double_underscored.stderr index 1fa999a49..356402407 100644 --- a/tests/codegen/fail/interface/trait/name_double_underscored.stderr +++ b/tests/codegen/fail/interface/trait/name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 4 | trait __Character { | ^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/interface/trait/no_fields.stderr b/tests/codegen/fail/interface/trait/no_fields.stderr index 63c7d2968..2638dc9db 100644 --- a/tests/codegen/fail/interface/trait/no_fields.stderr +++ b/tests/codegen/fail/interface/trait/no_fields.stderr @@ -4,4 +4,4 @@ error: GraphQL interface must have at least one field 4 | trait Character {} | ^^^^^^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Interfaces + = note: https://spec.graphql.org/October2021#sec-Interfaces diff --git a/tests/codegen/fail/object/argument_double_underscored.stderr b/tests/codegen/fail/object/argument_double_underscored.stderr index 6ee3a756a..ae33cf328 100644 --- a/tests/codegen/fail/object/argument_double_underscored.stderr +++ b/tests/codegen/fail/object/argument_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 7 | fn id(&self, __num: i32) -> &str { | ^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/object/attr_fields_duplicate.stderr b/tests/codegen/fail/object/attr_fields_duplicate.stderr index 3c6968b2a..04304a3a4 100644 --- a/tests/codegen/fail/object/attr_fields_duplicate.stderr +++ b/tests/codegen/fail/object/attr_fields_duplicate.stderr @@ -4,4 +4,4 @@ error: GraphQL object must have a different name for each field 6 | impl ObjA { | ^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Objects + = note: https://spec.graphql.org/October2021#sec-Objects diff --git a/tests/codegen/fail/object/attr_name_double_underscored.stderr b/tests/codegen/fail/object/attr_name_double_underscored.stderr index 031654a20..a46fbda44 100644 --- a/tests/codegen/fail/object/attr_name_double_underscored.stderr +++ b/tests/codegen/fail/object/attr_name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 6 | impl __Obj { | ^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/object/attr_no_fields.stderr b/tests/codegen/fail/object/attr_no_fields.stderr index 9ba0098bc..bd3a050b5 100644 --- a/tests/codegen/fail/object/attr_no_fields.stderr +++ b/tests/codegen/fail/object/attr_no_fields.stderr @@ -4,4 +4,4 @@ error: GraphQL object must have at least one field 6 | impl Obj {} | ^^^ | - = note: https://spec.graphql.org/June2018/#sec-Objects + = note: https://spec.graphql.org/October2021#sec-Objects diff --git a/tests/codegen/fail/object/derive_field_double_underscored.stderr b/tests/codegen/fail/object/derive_field_double_underscored.stderr index 6a6e64036..16b38b890 100644 --- a/tests/codegen/fail/object/derive_field_double_underscored.stderr +++ b/tests/codegen/fail/object/derive_field_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 5 | __test: String, | ^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/object/derive_fields_duplicate.stderr b/tests/codegen/fail/object/derive_fields_duplicate.stderr index 18c084239..e7e01291c 100644 --- a/tests/codegen/fail/object/derive_fields_duplicate.stderr +++ b/tests/codegen/fail/object/derive_fields_duplicate.stderr @@ -8,4 +8,4 @@ error: GraphQL object must have a different name for each field 8 | | } | |_^ | - = note: https://spec.graphql.org/June2018/#sec-Objects + = note: https://spec.graphql.org/October2021#sec-Objects diff --git a/tests/codegen/fail/object/derive_name_double_underscored.stderr b/tests/codegen/fail/object/derive_name_double_underscored.stderr index 809f72977..087936214 100644 --- a/tests/codegen/fail/object/derive_name_double_underscored.stderr +++ b/tests/codegen/fail/object/derive_name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 4 | struct __Obj { | ^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/object/derive_no_fields.stderr b/tests/codegen/fail/object/derive_no_fields.stderr index ef198b790..31f6812d3 100644 --- a/tests/codegen/fail/object/derive_no_fields.stderr +++ b/tests/codegen/fail/object/derive_no_fields.stderr @@ -4,4 +4,4 @@ error: GraphQL object must have at least one field 4 | struct Obj {} | ^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Objects + = note: https://spec.graphql.org/October2021#sec-Objects diff --git a/tests/codegen/fail/subscription/argument_double_underscored.stderr b/tests/codegen/fail/subscription/argument_double_underscored.stderr index fd3737038..dd83ba63d 100644 --- a/tests/codegen/fail/subscription/argument_double_underscored.stderr +++ b/tests/codegen/fail/subscription/argument_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 11 | async fn id(&self, __num: i32) -> Stream<'static, &'static str> { | ^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/subscription/field_not_async.stderr b/tests/codegen/fail/subscription/field_not_async.stderr index c20611795..93fa942b4 100644 --- a/tests/codegen/fail/subscription/field_not_async.stderr +++ b/tests/codegen/fail/subscription/field_not_async.stderr @@ -4,5 +4,5 @@ error: GraphQL object synchronous resolvers are not supported 11 | fn id(&self) -> Stream<'static, bool> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Objects + = note: https://spec.graphql.org/October2021#sec-Objects = note: Specify that this function is async: `async fn foo()` diff --git a/tests/codegen/fail/subscription/fields_duplicate.stderr b/tests/codegen/fail/subscription/fields_duplicate.stderr index 34773a156..28281e510 100644 --- a/tests/codegen/fail/subscription/fields_duplicate.stderr +++ b/tests/codegen/fail/subscription/fields_duplicate.stderr @@ -4,4 +4,4 @@ error: GraphQL object must have a different name for each field 10 | impl ObjA { | ^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Objects + = note: https://spec.graphql.org/October2021#sec-Objects diff --git a/tests/codegen/fail/subscription/name_double_underscored.stderr b/tests/codegen/fail/subscription/name_double_underscored.stderr index 4752ecb0d..d9fffd1b2 100644 --- a/tests/codegen/fail/subscription/name_double_underscored.stderr +++ b/tests/codegen/fail/subscription/name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 10 | impl __Obj { | ^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/subscription/no_fields.stderr b/tests/codegen/fail/subscription/no_fields.stderr index 90d4eb11d..6faaed2f2 100644 --- a/tests/codegen/fail/subscription/no_fields.stderr +++ b/tests/codegen/fail/subscription/no_fields.stderr @@ -4,4 +4,4 @@ error: GraphQL object must have at least one field 6 | impl Obj {} | ^^^ | - = note: https://spec.graphql.org/June2018/#sec-Objects + = note: https://spec.graphql.org/October2021#sec-Objects diff --git a/tests/codegen/fail/union/enum_external_resolver_fn_conflicts_with_variant_external_resolver_fn.stderr b/tests/codegen/fail/union/enum_external_resolver_fn_conflicts_with_variant_external_resolver_fn.stderr index 9d913d22f..17b5ec8d6 100644 --- a/tests/codegen/fail/union/enum_external_resolver_fn_conflicts_with_variant_external_resolver_fn.stderr +++ b/tests/codegen/fail/union/enum_external_resolver_fn_conflicts_with_variant_external_resolver_fn.stderr @@ -4,4 +4,4 @@ error: GraphQL union variant `Human` already has external resolver function `res 6 | #[graphql(with = resolve_fn2)] | ^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions diff --git a/tests/codegen/fail/union/enum_name_double_underscored.stderr b/tests/codegen/fail/union/enum_name_double_underscored.stderr index be6d0e292..623186d86 100644 --- a/tests/codegen/fail/union/enum_name_double_underscored.stderr +++ b/tests/codegen/fail/union/enum_name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 4 | enum __Character { | ^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/union/enum_no_fields.stderr b/tests/codegen/fail/union/enum_no_fields.stderr index 9ab9c4005..7e036c6a4 100644 --- a/tests/codegen/fail/union/enum_no_fields.stderr +++ b/tests/codegen/fail/union/enum_no_fields.stderr @@ -4,4 +4,4 @@ error: GraphQL union expects at least one union variant 4 | enum Character {} | ^^^^^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions diff --git a/tests/codegen/fail/union/enum_same_type_pretty.stderr b/tests/codegen/fail/union/enum_same_type_pretty.stderr index 8c432f3ec..7b03ac3a2 100644 --- a/tests/codegen/fail/union/enum_same_type_pretty.stderr +++ b/tests/codegen/fail/union/enum_same_type_pretty.stderr @@ -7,4 +7,4 @@ error: GraphQL union must have a different type for each union variant 7 | | } | |_^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions diff --git a/tests/codegen/fail/union/enum_wrong_variant_field.stderr b/tests/codegen/fail/union/enum_wrong_variant_field.stderr index f9d00963d..6ad792751 100644 --- a/tests/codegen/fail/union/enum_wrong_variant_field.stderr +++ b/tests/codegen/fail/union/enum_wrong_variant_field.stderr @@ -4,7 +4,7 @@ error: GraphQL union enum allows only unnamed variants with a single field, e.g. 5 | A { human: Human }, | ^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions error: GraphQL union enum allows only unnamed variants with a single field, e.g. `Some(T)` --> fail/union/enum_wrong_variant_field.rs:10:6 @@ -12,4 +12,4 @@ error: GraphQL union enum allows only unnamed variants with a single field, e.g. 10 | A(Human, u8), | ^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions diff --git a/tests/codegen/fail/union/struct_name_double_underscored.stderr b/tests/codegen/fail/union/struct_name_double_underscored.stderr index 5c4d04e4d..84b3e3a95 100644 --- a/tests/codegen/fail/union/struct_name_double_underscored.stderr +++ b/tests/codegen/fail/union/struct_name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 5 | struct __Character; | ^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/union/struct_no_fields.stderr b/tests/codegen/fail/union/struct_no_fields.stderr index c26a9da1e..e5e791015 100644 --- a/tests/codegen/fail/union/struct_no_fields.stderr +++ b/tests/codegen/fail/union/struct_no_fields.stderr @@ -4,4 +4,4 @@ error: GraphQL union expects at least one union variant 4 | struct Character; | ^^^^^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions diff --git a/tests/codegen/fail/union/trait_method_conflicts_with_external_resolver_fn.stderr b/tests/codegen/fail/union/trait_method_conflicts_with_external_resolver_fn.stderr index b81e5a670..c098337eb 100644 --- a/tests/codegen/fail/union/trait_method_conflicts_with_external_resolver_fn.stderr +++ b/tests/codegen/fail/union/trait_method_conflicts_with_external_resolver_fn.stderr @@ -4,5 +4,5 @@ error: GraphQL union trait method `a` conflicts with the external resolver funct 5 | fn a(&self) -> Option<&Human>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions = note: use `#[graphql(ignore)]` attribute to ignore this trait method for union variants resolution diff --git a/tests/codegen/fail/union/trait_name_double_underscored.stderr b/tests/codegen/fail/union/trait_name_double_underscored.stderr index baf44bc85..afb1f11e2 100644 --- a/tests/codegen/fail/union/trait_name_double_underscored.stderr +++ b/tests/codegen/fail/union/trait_name_double_underscored.stderr @@ -4,4 +4,4 @@ error: All types and directives defined within a schema must not have a name whi 4 | trait __Character { | ^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Schema + = note: https://spec.graphql.org/October2021#sec-Schema diff --git a/tests/codegen/fail/union/trait_no_fields.stderr b/tests/codegen/fail/union/trait_no_fields.stderr index b75d5ba6e..c2f032da6 100644 --- a/tests/codegen/fail/union/trait_no_fields.stderr +++ b/tests/codegen/fail/union/trait_no_fields.stderr @@ -4,4 +4,4 @@ error: GraphQL union expects at least one union variant 4 | trait Character {} | ^^^^^^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions diff --git a/tests/codegen/fail/union/trait_same_type_pretty.stderr b/tests/codegen/fail/union/trait_same_type_pretty.stderr index 61e642b34..116a7113f 100644 --- a/tests/codegen/fail/union/trait_same_type_pretty.stderr +++ b/tests/codegen/fail/union/trait_same_type_pretty.stderr @@ -7,4 +7,4 @@ error: GraphQL union must have a different type for each union variant 7 | | } | |_^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions diff --git a/tests/codegen/fail/union/trait_with_attr_on_method.stderr b/tests/codegen/fail/union/trait_with_attr_on_method.stderr index 2402ab17b..6e4062145 100644 --- a/tests/codegen/fail/union/trait_with_attr_on_method.stderr +++ b/tests/codegen/fail/union/trait_with_attr_on_method.stderr @@ -4,5 +4,5 @@ error: GraphQL union cannot use #[graphql(with = ...)] attribute on a trait meth 5 | #[graphql(with = something)] | ^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions = note: instead use #[graphql(ignore)] on the method with #[graphql_union(on ... = ...)] on the trait itself diff --git a/tests/codegen/fail/union/trait_wrong_method_input_args.stderr b/tests/codegen/fail/union/trait_wrong_method_input_args.stderr index 44d447c5e..74c685967 100644 --- a/tests/codegen/fail/union/trait_wrong_method_input_args.stderr +++ b/tests/codegen/fail/union/trait_wrong_method_input_args.stderr @@ -4,4 +4,4 @@ error: GraphQL union expects trait method to accept `&self` only and, optionally 5 | fn a(&self, ctx: &(), rand: u8) -> Option<&Human>; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions diff --git a/tests/codegen/fail/union/trait_wrong_method_return_type.stderr b/tests/codegen/fail/union/trait_wrong_method_return_type.stderr index 87ee8ff1e..1594d53a0 100644 --- a/tests/codegen/fail/union/trait_wrong_method_return_type.stderr +++ b/tests/codegen/fail/union/trait_wrong_method_return_type.stderr @@ -4,4 +4,4 @@ error: GraphQL union expects trait method return type to be `Option<&VariantType 5 | fn a(&self) -> &Human; | ^^^^^^ | - = note: https://spec.graphql.org/June2018/#sec-Unions + = note: https://spec.graphql.org/October2021#sec-Unions