Change8

@apollo/client-graphql-codegen@1.0.0-alpha.0

📦 apollo-client
1 features🔧 4 symbols

Summary

A new GraphQL Codegen plugin '@apollo/client-graphql-codegen/local-state' adds generated resolver types for LocalState, enabling type‑safe local resolvers.

Migration Steps

  1. Install @apollo/client-graphql-codegen package.
  2. Add the plugin '@apollo/client-graphql-codegen/local-state' to your codegen configuration as shown.
  3. Configure plugin options such as nonOptionalTypename, baseTypesPath, and contextType if needed.
  4. Use the generated Resolvers type when constructing a new LocalState instance.
  5. Prefer using your local schema file for the schema option to avoid generating resolver types for the remote schema.

✨ New Features

  • Introduce @apollo/client-graphql-codegen/local-state plugin to generate resolver types for LocalState, providing a Resolvers type for type‑safe local resolvers.

🔧 Affected Symbols

LocalStateResolvers@apollo/client-graphql-codegen/local-stateCodegenConfig