Skip to content

createLDSTestWireAdapter does not work with GraphQL wire adapter #64

@mburr-salesforce

Description

@mburr-salesforce

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.

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