Merge data connectors into a single data-connector#152
Merged
Conversation
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
accounts,example, andquestionnairesFirebase Data Connect connectors into one connector atdata/connector, generating combined@generated/data-connector-adminand@generated/data-connector-web(with areactsubpackage) SDKs..gqlfiles (accounts,projects,quotes,reminders,users,questionnaires) within the single connector;UserSettingsmoves fromdata/schemas/accounts.gqlinto its owndata/schemas/users.gqlto match.functions/plaster-calculator-functions/src/data-connect.tsand itsdataConnectargument at every call site — with only one connector left, thegetDataConnect()caching workaround from Extract accounts connector from example connector #151 is no longer needed, so functions resolve the connector implicitly.createAccount as dcCreateAccount) toimport * as DataConnectornamespace imports.Test plan
pnpm build,pnpm lint,pnpm formatall pass (done locally, no errors, only 2 pre-existing unrelatedmax-lineswarnings)pnpm emulators:start)firebase deploy --only dataconnectand the functions deploy workflow still pick up the right paths🤖 Generated with Claude Code