Skip to content

Conversation

@maneesht
Copy link
Collaborator

No description provided.

@docs-page
Copy link

docs-page bot commented Feb 20, 2025

To view this pull requests documentation preview, visit the following URL:

docs.page/invertase/tanstack-query-firebase~166

Documentation is deployed and generated using docs.page.

@CLAassistant
Copy link

CLAassistant commented Feb 20, 2025

CLA assistant check
All committers have signed the CLA.

@HassanBahati
Copy link
Member

HassanBahati commented Mar 3, 2025

Just tried installing @tanstack-query-firebase/angular@0.0.1-alpha.4 and the installation fails as below. Initially was using npm and thought it was the issue, so i switched to pnpm.

Source code: https://github.com/HassanBahati/tanstack-query-firebase-examples/tree/main/angular/firebase-dataconnect-movies-app

Using npm:

image
bahati@Bahatis-MacBook-Pro firebase-dataconnect-movies-app % npm i @tanstack-query-firebase/angular (node:29806) ExperimentalWarning: CommonJS module /Users/bahati/.nvm/versions/node/v23.2.0/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /Users/bahati/.nvm/versions/node/v23.2.0/lib/node_modules/npm/node_modules/supports-color/index.js using require(). Support for loading ES Module in require() is an experimental feature and might change at any time (Use `node --trace-warnings ...` to show where the warning was created) npm error code EUNSUPPORTEDPROTOCOL npm error Unsupported URL Type "workspace:": workspace:* npm error A complete log of this run can be found in: /Users/bahati/.npm/_logs/2025-03-03T18_10_02_155Z-debug-0.log 

Using pnpm:
image

bahati@Bahatis-MacBook-Pro firebase-dataconnect-movies-app % pnpm i @tanstack-query-firebase/angular  ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In : "@dataconnect/default-connector@workspace:*" is in the dependencies but no package named "@dataconnect/default-connector" is present in the workspace This error happened while installing the dependencies of @tanstack-query-firebase/angular@0.0.1-alpha.4 Packages found in the workspace: Progress: resolved 25, reused 24, downloaded 0, added 0 bahati@Bahatis-MacBook-Pro firebase-dataconnect-movies-app 
@Ehesp Ehesp merged commit fb83654 into invertase:main Mar 11, 2025
3 checks passed
queryKey.set([ref.name, ref.variables]);
const { data, ...rest } = await executeQuery(ref);
return {
...data,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we merging this? If someone has a query with a top-level field called source, fetchTime or ref, that field will be shadowed by the ...rest below and they will not be able to access that field. The typing FlattenedQueryResult above doesn't seem to reflect this behavior accurately either.

Furthermore, based on this comment we may add future metadata fields there. If/when we do so, every new field we add will be a breaking change since it may shadow yet another top-level field.

export type GeneratedSignature<Data, Variables> = (
dc: DataConnect,
vars: Variables
) => MutationRef<Data, Variables>; // TODO(mtewani): Add __angular: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need __angular: true?

FirebaseError,
Arguments
>;
// TODO(mtewani): Just check for the fact that the user has passed in a generated Angular fn. AKA __angular: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants