Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Commit dff73a9

Browse files
authored
Merge pull request #371 from michaeldgraham/master
Fixing augmentation testing with related issues #369 & #370
2 parents 0297649 + ff9a341 commit dff73a9

File tree

4 files changed

+312
-16
lines changed

4 files changed

+312
-16
lines changed

src/augment/input-values.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const augmentInputTypePropertyFields = ({
8383
);
8484
}
8585
}
86-
if (orderingType) {
86+
if (orderingType && outputType !== SpatialType.POINT) {
8787
orderingType.values.push(...buildPropertyOrderingValues({ fieldName }));
8888
}
8989
}

src/augment/types/relationship/mutation.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ const buildRelationshipMutationAPI = ({
180180
generatedTypeMap = buildRelationshipMutationOutputType({
181181
mutationAction,
182182
mutationOutputType,
183+
propertyInputValues,
183184
propertyOutputFields,
184185
relationshipName,
185186
fromType,
@@ -380,6 +381,7 @@ const buildRelationshipMutationDirectives = ({
380381
const buildRelationshipMutationOutputType = ({
381382
mutationAction,
382383
mutationOutputType,
384+
propertyInputValues,
383385
propertyOutputFields,
384386
relationshipName,
385387
fromType,
@@ -390,7 +392,8 @@ const buildRelationshipMutationOutputType = ({
390392
mutationAction === RelationshipMutation.CREATE ||
391393
mutationAction === RelationshipMutation.DELETE ||
392394
mutationAction === RelationshipMutation.MERGE ||
393-
mutationAction === RelationshipMutation.UPDATE
395+
(mutationAction === RelationshipMutation.UPDATE &&
396+
propertyInputValues.length)
394397
) {
395398
const relationTypeDirective = buildRelationDirective({
396399
relationshipName,

test/integration/integration.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ test('query relationship property data', async t => {
724724
});
725725
});
726726

727-
test('query using inine fragment', async t => {
727+
test('query using inline fragment', async t => {
728728
t.plan(1);
729729

730730
let expected = {

0 commit comments

Comments
 (0)