Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved stored procedure parameter value type handling during GraphQL schema creation #1383

Merged
merged 16 commits into from
Apr 4, 2023

Conversation

seantleonard
Copy link
Contributor

@seantleonard seantleonard commented Mar 30, 2023

Why make this change?

  • Closes Decimal parameters in Stored Procedure mapped to LONG datatype in GraphQL #1221 which describes how the GraphQL schema fields created for stored procedures do not use the proper value types for stored procedure parameters. This issue occurs because the GraphQL schema builder was trying to infer the value type of a parameter default value defined in the runtime configuration. Runtime configuration is not enough to know the target value type for casting. Database metadata is required.

What is this change?

  • In the GraphQL query and mutation schema builders, a databaseobject is now referenced for determining the value type for which to cast the runtime configuration defined default parameter value.

How was this tested?

  • Integration Tests
  • Unit Tests - Unit tests which cover the affected GraphQL schema builder methods

Sample Request(s)

…ne type from database metadata instead of inferring incorrect and/or imprecise type.
…chema object for both mutation and query stored procedures. The SP param value types are properly hydrated from db metadata.
@ayush3797 ayush3797 added the bug Something isn't working label Apr 3, 2023
Copy link
Contributor

@aaronburtle aaronburtle left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for getting this in for March!

Copy link
Contributor

@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 uncovering some new data type issues and adding better tests!

@seantleonard seantleonard enabled auto-merge (squash) April 3, 2023 23:57
@seantleonard seantleonard merged commit 9643195 into main Apr 4, 2023
@seantleonard seantleonard deleted the dev/seleonar/DecimalToLongGraphQL_Issue1221 branch April 4, 2023 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decimal parameters in Stored Procedure mapped to LONG datatype in GraphQL
5 participants