Extract accounts connector from example connector#151
Merged
Conversation
Splits the Account/AccountContact queries and mutations out of the example connector into a new accounts connector, generating a dedicated accounts-data-connector-admin admin SDK package for functions. Also works around a firebase-admin bug (getDataConnect caches DataConnect instances by location/serviceId only, ignoring the connector), which the functions code now hits since it calls two connectors sharing one service in the same process. Fixed upstream in firebase/firebase-admin-node#3055; until a release with that fix is out, functions construct their own DataConnect instance per connector instead of relying on the shared cache. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Re-running the SDK generator reordered the generated function declarations; no functional change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4 tasks
dijimsta
added a commit
that referenced
this pull request
Jul 6, 2026
) Consolidates the accounts, example, and questionnaires Firebase Data Connect connectors into one connector at data/connector, generating combined @generated/data-connector-admin and @generated/data-connector-web (with a react subpackage) SDKs. As a result, account operations are now also available through the web SDK, alongside questionnaires. Operations are split into domain-scoped .gql files (accounts, projects, quotes, reminders, users, questionnaires) within the single connector, and the UserSettings type moves from data/schemas/accounts.gql into its own data/schemas/users.gql to match. Since there is only one connector now, the getDataConnect() caching workaround added in #151 (constructing a DataConnect instance per connector to dodge firebase-admin's location/serviceId-keyed cache) is no longer needed, so functions/plaster-calculator-functions/src/data-connect.ts is removed; call sites let the generated functions resolve the connector implicitly. Generated-SDK imports across functions, apps, and libraries now use `import * as DataConnector` namespace imports instead of aliased named imports, avoiding renames like `createAccount as dcCreateAccount`. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exampleData Connect connector into a newaccountsconnector, generating a dedicatedaccounts-data-connector-adminadmin SDK package.firebase-adminbug wheregetDataConnect()cachesDataConnectinstances keyed only bylocation/serviceId, ignoring the connector name — once functions called two connectors sharing one service in the same process, calls started silently routing to the wrong connector (operation "X" not found). Fixed upstream in firebase/firebase-admin-node#3055; until a release with that fix ships,functions/plaster-calculator-functions/src/data-connect.tsconstructs oneDataConnectinstance per connector directly instead of relying on the shared cache.Test plan
pnpm build,pnpm lint,pnpm formatall passcreateAccount→listProjectsByAccountsequence end-to-end against the emulator and confirmed it now succeeds/app/accounts/:id) loads correctly in the running app🤖 Generated with Claude Code