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 parse and serialize implementation does not match module signature #296

Open
illusionalsagacity opened this issue Oct 8, 2024 · 0 comments · May be fixed by #297
Open

Fragment parse and serialize implementation does not match module signature #296

illusionalsagacity opened this issue Oct 8, 2024 · 0 comments · May be fixed by #297

Comments

@illusionalsagacity
Copy link

When using [email protected], @reasonml-community/[email protected], and a WIP branch for rescript-apollo-client with these bsconfig.json settings:

{
  "uncurried": true,
  "ppx-flags": [["@reasonml-community/graphql-ppx/ppx", "-uncurried"]],
}

The Fragments.res module's definitions for parse and serialize are not marked as uncurried functions:

  139 ┆ Js.log2("mutate.update To-Do: ", todo)
  140 ┆ let _unusedRef = writeFragment(
  141 ┆   ~fragment=module(Fragments.TodoItem),
  142 ┆   ~data={
  143 ┆     __typename: todo.__typename,

  Signature mismatch:
  ...
  Values do not match:
    let parse: Raw.t => t (curried)
  is not included in
    let parse: Raw.t => t (uncurried)

This seems to be that generate_fragment_signature doesn't use wrap_sig_uncurried_fn for these, like generate_operation_signature does.

illusionalsagacity added a commit to illusionalsagacity/graphql-ppx that referenced this issue Oct 11, 2024
resolves teamwalnut#296

the module signature was not wrapped, and the implementation was wrapped
in another fun that prevented the match in wrap_as_uncurried_fn from
working as intended

I also fixed a warning 53 with the @@tailcall attribute I was getting
for ocaml 5.1.1, maybe I ended up with different versions of something?
@illusionalsagacity illusionalsagacity linked a pull request Oct 11, 2024 that will close this issue
illusionalsagacity added a commit to illusionalsagacity/graphql-ppx that referenced this issue Oct 16, 2024
resolves teamwalnut#296

the module signature was not wrapped, and the implementation was wrapped
in another fun that prevented the match in wrap_as_uncurried_fn from
working as intended

I also fixed a warning 53 with the @@tailcall attribute I was getting
for ocaml 5.1.1, maybe I ended up with different versions of something?

re-run tests
illusionalsagacity added a commit to illusionalsagacity/graphql-ppx that referenced this issue Oct 16, 2024
resolves teamwalnut#296

the module signature was not wrapped, and the implementation was wrapped
in another fun that prevented the match in wrap_as_uncurried_fn from
working as intended

I also fixed a warning 53 with the @@tailcall attribute I was getting
for ocaml 5.1.1, maybe I ended up with different versions of something?

re-run tests
illusionalsagacity added a commit to illusionalsagacity/graphql-ppx that referenced this issue Oct 16, 2024
resolves teamwalnut#296

the module signature was not wrapped, and the implementation was wrapped
in another fun that prevented the match in wrap_as_uncurried_fn from
working as intended

I also fixed a warning 53 with the @@tailcall attribute I was getting
for ocaml 5.1.1, maybe I ended up with different versions of something?

re-run tests
@illusionalsagacity illusionalsagacity changed the title Fragment parse and serialize functions are not marked as uncurried Fragment parse and serialize implementation does not match module signature Oct 16, 2024
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

Successfully merging a pull request may close this issue.

1 participant