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

Fragment useage triggers warning number 20 #224

Open
eWert-Online opened this issue Dec 1, 2020 · 3 comments
Open

Fragment useage triggers warning number 20 #224

eWert-Online opened this issue Dec 1, 2020 · 3 comments

Comments

@eWert-Online
Copy link
Contributor

When I am using a fragment inside a query or mutation the warning number 20 is triggered.

Warning number 20
/path/to/File.re

this argument will not be used by the function.

My warnings config in the bsconfig.json looks like this:

"warnings": {
  "number": "+A-42-48",
  "error": "+A-3-44-102-103"
},

The location in the ppxed code seems to be here:

let query: ApolloClient.GraphQL_PPX.templateTagReturnType =
  {
    module J = {
      external unsafe_expr: _ => _ = "#raw_expr";
    };
    J.unsafe_expr(
      "(frag_0) => require(\"@apollo/client\").gql`\n  query ........  ${frag_0}\n`",
    );
  }(
    Fragment.query,
    ^^^^^^^^^^^^^^ this argument will not be used by the function.
  );

Let me know, if you need more info on this 🙂
I am happy to help where I can!

@jfrolich
Copy link
Collaborator

jfrolich commented Dec 2, 2020

This should not happen. Can you make a reproduction? What version of bs-platform are you using?

@eWert-Online
Copy link
Contributor Author

Sure!
The reproduction case can be found here: https://github.com/eWert-Online/graphql_ppx-fragments (on master)

I am currently using bs-platform on version 8.3.3 but downgrading to 8.2.0 doesn't seem to change anything.

@jfrolich
Copy link
Collaborator

jfrolich commented Dec 3, 2020

Thanks!

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

2 participants