Skip to content

Conversation

@rohkhann
Copy link
Contributor

@rohkhann rohkhann commented Jan 18, 2024

Why make this change?

Issue: #1976.

GraphQL Mutations need to be supported for data warehouse. Reasons for listed changes listed in issue document.
This pr does not cover REST addition for insert/patch etc. Will be done in following pr's . issue tracking: #1982

What is this change?

  1. Adding a DbOperationResult type that will be the return type for all dw mutation operations.
  2. Generating DWSQL queries for create, update, delete and upsert queries similar to that of other data sources.
  3. Adding model directive to DW mutation nodes so that we can determine which db they belong to.

How was this tested?

Performed integration tests:
image

  • Unit Tests
    Unit tests added for all dw scenarios.

@rohkhann
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@rohkhann
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@rohkhann
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@rohkhann rohkhann changed the title Mutation support for datawarehouse. GraphQL Mutation support for datawarehouse. Jan 19, 2024
@rohkhann
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@rohkhann
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@rohkhann
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

Copy link
Contributor

@seantleonard seantleonard left a comment

Choose a reason for hiding this comment

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

thanks for making these changes. Looks good to me.

@rohkhann
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@rohkhann rohkhann enabled auto-merge (squash) January 24, 2024 19:59
@rohkhann
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@rohkhann rohkhann merged commit 542ac92 into main Jan 24, 2024
@rohkhann rohkhann deleted the rohkhann/MutationDataWarehouse branch January 24, 2024 20:36
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.

Even though its merged, submitting some pending comments.

string entityName = outputType.TypeName();
ObjectType _underlyingFieldType = GraphQLUtils.UnderlyingGraphQLEntityType(outputType);

if (GraphQLUtils.TryExtractGraphQLFieldModelName(_underlyingFieldType.Directives, out string? modelName))
Copy link
Collaborator

Choose a reason for hiding this comment

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

See this is exactly what we can do in SqlQueryStructure too

@Aniruddh25
Copy link
Collaborator

rohkhann added a commit that referenced this pull request Feb 16, 2024
## Why make this change?

Fixing nit comments from earlier pr:
#1978

## What is this change?

There were some nit comments to fix while adding implementation for
mutation support for DW.

## How was this tested?

Existing tests should cover as this pr only handles nit fixes.
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.

6 participants