Skip to content

Type 'undefined' is not assignable to baseOptions #3679

Closed
@quentinus95

Description

@quentinus95

Describe the bug

When trying to update @vue/apollo-composable from 4.0.0-alpha.4 to 4.0.0-alpha.7, I'm getting the following type errors with graphql-code-generator (on argument baseOptions) for all my mutations:

Argument of type 'UseMutationOptions<DoSomethingMutation, DoSomethingMutationVariables> | undefined' is not assignable to parameter of type 'UseMutationOptionsWithVariables<DoSomethingMutation, DoSomethingMutationVariables> | ReactiveFunction<...>'.
       Type 'undefined' is not assignable to type 'UseMutationOptionsWithVariables<DoSomethingMutation, DoSomethingMutationVariables> | ReactiveFunction<...>'.
                  return VueApolloComposable.useMutation<DoSomethingMutation, DoSomethingMutationVariables>(DoSomethingDocument, baseOptions);

To Reproduce

Use the latest version of graphql-code-generator with @vue/apollo-composable 4.0.0-alpha.7 and any kind of mutation.

Config:

# ...
    plugins:
      - typescript
      - typescript-operations
      - typescript-vue-apollo

Expected behavior

Generated code triggers no compiler error.

Environment:

  • OS: Docker
  • @graphql-codegen/*: 1.13.1
  • NodeJS: 13.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginswaiting-for-releaseFixed/resolved, and waiting for the next stable release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions