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

Ppx generated code is not indexed #164

Open
Coobaha opened this issue Apr 13, 2019 · 1 comment
Open

Ppx generated code is not indexed #164

Coobaha opened this issue Apr 13, 2019 · 1 comment

Comments

@Coobaha
Copy link
Contributor

Coobaha commented Apr 13, 2019

plugin version:
0.75

Description

module Test = [%graphql {|
{
  user {
    name
  }
  allUsers {
    id
  }
}
 |}];

Test.<cursor> /* <--- Autocomplete is empty */

Actual interface is

module Test:
  {
    let ppx_printed_query: string;
    let query: string;
    let parse:
      Js.Json.t =>
      {. "allUsers": Js.Array.t({. "id": string}),
        "user": option({. "name": string})};
    let make:
      unit =>
      {. "parse": Js.Json.t =>
                  {. "allUsers": Js.Array.t({. "id": string}),
                    "user": option({. "name": string})},
        "query": string, "variables": Js.Json.t};
    let makeWithVariables:
      {. } =>
      {. "parse": Js.Json.t =>
                  {. "allUsers": Js.Array.t({. "id": string}),
                    "user": option({. "name": string})},
        "query": string, "variables": Js.Json.t};
    module type mt_ret = { type t; };
    type typed_ret('a) = (module mt_ret with type t = 'a);
    let ret_type: ('a => 'b) => typed_ret('b);
    module MT_Ret:
      {
        type t =
            {. "allUsers": Js.Array.t({. "id": string}),
              "user": option({. "name": string})};
      };
    type t = MT_Ret.t;
  };
@Coobaha
Copy link
Contributor Author

Coobaha commented Apr 13, 2019

Repo with graphql ppx setup https://github.com/Coobaha/reasonml-idea-plugin-graphql-ppx-issue

@giraud giraud added this to the 0.91 milestone Jun 25, 2020
@giraud giraud removed this from the 0.94 milestone Oct 9, 2020
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