@@ -17,25 +17,103 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1717## Maintenance
1818## Documentation-->
1919
20- # [ 1.30.0] (unreleased) - 2025-08-dd
20+ # [ 1.30.0] (unreleased) - 2025-08-27
2121
2222## Features
2323
24- - ** Adds ` ignore_builtin_redefinitions ` option to ` SchemaBuilder ` to allow SDL to contain built-in type
25- definitions - [ dariuszkuc] , [ pull/990] and [ pull/994] **
24+ - ** Add ` ignore_builtin_redefinitions ` method to ` SchemaBuilder ` - [ dariuszkuc] , [ pull/990] and [ pull/994] **
25+
26+ This allows input SDL to contain built-in types.
27+
28+ The following SDL will result in a validation error, for example:
29+ ``` rust
30+ let schema = r # "
31+ type __Directive {
32+ name: String!
33+ description: String!
34+ isRepeatable: String!
35+ args: __InputValue
36+ locations: String!
37+ }
38+ type Query {
39+ foo: String
40+ }
41+ " # ;
42+
43+ let valid = Schema :: parse_and_validate (schema , " schema.graphql" )?
44+ ```
45+ Error:
46+ ``` shell
47+ Error: the type ` __Directive` is defined multiple times in the schema
48+ ╭─[ built_in.graphql:87:6 ]
49+ │
50+ 87 │ type __Directive {
51+ │ ─────┬─────
52+ │ ╰─────── previous definition of ` __Directive` here
53+ │
54+ ├─[ schema.graphql:2:6 ]
55+ │
56+ 2 │ type __Directive {
57+ │ ─────┬─────
58+ │ ╰─────── ` __Directive` redefined here
59+ │
60+ │ Help: remove or rename one of the definitions, or use ` extend`
61+ ────╯
62+ ` ` `
63+
64+ However, when using the ` ignore_builtin_redefinitions` method, this successfully passes validation given the same schema:
65+ ` ` ` rust
66+ let builder = SchemaBuilder::new().ignore_builtin_redefinitions ();
67+ let _ = builder
68+ .parse(schema, " schema.graphql" )
69+ .build ()
70+ .expect(" schema parsed successfully" );
71+ ` ` `
2672
2773# # Fixes
2874
2975- ** Fix handling of orphan root type extensions - [dariuszkuc], [pull/993](# 993)**
30- - ** Fix possible stack overflow in validation of directive definition arguments with nested types - [ dariuszkuc] , [ pull/987] ( #987 ) **
31- - ** Fix ` iter_origin() ` to be a pub method- [ duckki] , [ pull/989] ( #989 ) **
76+
77+ ` SchemaBuilder` ' s `adopt_orphan_extensions` method allows users to define type
78+ extensions without an existing type definition. But before this fix, orphan
79+ `RootTypeOperation` extensions would result in an invalid schema despite
80+ `adopt_orphan_extensions` being enabled. Using this method now generates a
81+ valid schema for all lone extensions.
82+
83+ - **Fix directive definition validation with nested types arguments - [dariuszkuc], [pull/987](#987)**
84+
85+ Directive definition with nested argument types resulted in a stack overflow, for example
86+ ```graphql
87+ directive @custom(input: NestedInput) on OBJECT | INTERFACE
88+
89+ input NestedInput {
90+ name: String
91+ nested: NestedInput
92+ }
93+
94+ type Query @custom(input: {name: "hello", nested: {name: "hello"}}) {
95+ foo: String
96+ }
97+
98+ query myQuery {
99+ foo
100+ }
101+ ```
102+ This fix ensures the above example is possible and does not result in a validation error.
103+
104+ - **Fix `iter_origins()` to be a pub method - [duckki], [pull/989](#989)**
105+
106+ Previously added `::iter_origins()` methods on Schema and Type Definitions was not made `pub`.
32107
108+ [dariuszkuc]: https://github.com/dariuszkuc
109+ [duckki]: https://github.com/duckki
33110[pull/994]: https://github.com/apollographql/apollo-rs/pull/994
34111[pull/993]: https://github.com/apollographql/apollo-rs/pull/993
35112[pull/990]: https://github.com/apollographql/apollo-rs/pull/990
36113[pull/989]: https://github.com/apollographql/apollo-rs/pull/989
37114[pull/987]: https://github.com/apollographql/apollo-rs/pull/987
38115
116+
39117# [1.29.0](https://crates.io/crates/apollo-compiler/1.29.0) - 2025-08-08
40118
41119## Features
0 commit comments