-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from nfl/Dynamic_schema_shall_support_multiple…
…_fields_of_type_Array_of_External_References Dynamic schema shall support multiple fields of type Array of External References
- Loading branch information
Showing
10 changed files
with
128 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/test/resources/graphql/external_reference/add_two_arrays.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
mutation { | ||
upsertSchemaDefinition(schemaDef: { | ||
name: "MultipleExtRefArrays", | ||
idGeneration: Client, | ||
domainFields: [{ | ||
memberType: Array, | ||
memberFieldName: "shieldRef", | ||
memberDescription: "A pointer to a shield image.", | ||
arrayEntryType: ExternalReference | ||
serviceKey: SHIELD, | ||
possibleTypes: ["Image", "Article", "Video"] | ||
}, { | ||
memberType: Array, | ||
memberFieldName: "audios", | ||
memberDescription: "A pointer to a shield audio.", | ||
arrayEntryType: ExternalReference | ||
serviceKey: SHIELD, | ||
possibleTypes: ["Audio"] | ||
}] | ||
}) | ||
{ | ||
name, | ||
domainFields { | ||
memberType, | ||
memberFieldName, | ||
memberDescription, | ||
serviceKey, | ||
possibleTypes | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/test/resources/graphql/external_reference/add_two_arrays_instance.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
mutation { | ||
upsertSchemaInstance(schemaInstance: { | ||
id: "Says", | ||
shieldRef: | ||
[{ | ||
id: "1234", | ||
typeDefinition: "Image" | ||
},{ | ||
id: "5678", | ||
typeDefinition: "Video" | ||
},{ | ||
id: "1234", | ||
typeDefinition: "Image" | ||
|
||
}], | ||
audios: | ||
[{ | ||
id: "9", | ||
typeDefinition: "Audio" | ||
}] | ||
}) | ||
{ | ||
id, | ||
shieldRef { | ||
... on Image { | ||
id, | ||
title | ||
}, | ||
... on Video { | ||
id, | ||
title, | ||
caption | ||
} | ||
}, | ||
audios { | ||
... on Audio { | ||
id, | ||
codec | ||
} | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
src/test/resources/graphql/external_reference/add_two_arrays_instance_results.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{upsertSchemaInstance={id=Says, shieldRef=[{id=1234, title=Hitchhikers Guide}, {id=5678, title=Casablanca, caption=The greatest movie ever.}, {id=1234, title=Hitchhikers Guide}], audios=[{id=9, codec=FLAC}]}} |
1 change: 1 addition & 0 deletions
1
src/test/resources/graphql/external_reference/add_two_arrays_results.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{upsertSchemaDefinition={name=MultipleExtRefArrays, domainFields=[{memberType=Array, memberFieldName=shieldRef, memberDescription=A pointer to a shield image., serviceKey=SHIELD, possibleTypes=[Image, Article, Video]}, {memberType=Array, memberFieldName=audios, memberDescription=A pointer to a shield audio., serviceKey=SHIELD, possibleTypes=[Audio]}]}} |