Skip to content

Conversation

tarazou9
Copy link
Contributor

Why This Change

  • Currently for Cosmos, the update and create operation doesn't support nested inner objects, this is for allowing user passing in nested object in mutation operation and populate the data.

What changes were made

  • Updated CreateMutationBuilder and UpdateMutationBuilder for the input type generations.
  • Updated CosmosMutationEngine for saving data to the database.
  • Unit tests.

How was it tested?

  • Added unit tests with nested inner objects.

@tarazou9 tarazou9 changed the title Handling nested inner objects Handling nested inner objects for Cosmos Jun 24, 2022
Copy link
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting more unit test..

Copy link
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting on resolution of [StarConnection] vs [Star]

@tarazou9 tarazou9 changed the title Handling nested inner objects for Cosmos Handling nested inner objects for Cosmos Mutations Jul 12, 2022
Copy link
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for addressing my questions :)

@tarazou9 tarazou9 enabled auto-merge (squash) July 14, 2022 21:56
@tarazou9 tarazou9 merged commit b7ce06c into main Jul 15, 2022
@tarazou9 tarazou9 deleted the users/tarazou/handleInnerObjects branch July 15, 2022 20:04
aaronpowell added a commit that referenced this pull request Nov 1, 2022
- Nested @model definitions shouldn't be supported, otherwise the engine will need to find some way to extract that out
- Added Snapshooter to make testing a generated GraphQL schema a lot easier
  - Note - Snapshooter is used by HotChocolate extensively in its tests
- Snapshooter hasn't shipped a NuGet package for MSTest support, so code is embedded (I wrote the MSTest support so I know it works!)
- Added tests and their snapshots for the GraphQL schema structures that need to be covered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CosmosDB: Handling nested inner object and nested inner object array in "Create" and "Update".
3 participants