-
Notifications
You must be signed in to change notification settings - Fork 296
Updating the logic of fetching the graphQL Operation for SP #1171
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
Conversation
Sorry, I am not clear with what the issue here is that requires this fix. |
…om/Azure/data-api-builder into dev/shyamsundarj/execute-cli-tests
…om/Azure/data-api-builder into dev/shyamsundarj/execute-cli-tests
I've updated the PR description and linked an issue outlining the problem |
ayush3797
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions/suggestions. LGTM otherwise.
…om/Azure/data-api-builder into dev/shyamsundarj/execute-cli-tests
…om/Azure/data-api-builder into dev/shyamsundarj/execute-cli-tests
Why make this change?
GraphQLis different before and after starting the engine.addcommanddab add sptest --source "sptest" --source.type "stored-procedure" --permissions "anonymous:execute" --rest.methods "get,post" --graphql.operation "query"Config after running this command:
updatecommanddab update sptest --rest falseThe
graphqlelements are lost. The correct config should've been as shown belowExpected config:
operationsproperty insidegraphqlwas becomingnullwhile it should've been what was configured earlier usingaddcommand.What is this change?
FetchGraphQLOperationwhich can be utilized when the type of theGraphQLisJsonElement. At the moment, CLI makes use of this.FetchConfiguredGraphQLOperation. This is utilized when theGraphQLis completely deserialized to a concrete object. Currently, utilized by engine components such as QueryBuilder, MutationBuilder etc.JsonValueKind.Arrarytype forRest. This is possible when--rest.methodsis configured but nothing is specified forrestoption.How was this tested?
Manual Testing
Config after running
dab add sptest --source "sptest" --source.type "stored-procedure" --permissions "anonymous:execute" --rest.methods "get,post" --graphql.operation "query"Config after running
dab update sptest --rest false