Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables type in local cache mutations is not properly namespaced #2614

Closed
calvincestari opened this issue Oct 27, 2022 · 0 comments · Fixed by #2615
Closed

Variables type in local cache mutations is not properly namespaced #2614

calvincestari opened this issue Oct 27, 2022 · 0 comments · Fixed by #2615
Assignees
Labels
bug Generally incorrect behavior codegen Issues related to or arising from code generation
Milestone

Comments

@calvincestari
Copy link
Member

When a local cache mutation has input variables the Variables type is not namespaced with GraphQLOperation and the build fails.

  • apollo-ios SDK version: 1.0.2

Sample mutation with @apollo_client_ios_localCacheMutation directive:

uery PetSearchLocalCacheMutation($filters: PetSearchFilters = {
  species: ["Dog", "Cat"],
  size: SMALL,
  measurements: {
    height: 10.5,
    weight: 5.0
    }
  }
) @apollo_client_ios_localCacheMutation {
  pets(filters: $filters) {
    id
    humanName
  }
}

Expected:

public var __variables: GraphQLOperation.Variables? { ["filters": filters] }

Actual:

public var __variables: Variables? { ["filters": filters] }
@calvincestari calvincestari added this to the Release 1.0.3 milestone Oct 27, 2022
@calvincestari calvincestari added bug Generally incorrect behavior codegen Issues related to or arising from code generation labels Oct 27, 2022
@calvincestari calvincestari self-assigned this Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Generally incorrect behavior codegen Issues related to or arising from code generation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant