Skip to content

Conversation

stephenarosaj
Copy link
Contributor

@stephenarosaj stephenarosaj commented Sep 17, 2025

API Changes

  • Added executeQuery() and executeMutation() to src/data-connect/data-connect.ts. These allow users to call deployed operations with impersonated auth credentials.

Testing

  • New unit tests added which match the coverage of existing executeGraphql* APIs
  • New integration tests added which more than match the coverage of existing executeGraphql* APIs
  • The tests pass locally, but a re-deploy of dataconnect to the CI/CD firebase project is required. Tagging @lahirumaramba

@stephenarosaj stephenarosaj marked this pull request as ready for review September 17, 2025 22:47
@stephenarosaj
Copy link
Contributor Author

Note:

The integration tests have a huge diff because I moved the existing tests under a new parent describe(), and so their indentation level was increased. Existing tests were not changed in this PR.

@stephenarosaj
Copy link
Contributor Author

Forgot a few changes! Didn't know that you could close and re-open :P thanks Yuchen!

@stephenarosaj
Copy link
Contributor Author

wait - need to privatize the execute API, execution should come from operation refs (in a future PR)

@stephenarosaj stephenarosaj reopened this Sep 25, 2025
@stephenarosaj stephenarosaj added the release:stage Stage a release candidate label Sep 25, 2025
user_upsert(data: { id: "fred_id", address: "32 Elm St.", name: "Fred" })
}
mutation updateFredrickUserImpersonation @auth(level: USER) {
mutation updateFredrickUserImpersonation @auth(level: USER, insecureReason: "test") {
Copy link
Contributor

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

Copy link
Contributor Author

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

{
"name": "firebase-admin",
"version": "13.4.0",
"version": "13.5.0",
Copy link
Member

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>(
Copy link
Member

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> {
Copy link
Member

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?

@lahirumaramba lahirumaramba changed the title Add executeQuery and executeMutation APIs to Data Connect feat(dc): Add executeQuery and executeMutation APIs to Data Connect Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:stage Stage a release candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants