I'm not really sure how to feel about the current ...
# graphql-nexus
t
I'm not really sure how to feel about the current way of enforcing change. While I really appreciate that you're focusing your energy on schema instead of the framework, getting hundreds of
declarativeWrappingPlugin
warnings is quite a lot. Now, I could simply use the plugin, but what if that code gets deprecated in the near future? Again, really appreciate the work you're doing! I'm simply missing a bit more communication on what we can expect from changes related to schema, because I'm not really too keen on rewriting my code over and over again.
w
Hi @Timo, Thanks for your feedback. To be clear, there is no plan to remove the plugin from the codebase in the near future. What we plan to do short-term is to no longer enable the plugin by default. If you don’t want to refactor your codebase to support the new syntax, feel free to keep using that plugin forever. There has been very very few breaking changes on
@nexus/schema
since it was released. Since we’re planning to release
@nexus/schema@1.0.0
very soon, we had to make these breaking changes now or never, precisely because we want to avoid making breaking changes as soon as we make
@nexus/schema
officially stable. We apologize for the inconveniences.
🙏 3
💯 1
t
Thanks for the reply! I'm using the plugin for now, but I'm getting a TS error for required:
Copy code
export const test = inputObjectType({
  name: 'Test',
  definition: (t) => {
    t.string('test', {required: true})
  },
})
Copy code
Argument of type '{ required: boolean; }' is not assignable to parameter of type 'ScalarInputFieldConfig<string>'.
  Object literal may only specify known properties, and 'required' does not exist in type 'ScalarInputFieldConfig<string>'.ts(2345)
t
Looks like a bug where the input fields aren’t properly intersecting with the type extensions. Working on a fix for this now
Fixed in 0.19.2
t
Thank you!