-
Notifications
You must be signed in to change notification settings - Fork 409
feat(dc): Add executeQuery and executeMutation APIs to Data Connect #2979
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
base: master
Are you sure you want to change the base?
Conversation
Note:The integration tests have a huge diff because I moved the existing tests under a new parent |
Forgot a few changes! Didn't know that you could close and re-open :P thanks Yuchen! |
wait - need to privatize the execute API, execution should come from operation refs (in a future PR) |
user_upsert(data: { id: "fred_id", address: "32 Elm St.", name: "Fred" }) | ||
} | ||
mutation updateFredrickUserImpersonation @auth(level: USER) { | ||
mutation updateFredrickUserImpersonation @auth(level: USER, insecureReason: "test") { |
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.
Note: These changes likely require a re-deploy on the CI project
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.
Yes, they deff do - I'll leave this comment open to make sure it gets re-deployed! Tagging @lahirumaramba
test/unit/data-connect/data-connect-api-client-internal.spec.ts
Outdated
Show resolved
Hide resolved
test/unit/data-connect/data-connect-api-client-internal.spec.ts
Outdated
Show resolved
Hide resolved
…s, bypassing auth policies
…ions, bypassing auth policies
…ion]Result to exported api
{ | ||
"name": "firebase-admin", | ||
"version": "13.4.0", | ||
"version": "13.5.0", |
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.
The version should only be bumped in a release PR. You can revert this for now and we will change it when we are ready to cut the next release
} | ||
|
||
/** @internal */ | ||
public executeQuery<Data, Variables>( |
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.
If we are not exporting these as part of the public API, would it make sense to removeexecuteQuery
and executeMutation
fromsrc/data-connect/data-connect.ts
?
} | ||
|
||
// @public (undocumented) | ||
export interface OperationResult<Data, Variables> { |
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.
Could you check why some of these new types are missing documentation, please?
API Changes
executeQuery()
andexecuteMutation()
tosrc/data-connect/data-connect.ts
. These allow users to call deployed operations with impersonated auth credentials.Testing
executeGraphql*
APIsexecuteGraphql*
APIs