npm @graphql-codegen/typescript-resolvers 1.0.0
v1.0.0

CLI

  • CLI package now only handles the CLI execution and the CLI output, and no longer required when running the codegen programatically.
  • The default behaviour of overwrite is now true by default.

Core

  • core package has been changed, now it includes all execution logic, as a slim package that can be consumed in browser environment.
  • handlebars is no longer in use, and all the utils that we made to bridge the codegen and handlebars are now removed (flattenDocuments and buildSchemaContext).
  • All previous exported methods are now removed.

TypeScript

💥BREAKING CHANGES 💥

  • typescript-common has been removed, now all common parts are inside typescript, and all other typescript plugins depend on it.
  • typescript-server is now typescript and should be in use always when generating TypeScript, it's the base plugin for all other plugins.
  • typescript-client is now typescript-operations, and it uses Pick<> to generate a single TypeScript type instead of using scoped namespaces.
  • We no longer generates namespaces in all plugins, so there is no need to configure the codegen in a special way in order to use it with babel-typescript.
  • You should change your existing usage from MyData.Query to MyDataQuery, and from MyData.Variables to MyDataQueryVariables.
  • Args object has been change, the name before was built as {FIELD_NAME}.{TYPE_NAME}Args, now it's {TYPE_NAME}.{FIELD_NAME}Args.
  • There are no inner types in each query, it means that if you used to do MyData.SomeInternalField, now you should use MyData['someInternalField'].
  • Generated resolvers also no longer use namespaces, so instead of MyResolver.Resolver, you should use MyResolver.
  • Enum values are now using the correct method for naming convention, so it might effect enums values with underscore (_) sign. (before: MyEnum.MyValue and now: MyEnum.My_Value).
  • enums configuration name has been changed to enumValues.
  • Programatic usage should import codegen from @graphql-codegen/core instead of generate from graphql-code-generator.

TypeScript React-Apollo

  • HOC changed from OperationHOC to withOperation.
latest releases: 2.3.2, 2.3.1, 2.3.1-alpha-143b4bc91.0...
2 years ago