Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote client fails to infer types based on query and schema #42

Open
wernst opened this issue Jan 16, 2024 · 0 comments
Open

Remote client fails to infer types based on query and schema #42

wernst opened this issue Jan 16, 2024 · 0 comments
Labels
bug Something isn't working @triplit/client

Comments

@wernst
Copy link
Contributor

wernst commented Jan 16, 2024

Example:

const client = new RemoteClient({ schema });
const result = await client.fetch({
    collectionName: 'todos',
});

// Result is Map<string, any>

I think we need to properly type the query parameter of fetch (so we can pull out the schema and proper return type) or ensure that happens under the hood of fetch somewhere.

@wernst wernst added bug Something isn't working @triplit/client labels Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @triplit/client
Projects
None yet
Development

No branches or pull requests

1 participant