From 3e4d3634f3a59018bf6c6561610a1d155b0d7796 Mon Sep 17 00:00:00 2001 From: Anthony Miller Date: Mon, 31 Jul 2023 16:04:53 -0700 Subject: [PATCH] WIP add integration test notes --- .../README.MD | 9 +++++++ .../operation.graphql | 15 +++++++++++ .../schema.graphqls | 27 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/README.MD create mode 100644 Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/operation.graphql create mode 100644 Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/schema.graphqls diff --git a/Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/README.MD b/Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/README.MD new file mode 100644 index 0000000000..dcb344bbc2 --- /dev/null +++ b/Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/README.MD @@ -0,0 +1,9 @@ +# Overview + + + +## Reference Issue: https://github.com/apollographql/apollo-ios/pull/3120 + +## Solution + +All properties that are lists of scalars should use the `_setScalarList` function when initialized inside mock objects. diff --git a/Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/operation.graphql b/Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/operation.graphql new file mode 100644 index 0000000000..945c435a9e --- /dev/null +++ b/Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/operation.graphql @@ -0,0 +1,15 @@ +fragment Test on Event { + child { + ... on ChildA { + innerChild: child { + foo + } + } + } + ... on EventA { + bar + } + ... on EventB { + baz + } +} diff --git a/Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/schema.graphqls b/Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/schema.graphqls new file mode 100644 index 0000000000..6c80f9329b --- /dev/null +++ b/Tests/CodegenIntegrationTests/Tests/mergedSourceFromDefinitionRootNeedsFullyQualifedName/schema.graphqls @@ -0,0 +1,27 @@ +type Query { + test: Event! +} + +interface Event { + child: Child! +} + +type EventA implements Event { + child: Child! + bar: String! +} + +type EventB implements Event { + child: Child! + baz: String! +} + +interface Child { + foo: String! + child: Child +} + +type ChildA implements Child { + foo: String! + child: Child +}