File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,31 @@ using the macros and not deriving `GraphQLType` directly.
4141 MyContext ...)` you will need to add ` impl Context for MyContext
4242 {}`. Simple as that.
4343
44+ * ` Registry ` and all meta type structs now takes one lifetime
45+ parameter, which affects ` GraphQLType ` 's ` meta ` method. This only
46+ affects people who implement the trait manually.
47+
48+ ** How to fix:** Change the type signature of ` meta() ` to read `fn
49+ meta<'r>(registry: &mut Registry<'r>) -> MetaType<'r>`.
50+
51+ * The type builder methods on ` Registry ` no longer return functions
52+ taking types or fields. Due to how the borrow checker works with
53+ expressions, you will have to split up the instantiation into two
54+ statements. This only affects people who implement the ` GraphQLType `
55+ trait manually.
56+
57+ ** How to fix:** Change the contents of your ` meta() ` methods to
58+ something like this:
59+
60+ ``` rust
61+ fn meta <'r >(registry : & mut Registry <r >) -> MetaType <'r > {
62+ let fields = & [ /* your fields ... */ ];
63+
64+ registry . build_object_type :: <Self >(fields ). into_meta ()
65+ }
66+
67+ ```
68+
4469
4570### Added
4671
@@ -128,6 +153,12 @@ using the macros and not deriving `GraphQLType` directly.
128153
129154 ```
130155
156+ ### Improvements
157+
158+ * Parser and query execution has now reduced the allocation overhead
159+ by reusing as much as possible from the query source and meta type
160+ information.
161+
131162## [ 0.5.3] – 2016-12-05
132163
133164### Added
You can’t perform that action at this time.
0 commit comments