Skip to content

"Only one source is allowed in the from clause" but not realy my code #873

Description

@jpcastro4

Describe the bug
I`m trying a query but not success

To Reproduce

import { createCollection, localStorageCollectionOptions } from '@tanstack/react-db';

const TICKETS_COLLECTION_STORAGE_KEY = 'tickets-collection';

export const getTicketKey = ticket => ticket?.id;

export const ticketsCollection = createCollection(
localStorageCollectionOptions({
id: 'conversations',
storageKey: TICKETS_COLLECTION_STORAGE_KEY,
getKey: getTicketKey,
}),
);

in my component

const ticketsQuery = useLiveQuery(q => q.from("conversations").orderBy("updatedAt", "desc"));

but error

QueryBuilderError: Only one source is allowed in the from clause

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions