graphql.macro icon indicating copy to clipboard operation
graphql.macro copied to clipboard

Latest version only sends fragments to the server

Open mxstbr opened this issue 5 years ago • 2 comments

For some reason when using the latest v1.4.1, the client only sends the fragments to the server but not the query:

export const GetThreadDocument = gql`
  query getThread($id: ID!) {
    thread: node(id: $id) {
      ...thread
      ...threadParticipants
    }
  }
  ${threadFragmentDoc}
  ${threadParticipantsFragmentDoc}
`;

results in only the threadFragmentDoc and the threadParticipantsFragmentDoc being sent to the server.

mxstbr avatar May 20 '19 10:05 mxstbr

Oh, @mxstbr thanks you for testing it so quickly. As I https://github.com/evenchange4/graphql.macro/issues/90#issuecomment-494220259 below the origin issue , it should be fixed with version v1.4.2. Could you test it again?

evenchange4 avatar May 21 '19 03:05 evenchange4

I currently have exactly the opposite problem. The generated DocumentNode only contains the Source for the Query itself but no the fragments. While the definitions list also contains the fragments.

lanwin avatar Dec 03 '19 11:12 lanwin