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

createLDSTestWireAdapter does not work with GraphQL wire adapter #64

Open
mburr-salesforce opened this issue Sep 30, 2022 · 0 comments
Open

Comments

@mburr-salesforce
Copy link

The new LDS GraphQL wire adapter emits data in the shape { data: ..., errors: [ ... ] }. This prevents component authors from using createLDSTestWireAdapter, which assumes the standard LDS { data: ..., error: ... } shape for emitted values.

Proposal is to create a new createGraphQLTestWireAdapter function & corresponding class in src/adapters that understands both the different shape & the special format of GraphQL errors and provides utility methods for constructing values to emit.

The alternative is to have test authors use createTestWireAdapter and create the GraphQL shapes themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant