Strip Operations from Fragments rather then Erroring #236
Labels
core
Feature requests related to core functionality
project-apollo-client (legacy)
LEGACY TAG DO NOT USE
Currently, passing a DocumentNode containing operations to
readFragment
throws an error:https://github.com/apollographql/apollo-client/blob/master/src/utilities/graphql/fragments.ts#L44-L51
Could existing operations in the DocumentNode just be stripped out instead? The current behavior is very inconvenient if your fragments are defined in .graphql files (via the webpack loader or similar) where the fragment definitions aren't available to Javascript except as part of an operation DocumentNode.
The text was updated successfully, but these errors were encountered: