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

Move helper types to internal module #132

Merged

Conversation

jsiebern
Copy link
Collaborator

@jsiebern jsiebern commented May 9, 2020

I have moved the helper values / types for hover information into the module Z__INTERNAL as discussed with @jfrolich .

I also added hover support for arguments used on fields:
Bildschirmfoto 2020-05-10 um 00 36 01

As well as variables that are used on field arguments:
Bildschirmfoto 2020-05-10 um 00 36 20

@jsiebern
Copy link
Collaborator Author

jsiebern commented May 9, 2020

Also just added some hover information to [%graphql. @jfrolich Let's gladly discuss if that makes sense or what other / changed information should be displayed there.

Bildschirmfoto 2020-05-10 um 01 21 38

Current placeholder content in full:


--- GraphQL PPX Module ---

The contents of this module are automatically generated by graphql-ppx.
The following is simply an overview of the most important variables and types that you can access from this module.

module MyQuery {
  // This is the stringified representation of your query, which gets sent to the server.
  let query: string;

  // This is the main type of the result you will get back.
  // You can hover above the identifier key (e.g. query or mutation) to see the fully generated type for your module.
  type t;

  // This function turns your raw result from the server into the reason/ocaml representation of that result.
  // Depending on your graphql client library, this process should happen automatically for you.
  let parse: Raw.t => t;

  // This function will prepare your data for sending it back to the server.
  // Depending on your graphql client library, this process should happen automatically for you.
  let serialize: t => Raw.t;

  // The definition tuple is primarily used to interact with client libraries.
  // The types are equivalent to: (parse, query, serialize).
  // Your client library will use these values to provide the properly parsed / serialized data for you.
  let definition: (
    Raw.t => t,
    string,
    t => Raw.t
  );

  // This is the representation of your raw result coming from the server.
  // It should not be necessary to access the types inside for normal use cases.
  module Raw: { type t; };
}

@jfrolich jfrolich merged commit d200892 into teamwalnut:1.0 May 13, 2020
@jfrolich
Copy link
Collaborator

Merged 🎉🎉

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 this pull request may close these issues.

2 participants