diff --git a/.gitattributes b/.gitattributes
index fe87397b..10a9a350 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,8 @@
+# Hide generated files
+tests_bucklescript/**/*.bs.js linguist-generated
+tests_bucklescript/static_snapshots/**/* linguist-generated
+
*.re linguist-language=Reason
+*.rei linguist-language=Reason
+
+
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index 9e4bae86..2fda2c6a 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -1,4 +1,4 @@
-name: graphql_ppx pipeline
+name: graphql-ppx-pipeline
on: [pull_request, push]
@@ -12,7 +12,6 @@ jobs:
os: [ubuntu-latest]
container:
- # https://github.com/baransu/docker-esy
image: cichocinski/docker-esy:alpine3.8
steps:
@@ -22,47 +21,40 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- - name: Get esy store path
- id: esy_cache_path
- shell: bash
- run: |
- # COMPUTE THE ESY INSTALL CACHE LOCATION AHEAD OF TIME
- DESIRED_LEN="86"
- HOME_ESY3="$HOME/.esy/3"
- HOME_ESY3_LEN=${#HOME_ESY3}
- NUM_UNDERS=$(echo "$(($DESIRED_LEN-$HOME_ESY3_LEN))")
- UNDERS=$(printf "%-${NUM_UNDERS}s" "_")
- UNDERS="${UNDERS// /_}"
- THE_ESY__CACHE_INSTALL_PATH=${HOME_ESY3}${UNDERS}/i
- echo "THE_ESY__CACHE_INSTALL_PATH: $THE_ESY__CACHE_INSTALL_PATH"
- echo "##[set-output name=path;]$THE_ESY__CACHE_INSTALL_PATH"
- - name: Restore esy cache
- uses: actions/cache@v1
+ - name: Install
+ run: esy install
+
+ - name: Print esy cache
+ id: print_esy_cache
+ run: node .github/workflows/print_esy_cache.js
+
+ - name: Try to restore dependencies cache
+ id: deps-cache-macos
+ uses: actions/cache@v2
with:
- path: ${{ steps.esy_cache_path.outputs.path }}
- key: v1-esy-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
- restore-keys: |
- v1-esy-${{ matrix.os }}-
+ path: ${{ steps.print_esy_cache.outputs.esy_cache }}
+ key: ${{ matrix.os }}--${{ hashFiles('**/index.json') }}
- - name: install
- run: |
- esy install
- - name: test-native
- run: |
- esy b dune runtest -f
+ - name: build
+ run: esy b
+
+ # - name: test-native
+ # run: |
+ # esy b dune runtest -f
+ # env:
+ # CI: true
+
+ - name: test-bucklescript
env:
+ NODE_NO_WARNINGS: 1
CI: true
- - name: test-bucklescript
run: |
esy release-static
cd tests_bucklescript
npm ci --no-optional
npm run test
- env:
- CI: true
- name: (only on release) Upload artifacts ${{ matrix.os }}
- if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@master
with:
name: ${{ matrix.os }}
@@ -74,56 +66,46 @@ jobs:
strategy:
matrix:
node-version: [12.x]
- os: [windows-2016, macOS-latest]
+ os: [windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
+
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
+
- name: Install esy
run: |
npm install -g esy@0.6.0
- - name: Get esy store path
- id: esy_cache_path
- shell: bash
- run: |
- # COMPUTE THE ESY INSTALL CACHE LOCATION AHEAD OF TIME
- if [ "${{ matrix.os }}" == "windows-latest" ]; then
- THE_ESY__CACHE_INSTALL_PATH=$HOME/.esy/3_/i
- THE_ESY__CACHE_INSTALL_PATH=$( cygpath --mixed --absolute "$THE_ESY__CACHE_INSTALL_PATH")
- else
- DESIRED_LEN="86"
- HOME_ESY3="$HOME/.esy/3"
- HOME_ESY3_LEN=${#HOME_ESY3}
- NUM_UNDERS=$(echo "$(($DESIRED_LEN-$HOME_ESY3_LEN))")
- UNDERS=$(printf "%-${NUM_UNDERS}s" "_")
- UNDERS="${UNDERS// /_}"
- THE_ESY__CACHE_INSTALL_PATH=${HOME_ESY3}${UNDERS}/i
- fi
- echo "THE_ESY__CACHE_INSTALL_PATH: $THE_ESY__CACHE_INSTALL_PATH"
- echo "##[set-output name=path;]$THE_ESY__CACHE_INSTALL_PATH"
- - name: Restore esy cache
- uses: actions/cache@v1
+ - name: Install
+ run: esy install
+
+ - name: Print esy cache
+ id: print_esy_cache
+ run: node .github/workflows/print_esy_cache.js
+
+ - name: Try to restore dependencies cache
+ id: deps-cache-macos
+ uses: actions/cache@v2
with:
- path: ${{ steps.esy_cache_path.outputs.path }}
- key: v1-esy-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
- restore-keys: |
- v1-esy-${{ matrix.os }}-
+ path: ${{ steps.print_esy_cache.outputs.esy_cache }}
+ key: ${{ matrix.os }}-${{ hashFiles('**/index.json') }}
+
+ - name: build
+ run: esy b
+
+ # - name: test-native
+ # run: |
+ # esy b dune runtest -f
+ # env:
+ # CI: true
- - name: install
- run: |
- esy install
- - name: test-native
- run: |
- esy b dune runtest -f
- env:
- CI: true
- name: test-bucklescript
+ if: runner.os != 'Windows'
run: |
- esy b
cd tests_bucklescript
npm ci --no-optional
npm run test
@@ -131,15 +113,13 @@ jobs:
CI: true
- name: (only on release) Upload artifacts ${{ matrix.os }}
- if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@master
with:
name: ${{ matrix.os }}
path: _build/default/src/bucklescript_bin/bin.exe
publish:
- needs: test_and_build
- if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/')
+ needs: [test_and_build, test_and_build_linux]
name: (only on release) Publish
runs-on: ubuntu-latest
steps:
@@ -174,12 +154,20 @@ jobs:
if: success()
run: |
mkdir -p bin
- mv binaries/darwin/bin.exe bin/graphql_ppx-darwin-x64.exe
- mv binaries/windows/bin.exe bin/graphql_ppx-win-x64.exe
- mv binaries/linux/bin.exe bin/graphql_ppx-linux-x64.exe
+ mv binaries/darwin/bin.exe bin/graphql-ppx-darwin-x64.exe
+ mv binaries/windows/bin.exe bin/graphql-ppx-win-x64.exe
+ mv binaries/linux/bin.exe bin/graphql-ppx-linux-x64.exe
- name: Publish
+ if: success() && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/')
+ run: npm publish --tag=next
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_JAAP }}
+
+ - name: Publish Prerelease
if: success()
- run: npm publish
+ run: |
+ npm version prerelease -preid $(git rev-parse --short HEAD) -no-git-tag-version
+ npm publish --tag=dev
env:
- NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_JAAP }}
diff --git a/.github/workflows/print_esy_cache.js b/.github/workflows/print_esy_cache.js
new file mode 100644
index 00000000..570c32ea
--- /dev/null
+++ b/.github/workflows/print_esy_cache.js
@@ -0,0 +1,13 @@
+const fs = require("fs");
+const os = require("os");
+const path = require("path");
+
+const ESY_FOLDER = process.env.ESY__PREFIX
+ ? process.env.ESY__PREFIX
+ : path.join(os.homedir(), ".esy");
+const esy3 = fs
+ .readdirSync(ESY_FOLDER)
+ .filter((name) => name.length > 0 && name[0] === "3")
+ .sort()
+ .pop();
+console.log(`::set-output name=esy_cache::${path.join(ESY_FOLDER, esy3, "i")}`);
diff --git a/.gitignore b/.gitignore
index 36c6bd5c..933bd45f 100755
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,12 @@ _release
graphql_ppx.exe
yarn-error.log
/bin
+.DS_Store
+.bsb.lock
+npm-debug.log
+/lib
+/build/
+*.cmi
+*.cmj
+*.cmt
+.vscode
diff --git a/README.md b/README.md
index e0c19358..9ab75567 100755
--- a/README.md
+++ b/README.md
@@ -1,367 +1,153 @@
-# graphql_ppx
+> This is README for the upcoming 1.0 release. It's available via "@reasonml-community/graphql-ppx@next", contains breaking changes and may not work. If you're using 0.x version please check [README from master branch](https://github.com/reasonml-community/graphql-ppx/blob/master/README.md)
-[](https://badge.fury.io/js/%40baransu%2Fgraphql_ppx_re)
+
+
+
+ Typesafe GraphQL operations and fragments in ReasonML
+
-> Reason/OCaml PPX (PreProcessor eXtension) helping with creating type-safe, compile time validated GraphQL queries generating response decoders.
+
+
+
+
+
+
+
+
-This project builds upon [mhallin/graphql_ppx](https://github.com/mhallin/graphql_ppx). It wouldn't be possible without great work of [mhallin/graphql_ppx contributors](https://github.com/mhallin/graphql_ppx/graphs/contributors).
+
+ Documentation •
+ Features •
+ Installation •
+ Usage •
+ Roadmap •
+ Contributing •
+ License •
+ Acknowledgements
+
-# Installation
+## Documentation
-First, add it to you dependencies using `npm` or `yarn`:
+[Go to the official documentation](https://beta.graphql-ppx.com)
-```sh
-yarn add @baransu/graphql_ppx_re --dev
-# or
-npm install @baransu/graphql_ppx_re --saveDev
-```
-
-Second, add it to `ppx-flags` in your `bsconfig.json`:
-
-```json
-"ppx-flags": ["@baransu/graphql_ppx_re/ppx"]
-```
+## Features
-## Native
+- Language level GraphQL primitives
-If you want to use native version edit your `esy.json` file
+- Building block for GraphQL clients
-```json
-{
- "dependencies": {
- "graphql_ppx": "*"
- },
- "resolutions": {
- "graphql_ppx": "reasonml-community/graphql_ppx:esy.json#"
- }
-}
-```
+- 100% type safe
-and update your `dune` file:
+## Installation
-```
-(preprocess (pps graphql_ppx))
-```
+### Schema
-# Usage
+`graphql-ppx` needs your graphql schema to be available in the form of a
+`graphql_schema.json` file.
-This plugin requires a `graphql_schema.json` file to exist somewhere in the
-project hierarchy, containing the result of sending an [introspection
-query](https://github.com/graphql/graphql-js/blob/master/src/utilities/introspectionQuery.js)
-to your backend. The easiest way to do this is by using `get-graphql-schema`:
+The easiest way to add this to your project is using an
+[introspection query](https://github.com/graphql/graphql-js/blob/master/src/utilities/introspectionQuery.js)
+to your backend. You can do this using `get-graphql-schema`:
```sh
npx get-graphql-schema ENDPOINT_URL -j > graphql_schema.json
```
-## Ignore `.graphql_ppx_cache` in your version control
+With `ENDPOINT_URL` being the URL of your GraphQL endpoint.
-`graphql_ppx` will generate a `.graphql_ppx_cache` folder alongside your JSON
-schema to optimize parsing performance. If you're
-using a version control system, you don't need to check it in.
+### Cache
-# Limitations
+`graphql-ppx` will generate a `.graphql_ppx_cache` folder alongside your JSON
+schema to optimize parsing performance. If you're using a version control
+system, you don't need to check it in.
-While `graphql_ppx` covers a large portion of the GraphQL spec, there are still
-some unsupported areas:
+The next pages will provide further installation instructions whether you are
+using `graphql-ppx` with Bucklescript or using Reason Native.
-- Not all GraphQL validations are implemented. It will _not_ validate argument
- types and do other sanity-checking of the queries. The fact that a query
- compiles does not mean that it will pass server-side validation.
-- Fragment support is limited and not 100% safe - because `graphql_ppx` only can
- perform local reasoning on queries, you can construct queries with fragments
- that are invalid.
+### Bucklescript
-# Features
+First, add it to you dependencies using `npm` or `yarn`:
-- Objects are converted into `Js.t` objects
-- Enums are converted into [polymorphic
- variants](https://2ality.com/2018/01/polymorphic-variants-reasonml.html)
-- Floats, ints, strings, booleans, id are converted into their corresponding native
- Reason/OCaml types.
-- Custom scalars are parsed as `Js.Json.t`
-- Arguments with input objects
-- Using `@skip` and `@include` will force non-optional fields to become
- optional.
-- Unions are converted to polymorphic variants, with exhaustiveness checking.
- This only works for object types, not for unions containing interfaces.
-- Interfaces are also converted into polymorphic variants. Overlapping interface
- selections and other more uncommon use cases are not yet supported.
-- Basic fragment support
-- Required arguments validation - you're not going to miss required arguments on any field.
+```sh
+yarn add @reasonml-community/graphql-ppx@next --dev
+# or
+npm install @reasonml-community/graphql-ppx@next --saveDev
+```
-# Extra features
+Second, add it to `ppx-flags` and `bs-dependencies` in your `bsconfig.json`:
-By using some directives prefixed `bs`, `graphql_ppx` lets you modify how the
-result of a query is parsed. All these directives will be removed from the query
-at compile time, so your server doesn't have to support them.
+```json
+"ppx-flags": ["@reasonml-community/graphql-ppx/ppx"],
+"bs-dependencies": ["@reasonml-community/graphql-ppx"]
+```
-### Record conversion
+### Native
-While `Js.t` objects often have their advantages, they also come with some
-limitations. For example, you can't create new objects using the spread (`...`)
-syntax or pattern match on their contents. Since they are not named, they also
-result in quite large type error messages when there are mismatches.
+#### Caution!
-Reason/OCaml records, on the other hand, can be pattern matched, created using the
-spread syntax, and give nicer error messages when they mismatch. `graphql_ppx`
-gives you the option to decode a field as a record using the `@bsRecord`
-directive:
+The Bucklescript version of `graphql-ppx` was almost completely rewritten for the
+1.0 release, with many improvements and changes. This documentation will focus
+on the API of the bucklescript version. This means that most of the examples
+won't apply for the Reason Native version. Please take a look at the
+[old documentation](https://github.com/reasonml-community/graphql-ppx/tree/v0.7.1).
+At the same time we welcome contributions to modernize the Reason Native version
+of `graphql-ppx`
+:::
-```reason
-type hero = {
- name: string,
- height: number,
- mass: number
-};
+You need to provide the following dependency in your `esy.json` file
-module HeroQuery = [%graphql {|
+```json
{
- hero @bsRecord {
- name
- height
- mass
+ "dependencies": {
+ "graphql-ppx": "*"
+ },
+ "resolutions": {
+ "graphql-ppx": "reasonml-community/graphql-ppx:esy.json#"
}
}
-|}];
```
-Note that the record has to already exist and be in scope for this to work.
-`graphql_ppx` will not _create_ the record. Even though this involves some
-duplication of both names and types, type errors will be generated if there are
-any mismatches.
-
-### Custom field decoders
-
-If you've got a custom scalar, or just want to convert e.g. an integer to a
-string to properly fit a record type (see above), you can use the `@bsDecoder`
-directive to insert a custom function in the decoder:
+and update your `dune` file:
-```reason
-module HeroQuery = [%graphql {|
-{
- hero {
- name
- height @bsDecoder(fn: "string_of_float")
- mass
- }
-}
-|}];
+```
+(preprocess (pps graphql_ppx))
```
-In this example, `height` will be converted from a float to a string in the
-result. Using the `fn` argument, you can specify any function literal you want.
-
-### Non-union variant conversion
+## Usage
-If you've got an object which in practice behaves like a variant - like `signUp`
-above, where you _either_ get a user _or_ a list of errors - you can add a
-`@bsVariant` directive to the field to turn it into a polymorphic variant:
+Make your first query:
```reason
-module SignUpQuery = [%graphql
- {|
-mutation($name: String!, $email: String!, $password: String!) {
- signUp(email: $email, email: $email, password: $password) @bsVariant {
+[%graphql {|
+ query UserQuery {
user {
+ id
name
}
-
- errors {
- field
- message
- }
}
-}
-|}
-];
-
-let _ =
- SignUpQuery.make(
- ~name="My name",
- ~email="email@example.com",
- ~password="secret",
- (),
- )
- |> Api.sendQuery
- |> Promise.then_(response =>
- (
- switch (response##signUp) {
- | `User(user) => Js.log2("Signed up a user with name ", user##name)
- | `Errors(errors) => Js.log2("Errors when signing up: ", errors)
- }
- )
- |> Promise.resolve
- );
-
-```
-
-This helps with the fairly common pattern for mutations that can fail with
-user-readable errors.
-
-### Alternative `Query.make` syntax
-
-When you define a query with variables, the `make` function will take
-corresponding labelled arguments. This is convenient when constructing and
-sending the queries yourself, but might be problematic when trying to abstract
-over multiple queries.
-
-For this reason, another function called `makeWithVariables` is _also_
-generated. This function takes a single `Js.t` object containing all variables.
-
-```reason
-module MyQuery = [%graphql
- {|
- mutation ($username: String!, $password: String!) {
- ...
- }
-|}
-];
-
-/* You can either use `make` with labelled arguments: */
-let query = MyQuery.make(~username="testUser", password = "supersecret", ());
-
-/* Or, you can use `makeWithVariables`: */
-let query =
- MyQuery.makeWithVariables({
- "username": "testUser",
- "password": "supersecret",
- });
-```
-
-### Getting the type of the parsed value
-
-If you want to get the type of the parsed and decoded value - useful in places
-where you can't use Reason/OCaml's type inference - use the `t` type of the query
-module:
-
-```reason
-module MyQuery = [%graphql {| { hero { name height }} |}];
-
-/* This is something like Js.t({ . hero: Js.t({ name: string, weight: float }) }) */
-type resultType = MyQuery.t;
-```
-
-# Troubleshooting
-
-### "Type ... doesn't have any fields"
-
-Sometimes when working with union types you'll get the following error.
-
-```
-Fatal error: exception Graphql_ppx_base__Schema.Invalid_type("Type IssueTimelineItems doesn't have any fields")
-```
-
-This is an example of a query that will result in such error:
-
-```graphql
-nodes {
- __typename
- ... on ClosedEvent {
- closer {
- __typename
- ... on PullRequest {
- id
- milestone { id }
- }
- }
- }
-}
-```
-
-This is because we allow querying union fields only in certain cases. GraphQL provides the `__typename` field but it's not present in GraphQL introspection query thus `graphql_ppx` doesn't know that this field exists.
-To fix your query simply remove `__typename`. It's added behinds a scene as an implementation detail and serves us as a way to decide which case to select when parsing your query result.
-
-This is an example of a correct query:
-
-```graphql
-nodes {
- ... on ClosedEvent {
- closer {
- ... on PullRequest {
- id
- milestone { id }
- }
- }
- }
-}
-```
-
-# Configuration
-
-If you need to customize certain features of `graphql_ppx` you can provide ppx arguments to do so:
-
-### -apollo-mode
-
-By default `graphql_ppx` adds `__typename` only to fields on which we need those informations (Unions and Interfaces). If you want to add `__typename` on every object in a query you can specify it by using `-apollo-mode` in `ppx-flags`. It's usefull in case of using `apollo-client` because of it's cache.
-
-```json
-"ppx-flags": [
- ["@baransu/graphql_ppx_re/ppx", "-apollo-mode",]
-],
-```
-
-### -schema
-
-By default `graphql_ppx` uses `graphql_schema.json` file from your root directory. You can override it by providing `-schema` argument in `ppx-flags` to overriding it.
-
-```json
-"ppx-flags": [
- ["@baransu/graphql_ppx_re/ppx", "-schema ../graphql_schema.json"]
-],
-```
-
-# Query specific configuration
-
-If you want to use multiple schemas in your project it can be provided as a secondary config argument in your graphql ppx definition.
-
-```reason
-module MyQuery = [%graphql
- {|
- query pokemon($id: String, $name: String) {
- pokemon(name: $name, id: $id) {
- id
- name
- }
- }
- |};
- {schema: "pokedex_schema.json"}
-];
+|}];
```
-This will use the `pokedex_schema.json` instead of using the default `graphql_schema.json` file.
+[Open getting started in the docs](https://beta.graphql-ppx/docs/getting-started)
-This opens up the possibility to use multiple different GraphQL APIs in the same project.
+## Roadmap
-**Note** the path to your file is based on where you run `bsb`. In this case `pokedex_schema.json` is a sibling to `node_modules`.
+See our [development board](https://github.com/reasonml-community/graphql-ppx/projects/1) for a list of selected features and issues.
-# Supported platforms
+## Contributing
-`graphql_ppx` somes with prebuild binaries for `linux-x64`, `darwin-x64` and `win-x64`. If you need support for other platform, please open an issue.
+We'd love your help improving `graphql-ppx`!
-# Contributing
+Take a look at our [Contributing Guide](https://beta.graphql-ppx.com/docs/contributing) to get started.
-## Developing
+## License
-```
-npm install -g esy@latest
-esy install
-esy build
-```
+Distributed under the MIT License. See [LICENSE](LICENSE) for more information.
-## Running tests
+## Acknowledgements
-### BuckleScript
+Thanks to everyone who [contributed](https://github.com/reasonml-community/graphql-ppx/graphs/contributors) to `graphql-ppx`!
-```
-cd tests_bucklescript
-npm test
-```
-
-### Native
-
-For native run:
-
-```
-esy dune runtest -f
-```
+This project builds upon [mhallin/graphql_ppx](https://github.com/mhallin/graphql_ppx). It wouldn't be possible without
+great work of [mhallin/graphql_ppx contributors](https://github.com/mhallin/graphql_ppx/graphs/contributors).
+1
diff --git a/bsconfig.json b/bsconfig.json
new file mode 100644
index 00000000..7a73d234
--- /dev/null
+++ b/bsconfig.json
@@ -0,0 +1,15 @@
+{
+ "name": "graphql-ppx",
+ "refmt": 3,
+ "package-specs": {
+ "module": "es6",
+ "in-source": true
+ },
+ "suffix": ".bs.js",
+ "sources": [
+ {
+ "dir": "bucklescript",
+ "subdirs": true
+ }
+ ]
+}
diff --git a/bucklescript/GraphQL_PPX.bs.js b/bucklescript/GraphQL_PPX.bs.js
new file mode 100644
index 00000000..60058f0d
--- /dev/null
+++ b/bucklescript/GraphQL_PPX.bs.js
@@ -0,0 +1,42 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+
+
+function deepMerge(json1, json2) {
+ var match_000 = json1 === null;
+ var match_001 = Array.isArray(json1);
+ var match_002 = typeof json1 === "object";
+ var match_000$1 = json2 === null;
+ var match_001$1 = Array.isArray(json2);
+ var match_002$1 = typeof json2 === "object";
+ if (match_001) {
+ if (match_001$1) {
+ return json1.map((function (el1, idx) {
+ var el2 = json2[idx];
+ if (typeof el2 === "object") {
+ return deepMerge(el1, el2);
+ } else {
+ return el2;
+ }
+ }));
+ } else {
+ return json2;
+ }
+ } else if (match_000 || !(match_002 && !(match_000$1 || match_001$1 || !match_002$1))) {
+ return json2;
+ } else {
+ var obj1 = Object.assign({ }, json1);
+ Object.keys(json2).forEach((function (key) {
+ var existingVal = obj1[key];
+ var newVal = json2[key];
+ obj1[key] = typeof existingVal !== "object" ? newVal : deepMerge(existingVal, newVal);
+ return /* () */0;
+ }));
+ return obj1;
+ }
+}
+
+export {
+ deepMerge ,
+
+}
+/* No side effect */
diff --git a/bucklescript/GraphQL_PPX.re b/bucklescript/GraphQL_PPX.re
new file mode 100644
index 00000000..d72cee06
--- /dev/null
+++ b/bucklescript/GraphQL_PPX.re
@@ -0,0 +1,52 @@
+// will be inlined by bucklescript
+let%private clone: Js.Dict.t('a) => Js.Dict.t('a) =
+ a => Obj.magic(Js.Obj.assign(Obj.magic(Js.Obj.empty()), Obj.magic(a)));
+
+// merging two json objects deeply
+let rec deepMerge = (json1: Js.Json.t, json2: Js.Json.t) => {
+ switch (
+ (
+ Obj.magic(json1) == Js.null,
+ Js_array2.isArray(json1),
+ Js.typeof(json1) == "object",
+ ),
+ (
+ Obj.magic(json2) == Js.null,
+ Js_array2.isArray(json2),
+ Js.typeof(json2) == "object",
+ ),
+ ) {
+ // merge two arrays
+ | ((_, true, _), (_, true, _)) => (
+ Obj.magic(
+ Js.Array.mapi(
+ (el1, idx) => {
+ let el2 = Js.Array.unsafe_get(Obj.magic(json2), idx);
+ // it cannot be undefined, because two arrays should always be the
+ // same length in graphql responses
+ Js.typeof(el2) == "object" ? deepMerge(el1, el2) : el2;
+ },
+ Obj.magic(json1),
+ ),
+ ): Js.Json.t
+ )
+ // two objects that are not null and not arrays
+ | ((false, false, true), (false, false, true)) =>
+ let obj1 = clone(Obj.magic(json1));
+ let obj2 = Obj.magic(json2);
+ Js.Dict.keys(obj2)
+ |> Js.Array.forEach(key => {
+ let existingVal: Js.Json.t = Js.Dict.unsafeGet(obj1, key);
+ let newVal: Js.Json.t = Js.Dict.unsafeGet(obj2, key);
+ Js.Dict.set(
+ obj1,
+ key,
+ Js.typeof(existingVal) != "object"
+ ? newVal : Obj.magic(deepMerge(existingVal, newVal)),
+ );
+ });
+ Obj.magic(obj1);
+ // object that becomes null
+ | ((_, _, _), (_, _, _)) => json2
+ };
+};
diff --git a/copyPlatformBinaryInPlace.js b/copyPlatformBinaryInPlace.js
index 892a2e83..fe7f6d51 100644
--- a/copyPlatformBinaryInPlace.js
+++ b/copyPlatformBinaryInPlace.js
@@ -13,22 +13,20 @@ if (platform === "win32") {
platform = "win";
}
-copyBinary("bin/graphql_ppx-" + platform + "-" + arch + ".exe", "ppx");
-// for backward compatibility - remove with 1.0 release
-copyBinary("bin/graphql_ppx-" + platform + "-" + arch + ".exe", "ppx6");
+copyBinary("bin/graphql-ppx-" + platform + "-" + arch + ".exe", "ppx");
function copyBinary(filename, destFilename) {
var supported = fs.existsSync(filename);
if (!supported) {
- console.error("graphql_ppx does not support this platform :(");
+ console.error("graphql-ppx does not support this platform :(");
console.error("");
console.error(
- "graphql_ppx comes prepacked as built binaries to avoid large"
+ "graphql-ppx comes prepacked as built binaries to avoid large"
);
console.error("dependencies at build-time.");
console.error("");
- console.error("If you want graphql_ppx to support this platform natively,");
+ console.error("If you want graphql-ppx to support this platform natively,");
console.error(
"please open an issue at our repository, linked above. Please"
);
@@ -42,7 +40,7 @@ function copyBinary(filename, destFilename) {
if (process.env.IS_GRAPHQL_PPX_CI) {
console.log(
- "graphql_ppx: IS_GRAPHQL_PPX_CI has been set, skipping moving binary in place"
+ "graphql-ppx: IS_GRAPHQL_PPX_CI has been set, skipping moving binary in place"
);
process.exit(0);
}
diff --git a/documentation/.gitignore b/documentation/.gitignore
new file mode 100755
index 00000000..1b34df51
--- /dev/null
+++ b/documentation/.gitignore
@@ -0,0 +1,20 @@
+# dependencies
+/node_modules
+
+# production
+/build
+
+# generated files
+.docusaurus
+.cache-loader
+
+# misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
\ No newline at end of file
diff --git a/documentation/.prettierrc b/documentation/.prettierrc
new file mode 100644
index 00000000..5b5bd993
--- /dev/null
+++ b/documentation/.prettierrc
@@ -0,0 +1,3 @@
+{
+ "proseWrap": "always"
+}
diff --git a/documentation/docs/clients.md b/documentation/docs/clients.md
new file mode 100644
index 00000000..73d38c27
--- /dev/null
+++ b/documentation/docs/clients.md
@@ -0,0 +1,9 @@
+---
+title: Clients
+---
+
+You can use `graphql-ppx` with the following clients
+
+- [Apollo](https://github.com/Astrocoders/reason-apollo-hooks/pull/117)
+- [urql](https://github.com/FormidableLabs/reason-urql)
+- [Gatsby](https://github.com/jfrolich/reason-gatsby)
diff --git a/documentation/docs/configuration.md b/documentation/docs/configuration.md
new file mode 100644
index 00000000..bc9c9be7
--- /dev/null
+++ b/documentation/docs/configuration.md
@@ -0,0 +1,60 @@
+---
+title: Configuration
+---
+
+## `bsconfig.json`
+
+## configuration in extension point
+
+If you want to use multiple schemas in your project it can be provided as a
+secondary config argument in your `graphql-ppx` definition.
+
+```reason
+module MyQuery = [%graphql
+ {|
+ query pokemon($id: String, $name: String) {
+ pokemon(name: $name, id: $id) {
+ id
+ name
+ }
+ }
+ |};
+ {schema: "pokedex_schema.json"}
+];
+```
+
+This will use the `pokedex_schema.json` instead of using the default
+`graphql_schema.json` file.
+
+This opens up the possibility to use multiple different GraphQL APIs in the same
+project.
+
+**Note** the path to your file is based on where you run `bsb`. In this case
+`pokedex_schema.json` is a sibling to `node_modules`.
+
+## command line configuration
+
+### -apollo-mode
+
+By default `graphql-ppx` adds `__typename` only to fields on which we need those
+informations (Unions and Interfaces). If you want to add `__typename` on every
+object in a query you can specify it by using `-apollo-mode` in `ppx-flags`.
+It's usefull in case of using `apollo-client` because of it's cache.
+
+```json
+"ppx-flags": [
+ ["@reasonml-community/graphql-ppx/ppx", "-apollo-mode",]
+],
+```
+
+### -schema
+
+By default `graphql-ppx` uses `graphql_schema.json` file from your root
+directory. You can override it by providing `-schema` argument in `ppx-flags` to
+overriding it.
+
+```json
+"ppx-flags": [
+ ["@baransu/graphql-ppx/ppx", "-schema ../graphql_schema.json"]
+],
+```
diff --git a/documentation/docs/contributing.md b/documentation/docs/contributing.md
new file mode 100644
index 00000000..3e92b27f
--- /dev/null
+++ b/documentation/docs/contributing.md
@@ -0,0 +1,28 @@
+---
+title: Contributing
+---
+
+## Developing
+
+```
+npm install -g esy@latest
+esy install
+esy build
+```
+
+## Running tests
+
+### BuckleScript
+
+```
+cd tests_bucklescript
+npm test
+```
+
+### Native
+
+For native run:
+
+```
+esy dune runtest -f
+```
diff --git a/documentation/docs/custom-fields.md b/documentation/docs/custom-fields.md
new file mode 100644
index 00000000..a31f31e2
--- /dev/null
+++ b/documentation/docs/custom-fields.md
@@ -0,0 +1,34 @@
+---
+title: Custom Fields
+---
+
+If you've got a custom scalar, or just want to convert e.g. an integer to a
+string to properly fit a record type (see above), you can use the `@ppxCustom`
+directive to insert a custom function in the decoder:
+
+```reason
+module StringHeight = {
+ let parse = (height) => string_of_float(height);
+ let serialize = (height) => float_of_string(height);
+ type t = string;
+}
+
+
+module HeroQuery = [%graphql {|
+{
+ hero {
+ name
+ height @ppxCustom(module: "StringHeight")
+ mass
+ }
+}
+|}];
+```
+
+In this example, `height` will be converted from a float to a string in the
+result. Using the `module` argument, you can specify any decoder module with the
+functions `parse`, `serialize` and type `t`.
+
+If you have custom scalars that you'd always would like to conver to a specific
+type. You can do that in the `custom-fields` part of the `bsconfig.json`
+configuration.
diff --git a/documentation/docs/data-structures.md b/documentation/docs/data-structures.md
new file mode 100644
index 00000000..e30d64b7
--- /dev/null
+++ b/documentation/docs/data-structures.md
@@ -0,0 +1,15 @@
+---
+title: Data Structures
+---
+
+`graphql-ppx` converts GraphQL data and arguments from "pure" JSON data to
+idiomatic ReasonML data structures:
+
+- GraphQL objects are converted into records
+- Unions, interfaces and enums are converted into
+ [polymorphic variants](https://2ality.com/2018/01/polymorphic-variants-reasonml.html)
+ with exhaustiveness checking
+- Floats, ints, strings, booleans, id are converted into their corresponding
+ native Reason/OCaml types
+- Custom scalars are `Js.Json.t` and can be parsed using the `@ppxCustom`
+ directive
diff --git a/documentation/docs/definition.md b/documentation/docs/definition.md
new file mode 100644
index 00000000..15048211
--- /dev/null
+++ b/documentation/docs/definition.md
@@ -0,0 +1,226 @@
+---
+title: Definition
+---
+
+A GraphQL definition (an [operation](operation) or a fragment) has the following
+module type:
+
+```reason
+module type Definition = {
+ module Raw: {
+ type t;
+ };
+
+ type t;
+
+ let query: string;
+
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+
+ let unsafe_fromJson: Js.Json.t => Raw.t;
+ let toJson: Raw.t => Js.Json.t;
+}
+```
+
+## Types
+
+### Type `t`
+
+This is the parsed GraphQL data. This is the data type that you interact with in
+most cases.
+
+#### Data types
+
+##### Objects
+
+Objects are encoded as records
+
+##### Nullable
+
+Nullable are encoded as `option`
+
+##### Unions
+
+Unions are encoded as polymorphic variants. The members are encoded as
+`` `Option1(t_myUnion_Option1) ``
+
+##### Lists
+
+Arrays are just typed as `array`.
+
+##### Interfaces
+
+Interfaces are typed just like unions. We do not allow shared field at the
+moment.
+
+##### Scalars (String / Int / Float)
+
+These map to their native types.
+
+##### Fragment spreads
+
+Fragment spreads are encoded as their fragment type when the spread is the only
+field in an object. For instance:
+
+```reason
+[%graphql
+ {|
+ query MyQuery {
+ myField {
+ ...MyFragment
+ }
+ |}
+]
+```
+
+The type of `myField` is `MyFragment.t`.
+
+When we have more fields:
+
+```reason
+[%graphql
+ {|
+ query MyQuery {
+ myField {
+ ...MyFragment
+ otherField
+ }
+ |}
+]
+```
+
+The type will become a record with the keys `otherField` as the other field and
+`myFragment` as `MyFragment.t`.
+
+##### Custom scalars
+
+Custom scalars are generally `Js.Json.t` unless you use
+[custom fields](custom-fields)
+
+### Type `Raw.t`
+
+This is the (no cost) type of the JSON compatible GraphQL data. You can use this
+directly, but usually you would use the parsed data. This is the raw data with
+some conversions to ReasonML data types. This is a record.
+
+#### Data types
+
+##### Objects
+
+Objects are encoded as records
+
+##### Nullable
+
+Nullable are encoded as `Js.Nullable.t`
+
+##### Unions
+
+Unions are encoded as an opaque type. Each union has a member type definition.
+
+So if we have `t_myUnion` (opaque), for each member type we have another type
+(`t_myUnion_Option1`). If you know what type a union is you can cast it into the
+specific type with zero cost.
+
+##### Lists
+
+GraphQL lists are typed as `array`.
+
+##### Interfaces
+
+Interfaces are typed just like unions. We do not allow shared field at the
+moment.
+
+##### Scalars (String, Float, Int)
+
+These map to their native types.
+
+##### Fragment spreads
+
+Fragment spreads are encoded as their fragment type when the spread is the only
+field in an object. For instance:
+
+```reason
+[%graphql
+ {|
+ query MyQuery {
+ myField {
+ ...MyFragment
+ }
+ |}
+]
+```
+
+The type of `myField` is `MyFragment.Raw.t`.
+
+When we have more fields:
+
+```reason
+[%graphql
+ {|
+ query MyQuery {
+ myField {
+ ...MyFragment
+ otherField
+ }
+ |}
+]
+```
+
+The type becomes an opaque type that can be cast to `Js.Json.t` (or
+`MyFragment.Raw.t`).
+
+##### Custom scalars
+
+Custom scalars are represented as `Js.Json.t`
+
+## Bindings
+
+### `query`
+
+This is the plain GraphQL query string.
+
+### `parse`
+
+The plain JSON compatible data (`Raw.t`) is of limited use.
+
+- Nullable values are represented as `Js.Nullable.t`
+- Unions are opaque types because they can not be represented in Reason
+- Enums are strings
+
+It might be useful for simple data, and the upside is that it is 100% zero cost.
+
+However to get the best developer experience we need to slightly transform the
+JavaScript data to convert it to ReasonML types. Including:
+
+- Converting `Js.Nullable.t` to option types
+- Converting Unions to Polymorphic Variants
+- Converting Enums to Polymorphic Variants
+
+`parse` is a generated function that does this work for you. It tries to be the
+lowest cost function in order to transform the data to these ReasonML types.
+
+This function is usually being used internally within the GraphQL client.
+
+### `serialize`
+
+Sometimes you'd like to serialize the `t` data type back to the JSON compatible
+`Raw.t`. For instance when you change the data and you'd like to updat the
+cache. Or when you want to construct an optimistic update of a GraphQL response.
+
+`serialize` offers this functionality.
+
+This function is usually being used interally within the GraphQL client.
+
+### `unsafe_fromJson`
+
+This function is a zero cost function that converts a `Js.Json.t` to `Raw.t`. We
+have to be sure that this is a valid server response from the specific
+operation, or is the data of a fragment.
+
+Because `Js.Json.t` is a generic type this function is unsafe. It will only work
+properly for a specific shape of `Js.Json.t` (response of the query).
+
+### `toJson`
+
+This is a zero cost function that will convert `Raw.t` to `Js.Json.t`.
diff --git a/documentation/docs/directives.md b/documentation/docs/directives.md
new file mode 100644
index 00000000..449e5bef
--- /dev/null
+++ b/documentation/docs/directives.md
@@ -0,0 +1,41 @@
+---
+title: Directives
+---
+
+`graphql-ppx` is offering some directives to customize how the ppx is handling
+operations or fragments.
+
+## `arguments`
+
+See [Fragment](fragment.md)
+
+## `argumentDefinitions`
+
+See [Fragment](fragment.md)
+
+## `ppxAs`
+
+## `ppxCustom`
+
+## `ppxDecoder` (deprecated)
+
+This was the old name for `ppxCustom`
+
+## `ppxField`
+
+## `ppxObject` (deprecated)
+
+Convert a specific field to an object instead of a record.
+
+## `ppxOmitFutureValue`
+
+## `ppxRecord` (deprecated)
+
+Convert a specific field to a record when graphql-ppx is generating objects
+instead of record.
+
+## `ppxVariant`
+
+## skip
+
+## include
diff --git a/documentation/docs/extending-graphql-ppx.md b/documentation/docs/extending-graphql-ppx.md
new file mode 100644
index 00000000..292665ed
--- /dev/null
+++ b/documentation/docs/extending-graphql-ppx.md
@@ -0,0 +1,145 @@
+---
+title: Extending graphql-ppx
+---
+
+Graphql-ppx has a way to extend the basic build in functionality of the modules
+that are generated. By default Graphql-ppx does the following
+
+- Create types (`Query.t`)
+- Parses raw data to ReasonML data (`parse`)
+- Serializes ReasonML data to raw data (`serialize`)
+- Generates functions to generate variables and input objects (`makeVariables`)
+
+You usually want to do more than just that, mostly involving a GraphQL client:
+
+- `use`-ing the query with a React-hook
+- Executing the query
+- ...
+
+Because Graphql-ppx is client independent we provide a way for clients to extend
+the modules that Graphql-ppx generates.
+
+When zooming in on the React case, it would be great to have a `use` function
+(hook) on `Query`, that would provide us with the query result in a react
+component.
+
+In ReasonML the way to extend modules is by using
+[functors](https://2ality.com/2018/01/functors-reasonml.html).
+
+Let's extend the following query:
+
+```reason
+[%graphql {|
+ query UserQuery {
+ user {
+ id
+ name
+ }
+ }
+|}];
+```
+
+To build a functor, we first need to declare the module type that this functor
+will apply to. In this case we would like it to work for any query, so we need
+to provide the types, values and functions that we need to use in the extension.
+
+```reason
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ };
+ type t;
+ let query: string;
+ /* this just makes sure it's just a type conversion, and no function have
+ to be called */
+ external cast: Js.Json.t => Raw.t = "%identity";
+ let parse: Raw.t => t;
+};
+```
+
+The above is all we need for now. This means we have access to the types, the
+`query` string and the `parse` function. To extend `UserQuery` we can apply a
+functor as follows:
+
+```reason
+module ExtendedUserQuery = {
+ include UserQuery;
+ include ExtendQuery(UserQuery);
+};
+```
+
+Now we have `ExtendedUserQuery` that has the same functionality as UserQuery but
+adds anything the `ExtendQuery` might add to this.
+
+How to go about building `ExtendQuery`? Let's imagine we have a `GraphQLClient`
+with a `use` function, this function returns `None` if the data is loading, and
+a result type if the data has loaded. Let see how a basic version of this
+functor looks:
+
+```reason
+module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => {
+ switch (GraphQLClient.use(M.query)) {
+ | None => None
+ | Some(Ok(data)) => Some((Ok(data->M.cast->M.parse))
+ | Some(Error(errors)) => Some(Error(errors))
+ }
+ }
+}
+```
+
+Now we can call `ExtendedQuery.use` in a React component. If the data comes back
+(without errors), we pattern match on the result, and call `cast` to type cast
+the JSON data to `Raw.t`, and then `parse` to parse it to the ReasonML data
+types.
+
+There are many more things we can do to make this a great extension, such as
+memoizing the data parsing, handling variables, and all other options that your
+GraphQL client might provide.
+
+We now can use `ExtendQuery` to extend all our Graphql-ppx queries. However,
+this adds quite a lot of boilerplate, because we have to repeat these lines of
+code for each query:
+
+```reason
+module ExtendedUserQuery = {
+ include UserQuery;
+ include ExtendQuery(UserQuery);
+};
+```
+
+This is why there is a way to let Graphql-ppx do this work for you. You can do
+it on a query basis:
+
+```reason
+[%graphql {|
+ query UserQuery {
+ user {
+ id
+ name
+ }
+ }
+|}; {extend: "ExtendQuery"}
+];
+```
+
+This will name the original query as `UserQuery'` (mind the prime symbol), and
+the extended query would be `UserQuery`. (That `UserQuery'` is still available
+is an implementation detail.)
+
+Most probably you'd want to do this for each query in your project. This is
+possible by using the BuckleScript configuration file (`bsconfig.json`):
+
+```json
+{
+ "graphql": {
+ "extend-query": "ExtendQuery",
+ "extend-query-no-required-variables": "ExtendQueryNoRequiredVars",
+ "extend-mutation": "ExtendMutation",
+ "extend-mutation-no-required-variables": "ExtendMutationNoRequiredVars",
+ "extend-subscription": "ExtendSubscription",
+ "extend-subscription-no-required-variables": "ExtendSubscriptionNoRequiredVars",
+ "extend-fragment": "ExtendFragment"
+ }
+}
+```
diff --git a/documentation/docs/fragment.md b/documentation/docs/fragment.md
new file mode 100644
index 00000000..7d19ade4
--- /dev/null
+++ b/documentation/docs/fragment.md
@@ -0,0 +1,125 @@
+---
+title: Fragment
+---
+
+Records in ReasonML are nominally typed. Even if a records contains exactly the
+same fields as another record, it will be seen as a different type, and they are
+not compatible. That means that if you want to create an `createAvatar` function
+for a `User`, you'd be able to accept for instance `UserQuery.t_user` as an
+argument. That's all great, but what if you have another query where you also
+would like to create an avatar. In most cases Fragments are the solution here.
+
+With fragments you can define reusable pieces that can be shared between
+queries. You can define a fragment in the following way
+
+```reason
+[%graphql {|
+ fragment Avatar_User on User {
+ id
+ name
+ smallAvatar: avatar(pixelRatio: 2, width: 60, height: 60) {
+ url
+ }
+ }
+
+ query UserQuery {
+ user {
+ id
+ role
+ ...Avatar_User
+ }
+ }
+|}]
+```
+
+This generates the module `Avatar_User` as the fragment. The `createAvatar` can
+now accept `Avatar_User.t` which include all the fields of the fragment.
+
+How to we get this from the query? When you use the spread operator with the
+module name, an extra field is created on the `t_user` record with the name
+`avatar_User` (same as the fragment module name but with a lowercase first
+letter). This is the value that has the type `Avatar_User.t` containing all the
+necessary fields.
+
+If you want to change the default name of the fragment you can use a GraphQL
+alias (`avatarFragment: ...AvatarUser`).
+
+When there is just the fragment spread and no other fields on an object, there
+is no special field for the fragment necessary. So if this is the query:
+
+```reason
+[%graphql {|
+ query UserQuery {
+ user {
+ ...Avatar_User
+ }
+ }
+|}]
+```
+
+Then `user` will be of the type `Avatar_User.t`.
+
+#### Variables within fragments
+
+Sometimes fragments need to accept variables. Take our previous fragment. If we
+would like to pass the pixelRatio as a variable as it might vary per device. We
+can do this as follows:
+
+```reason
+[%graphql {|
+ fragment Avatar_User on User @argumentDefinitions(pixelRatio: {type: "Float!"}) {
+ id
+ name
+ smallAvatar: avatar(pixelRatio: 2, width: 60, height: 60) {
+ url
+ }
+ }
+
+ query UserQuery($pixelRatio: Float!) {
+ user {
+ id
+ role
+ ...Avatar_User @arguments(pixelRatio: $pixelRatio)
+ }
+ }
+|}]
+```
+
+To be able to typecheck these variables and make sure that the types are
+correct, there are no unused variables or variables that are not defined, we
+introduce two directives here `argumentDefinitions` and `arguments`, these are
+taken from
+[Relay](https://relay.dev/docs/en/fragment-container#argumentdefinitions). But
+they have nothing to do with the relay client (we just re-use this convention).
+
+Note that you cannot rename variables in the `@arguments` directive so the name
+of the variable and the name of the key must be the same. This is because
+`graphql-ppx` does not manipulate variable names and just makes use of the fact
+that fragments can use variables declared in the query.
+
+There is a compile error raised if you define variables that are unused. If you
+(temporarily) want to define unused variables you can prepend the variable name
+with an underscore.
+
+#### `ppxAs`
+
+An ecape hatch for when you don't want `graphql-ppx` to create a record type,
+you can supply one yourself. This also makes reusability possible. We recommend
+fragments however in most cases as they are easier to work, are safer and don't
+require defining separate types.
+
+```reason
+type t_user = {
+ id: string
+ role: string
+}
+
+[%graphql {|
+ query UserQuery {
+ user @ppxAs(type: "t_user") {
+ id
+ role
+ }
+ }
+|}]
+```
diff --git a/documentation/docs/fragments.md b/documentation/docs/fragments.md
new file mode 100644
index 00000000..5395c1ab
--- /dev/null
+++ b/documentation/docs/fragments.md
@@ -0,0 +1,3 @@
+---
+title: Fragments
+---
diff --git a/documentation/docs/future-added-values.md b/documentation/docs/future-added-values.md
new file mode 100644
index 00000000..2c308f95
--- /dev/null
+++ b/documentation/docs/future-added-values.md
@@ -0,0 +1,77 @@
+---
+title: Future Added Values
+---
+
+`graphql-ppx` will add the polymorphic variant `\`FutureAddedValue(value)` by
+default to both enum fields & union variants. This is in accordance to the
+graphql specification, in order to build robust clients against potentially
+changing server schemas.
+
+[Lee Byron](https://github.com/leebyron), the co-creator of graphql, says the
+[following](https://github.com/facebook/relay/issues/2351#issuecomment-368958022)
+about this topic:
+
+> These are generated as a reminder that GraphQL services often expand in
+> capabilities and may return new enum values. To be future-proof, clients
+> should account for this possibility and do something reasonable to avoid a
+> broken product.
+
+Adding this variant is intentional default behaviour of the ppx, to avoid
+unintentional production bugs. You have however the option, to specifically
+opt-out of this behaviour and disable the generation of this additional variant.
+This could be useful, if you have absolute control over both the client and the
+server schema and are confident, that they may never be out of sync.
+
+To opt-out, you can specify the option `future_added_value: false`, either in
+your `bsconfig.json` (see [config](https://beta.graphql-ppx.com/docs/config)),
+or directly on your query.
+
+Example:
+
+```reason
+module ByConfig = [%graphql
+ {|
+ {
+ someQuery {
+ enumField
+ }
+ }
+|};
+ {future_added_value: false}
+];
+```
+
+The second way is to use the directive `@ppxOmitFutureValue` directly on your
+queried field.
+
+```reason
+module ByDirective = [%graphql
+ {|
+ {
+ someQuery {
+ enumField @ppxOmitFutureValue
+ }
+ }
+|}
+];
+```
+
+```reason
+// t_someQuery_enumField without config / directive
+type t_someQuery_enumField = [
+ | `FutureAddedValue(string)
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+// t_someQuery_enumField with config / directive
+type t_someQuery_enumField = [
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+```
+
+**Please note:** Decoding the raw query result while having the future value
+variant disabled, can lead to a `Not_found` exception being thrown if an
+unexpected result is received.
diff --git a/documentation/docs/getting-started.md b/documentation/docs/getting-started.md
new file mode 100644
index 00000000..c8150366
--- /dev/null
+++ b/documentation/docs/getting-started.md
@@ -0,0 +1,119 @@
+---
+title: Getting Started
+---
+
+## Our first query
+
+Let's create our first query with `graphql-ppx`. In this case we will write a
+query to fetch the current user. We can create a query with the following code.
+
+```reason
+[%graphql {|
+ query UserQuery {
+ user {
+ id
+ name
+ }
+ }
+|}];
+```
+
+This is quite similar to how we could define a query in JavaScript. Depending on
+the client, in JavaScript we usually do something like this:
+
+```js
+let query = gql`
+ query UserQuery {
+ user {
+ id
+ name
+ }
+ }
+`;
+```
+
+However, the ReasonML code does much more. It will not only create a query that
+you can pass to the client. It will also generate the types of the data that we
+get back from the GraphQL server.
+
+The shape of the data that we get back from the server has the type
+`UserQuery.Raw.t`. This represents the data exactly like the response type. The
+type that is being generated by `graphql-ppx` is:
+
+```reason
+module Raw = {
+ type t = {
+ user: t_user
+ } and t_user = {
+ id: string,
+ name: Js.Nullable.t(string)
+ }
+}
+```
+
+So once we successfully get data back from the server it is of type `Js.Json.t`.
+To work with it we can typecast it into `UserQuery.Raw.t`.
+
+```reason
+let typedData = UserQuery.cast(data)
+```
+
+`UserQuery.cast` is a helper function that will cast a Js.Json.t to the GraphQL
+`Raw` type. In JavaScript this will not generate any code, it will just tell the
+compiler to cast it into the `Raw` type. With GraphQL we know that if we get a
+response that this conforms to the shape of our query. This allows us to convert
+the generic `Js.Json.t` to richer and more specific type. To get the user's id,
+we can get it like we are used to in ReasonML:
+
+```reason
+let userName = typedData.user.id
+```
+
+As it is a normal ReasonML value now, we can do everything we want with it, like
+for instance pattern matching.
+
+```reason
+let userName = switch(user) {
+ | {user: {id}} => id
+}
+```
+
+## Parsing data
+
+However it's not perfect. In this example it would be nice if the user's name
+could be converted to a more idiomatic ReasonML data structure like an `option`
+type. This is exactly what parse does.
+
+```reason
+let parsedData = UserQuery.parse(typedData)
+```
+
+With parse the data is converted into idiomatic ReasonML data types. In this
+case the name is converted from `Js.Nullable.t(string)` to simply
+`option(string)`. This means we can write the following code:
+
+```reason
+let name = switch(parsedData) {
+ | {user: {name: Some(name)}} => name
+ /* the user's name is null */
+ | _ => "Anonymous"
+}
+```
+
+Also in some cases the JSON data can not be directly represented by a ReasonML
+type. For instance in case of a union, ReasonML doesn't allow arrays to contain
+values with different types, so it cannot be directly mapped. In those cases the
+raw type will be an _opaque_ type[^1]. When the raw result is parsed it is
+converted to a list of a variant.
+
+Usually you will not be working with the raw type. This is an implementation
+detail that is normally only used inside of the GraphQL client. In most cases
+the parsed result will be what you get back from the library.
+
+## Fragments
+
+## Using a client
+
+[^1]:
+ An opaque type is essentially a value that you can't access directly. So the
+ value is _opaque_ to the user
diff --git a/documentation/docs/graphql-extension-point.md b/documentation/docs/graphql-extension-point.md
new file mode 100644
index 00000000..613e2de3
--- /dev/null
+++ b/documentation/docs/graphql-extension-point.md
@@ -0,0 +1,59 @@
+---
+title: GraphQL extension point
+---
+
+`graphql-ppx` introduces the a GraphQL extension point in the ReasonML (or
+OCaml) language.
+
+It allows you to write GraphQL [definitions](definition) inside of the language
+and `graphql-ppx` takes care of the following for you:
+
+- Generates the data types of a GraphQL query, mutation, subscription, or
+ fragment
+- Creates `parse` and `serialize` functions to convert a JSON data response to a
+ fully typed Reason data structure (and the other way around)
+- Generates the data types of GraphQL variables
+
+You define a query like this:
+
+```reason
+[%graphql {|
+ query ExampleQuery = {
+ myQuery {
+ myField
+ }
+ }
+|}]
+```
+
+This will generate the the `ExampleQuery` module.
+
+When you'd like to alias the module to a different name you can do that like
+this:
+
+```reason
+module OtherName = [%graphql {|
+ query ExampleQuery = {
+ myQuery {
+ myField
+ }
+ }
+|}]
+```
+
+You can also have more definitions inside of the GraphQL extension point:
+
+```reason
+[%graphql {|
+ query ExampleQuery = {
+ myQuery {
+ myField
+ }
+ }
+ query OtherQuery = {
+ myOtherQuery {
+ myOtherField
+ }
+ }
+|}]
+```
diff --git a/documentation/docs/installation-on-bucklescript.md b/documentation/docs/installation-on-bucklescript.md
new file mode 100644
index 00000000..fb540c75
--- /dev/null
+++ b/documentation/docs/installation-on-bucklescript.md
@@ -0,0 +1,17 @@
+---
+title: Installation on Bucklescript
+---
+
+First, add it to you dependencies using `npm` or `yarn`:
+
+```sh
+yarn add @reasonml-community/graphql-ppx@next --dev
+# or
+npm install @reasonml-community/graphql-ppx@next --saveDev
+```
+
+Second, add it to `ppx-flags` in your `bsconfig.json`:
+
+```json
+"ppx-flags": ["@reasonml-community/graphql-ppx/ppx"]
+```
diff --git a/documentation/docs/installation-on-native.md b/documentation/docs/installation-on-native.md
new file mode 100644
index 00000000..ca736616
--- /dev/null
+++ b/documentation/docs/installation-on-native.md
@@ -0,0 +1,33 @@
+---
+title: Installation on Reason Native
+---
+
+
+:::caution
+The Bucklescript version of `graphql-ppx` was almost completely rewritten for the
+1.0 release, with many improvements and changes. This documentation will focus
+on the API of the bucklescript version. This means that most of the examples
+won't apply for the Reason Native version. Please take a look at the
+[old documentation](https://github.com/reasonml-community/graphql-ppx/tree/v0.7.1).
+At the same time we welcome contributions to modernize the Reason Native version
+of `graphql-ppx`
+:::
+
+You need to provide the following dependency in your `esy.json` file
+
+```json
+{
+ "dependencies": {
+ "graphql-ppx": "*"
+ },
+ "resolutions": {
+ "graphql-ppx": "reasonml-community/graphql-ppx:esy.json#"
+ }
+}
+```
+
+and update your `dune` file:
+
+```
+(preprocess (pps graphql_ppx))
+```
diff --git a/documentation/docs/installation.md b/documentation/docs/installation.md
new file mode 100644
index 00000000..776dc7dd
--- /dev/null
+++ b/documentation/docs/installation.md
@@ -0,0 +1,27 @@
+---
+title: Installation
+---
+
+## Schema
+
+`graphql-ppx` needs your graphql schema to be available in the form of a
+`graphql_schema.json` file.
+
+The easiest way to add this to your project is using an
+[introspection query](https://github.com/graphql/graphql-js/blob/master/src/utilities/introspectionQuery.js)
+to your backend. You can do this using `get-graphql-schema`:
+
+```sh
+npx get-graphql-schema ENDPOINT_URL -j > graphql_schema.json
+```
+
+With `ENDPOINT_URL` being the URL of your GraphQL endpoint.
+
+## Cache
+
+`graphql-ppx` will generate a `.graphql_ppx_cache` folder alongside your JSON
+schema to optimize parsing performance. If you're using a version control
+system, you don't need to check it in.
+
+The next pages will provide further installation instructions whether you are
+using `graphql-ppx` with Bucklescript or using Reason Native.
diff --git a/documentation/docs/introduction.md b/documentation/docs/introduction.md
new file mode 100644
index 00000000..3002cb80
--- /dev/null
+++ b/documentation/docs/introduction.md
@@ -0,0 +1,23 @@
+---
+title: Introduction
+---
+
+
+:::caution
+This documentation is a work in progress. Any feedback is welcome!
+:::
+
+`graphql-ppx` provides simple GraphQL primitives to the ReasonML and OCaml
+programming language[^1]. If you are using GraphQL with ReasonML, you are
+probably using this preprocessor extension.
+
+Most probably the best way to get started is by following the documentation of
+the [GraphQL client](clients.md) you are going to be using.
+
+This documentation is for people who want to dive deeper into the functionality
+of `graphql-ppx`.
+
+[^1]:
+ While the `graphql-ppx` works on both ReasonML and OCaml the examples in this
+ documentation will be in ReasonML. If you are an OCaml user and interested to
+ contribute OCaml examples, this would be great. You can write a pull-request.
diff --git a/documentation/docs/modeling-expected-errors.md b/documentation/docs/modeling-expected-errors.md
new file mode 100644
index 00000000..323dcb70
--- /dev/null
+++ b/documentation/docs/modeling-expected-errors.md
@@ -0,0 +1,50 @@
+---
+title: Modeling expected errors
+---
+
+If you've got an object which in practice behaves like a variant - like `signUp`
+above, where you _either_ get a user _or_ a list of errors - you can add a
+`@bsVariant` directive to the field to turn it into a polymorphic variant:
+
+```reason
+module SignUpQuery = [%graphql
+ {|
+mutation($name: String!, $email: String!, $password: String!) {
+ signUp(email: $email, email: $email, password: $password) @ppxVariant {
+ user {
+ name
+ }
+
+ errors {
+ field
+ message
+ }
+ }
+}
+|}
+];
+
+let _ =
+ Api.sendQuery(
+ ~variables=SignUpQuery.makeVariables(
+ ~name="My name",
+ ~email="email@example.com",
+ ~password="secret",
+ (),
+ ),
+ SignUpQuery.definition
+ )
+ |> Promise.then_(response =>
+ (
+ switch (response.signUp) {
+ | `User(user) => Js.log2("Signed up a user with name ", user.name)
+ | `Errors(errors) => Js.log2("Errors when signing up: ", errors)
+ }
+ )
+ |> Promise.resolve
+ );
+
+```
+
+This helps with the fairly common pattern for mutations that can fail with
+user-readable errors.
diff --git a/documentation/docs/mutation.md b/documentation/docs/mutation.md
new file mode 100644
index 00000000..4db8c7ac
--- /dev/null
+++ b/documentation/docs/mutation.md
@@ -0,0 +1,3 @@
+---
+title: Mutation
+---
diff --git a/documentation/docs/mutations.md b/documentation/docs/mutations.md
new file mode 100644
index 00000000..31561579
--- /dev/null
+++ b/documentation/docs/mutations.md
@@ -0,0 +1,3 @@
+---
+title: Mutations
+---
diff --git a/documentation/docs/not-supported-yet.md b/documentation/docs/not-supported-yet.md
new file mode 100644
index 00000000..5762a2bb
--- /dev/null
+++ b/documentation/docs/not-supported-yet.md
@@ -0,0 +1,13 @@
+---
+title: Not supported yet
+---
+
+`graphql-ppx` targets to support 100% of the GraphQL spec. And we would like to
+be compatible with every GraphQL client. However we are not there yet. These are
+some of the things that are not supported yet, but we would like to support in
+the future:
+
+- Overlapping interface selections
+ [#92](https://github.com/reasonml-community/graphql-ppx/issues/92)
+- Explicit null in arguments
+ [#26](https://github.com/reasonml-community/graphql-ppx/issues/26)
diff --git a/documentation/docs/operation.md b/documentation/docs/operation.md
new file mode 100644
index 00000000..4c600a04
--- /dev/null
+++ b/documentation/docs/operation.md
@@ -0,0 +1,93 @@
+---
+title: Operation
+---
+
+An GraphQL operation is a query, mutation or subscription. When you create an
+operation using the GraphQL extension point, it creates a module. This module
+has the following module type:
+
+```reason
+module type Operation = {
+ include Definition;
+ module Raw: {
+ include Definition.Raw;
+ type t_variables;
+ };
+ type t_variables;
+ let makeVariables: (~exampleVariable: string, unit) => Raw.t_variables;
+ let serializeVariables: t_variables => Raw.t_variables;
+}
+```
+
+It includes the [`Definition`](definition) module type so everything in
+`Definition` is also part of the `Operation` module type.
+
+## Types
+
+### Type `t_variables`
+
+This is the the type of the variables in ReasonML data types.
+
+#### Data Types
+
+##### Nullable
+
+Nullable variable values are represented as `option`. When this types is
+serialized `option`'s are converted to `undefined`. Because `null` is also a
+valid value, it is not representable in this data type. To set a value
+explicitly `null` you can use `Raw.t_variables`.
+
+##### Input Objects
+
+Input objects are represented as records. The type is named as
+`t_variables_InputObjectName`.
+
+##### Other data types
+
+Other data types are consistent with the types of `t`.
+
+### Type `Raw.t_variables`
+
+This is the (no cost) type of the variables. It's a record if there are
+variables and it's `()` (unit), if there are no variables.
+
+#### Data Types
+
+##### Nullable
+
+Nullable variable values are represented as `Js.Nullable.t`. It is important to
+note that there is a difference between `Js.Nullable.null` and
+`Js.Nullable.undefined`. `null` will be an explicit null, and `undefined` will
+act as a missing field. Both are different things in the GraphQL API.
+
+##### Input Objects
+
+Input objects are represented as records. The type is named as
+`Raw.t_variables_InputObjectName`.
+
+##### Other data types
+
+Other data types are consistent with the types of `Raw.t`.
+
+## Bindings
+
+### `makeVariables`
+
+This is the creator function for `Raw.t_variables`. Often when you pass
+variables to a library, that library expects the `Raw.t_variables` type. You can
+make this using this function.
+
+```reason
+let variables = Query.makeVariables(~exampleVariable="something", ());
+let result = Query.use(~variables, ())
+```
+
+### `serializeVariables`
+
+If you rather create the variables yourself, you can construct the `t_variables`
+record. Because most libraries expect `Raw.t_variables`, you can serialize the
+record using this function.
+
+### `variablesToJson`
+
+This will convert `Raw.t_variables` to `Js.Json.t` (zero cost binding).
diff --git a/documentation/docs/parse-and-serialize.md b/documentation/docs/parse-and-serialize.md
new file mode 100644
index 00000000..6848509c
--- /dev/null
+++ b/documentation/docs/parse-and-serialize.md
@@ -0,0 +1,3 @@
+---
+title: Parse and Serialize
+---
diff --git a/documentation/docs/queries.md b/documentation/docs/queries.md
new file mode 100644
index 00000000..c5560213
--- /dev/null
+++ b/documentation/docs/queries.md
@@ -0,0 +1,3 @@
+---
+title: Queries
+---
diff --git a/documentation/docs/query.md b/documentation/docs/query.md
new file mode 100644
index 00000000..74ea7dde
--- /dev/null
+++ b/documentation/docs/query.md
@@ -0,0 +1,3 @@
+---
+title: Query
+---
diff --git a/documentation/docs/serialization.md b/documentation/docs/serialization.md
new file mode 100644
index 00000000..08b57b1b
--- /dev/null
+++ b/documentation/docs/serialization.md
@@ -0,0 +1,3 @@
+---
+title: Serialization
+---
diff --git a/documentation/docs/troubleshooting.md b/documentation/docs/troubleshooting.md
new file mode 100644
index 00000000..5f131208
--- /dev/null
+++ b/documentation/docs/troubleshooting.md
@@ -0,0 +1,46 @@
+### "Type ... doesn't have any fields"
+
+Sometimes when working with union types you'll get the following error.
+
+```
+Fatal error: exception Graphql_ppx_base__Schema.Invalid_type("Type IssueTimelineItems doesn't have any fields")
+```
+
+This is an example of a query that will result in such error:
+
+```graphql
+nodes {
+ __typename
+ ... on ClosedEvent {
+ closer {
+ __typename
+ ... on PullRequest {
+ id
+ milestone { id }
+ }
+ }
+ }
+}
+```
+
+This is because we allow querying union fields only in certain cases. GraphQL
+provides the `__typename` field but it's not present in GraphQL introspection
+query thus `graphql-ppx` doesn't know that this field exists. To fix your query
+simply remove `__typename`. It's added behinds a scene as an implementation
+detail and serves us as a way to decide which case to select when parsing your
+query result.
+
+This is an example of a correct query:
+
+```graphql
+nodes {
+ ... on ClosedEvent {
+ closer {
+ ... on PullRequest {
+ id
+ milestone { id }
+ }
+ }
+ }
+}
+```
diff --git a/documentation/docs/using-custom-records.md b/documentation/docs/using-custom-records.md
new file mode 100644
index 00000000..7c9f764c
--- /dev/null
+++ b/documentation/docs/using-custom-records.md
@@ -0,0 +1,3 @@
+---
+title: Using Custom Records
+---
diff --git a/documentation/docs/using-with-apollo.md b/documentation/docs/using-with-apollo.md
new file mode 100644
index 00000000..0ba8b772
--- /dev/null
+++ b/documentation/docs/using-with-apollo.md
@@ -0,0 +1,3 @@
+---
+title: Using with Apollo Client
+---
diff --git a/documentation/docs/using-with-gatsby.md b/documentation/docs/using-with-gatsby.md
new file mode 100644
index 00000000..7e1215c7
--- /dev/null
+++ b/documentation/docs/using-with-gatsby.md
@@ -0,0 +1,3 @@
+---
+title: Using with Gatsby
+---
diff --git a/documentation/docusaurus.config.js b/documentation/docusaurus.config.js
new file mode 100755
index 00000000..623b9864
--- /dev/null
+++ b/documentation/docusaurus.config.js
@@ -0,0 +1,62 @@
+module.exports = {
+ title: "Graphql-ppx",
+ tagline: "GraphQL infrastructure for ReasonML",
+ url: "https://graphql-ppx.com",
+ baseUrl: "/",
+ favicon: "img/favicon.png",
+ organizationName: "reasonml-community", // Usually your GitHub org/user name.
+ projectName: "graphql-ppx", // Usually your repo name.
+ themeConfig: {
+ hideOnScroll: true,
+ prism: {
+ theme: require("prism-react-renderer/themes/github"),
+ darkTheme: require("prism-react-renderer/themes/oceanicNext"),
+ },
+ navbar: {
+ title: "Graphql-ppx",
+ logo: {
+ alt: "GraphQL Logo",
+ src: "img/logo.svg",
+ srcDark: "img/logo.svg",
+ },
+ links: [
+ { to: "docs/introduction", label: "Docs", position: "left" },
+ {
+ href: "https://github.com/reasonml-community/graphql-ppx",
+ label: "GitHub",
+ position: "right",
+ },
+ ],
+ },
+ footer: {
+ style: "dark",
+ links: [
+ {
+ title: "Docs",
+ items: [
+ {
+ label: "Docs",
+ to: "docs/introduction",
+ },
+ ],
+ },
+ ],
+ },
+ },
+ presets: [
+ [
+ "@docusaurus/preset-classic",
+ {
+ docs: {
+ sidebarPath: require.resolve("./sidebars.js"),
+ admonitions: {
+ // infima: false,
+ },
+ },
+ theme: {
+ customCss: require.resolve("./src/css/custom.css"),
+ },
+ },
+ ],
+ ],
+};
diff --git a/documentation/package.json b/documentation/package.json
new file mode 100755
index 00000000..faf95595
--- /dev/null
+++ b/documentation/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "graphql-ppx-documentation",
+ "version": "1.0.0",
+ "private": true,
+ "scripts": {
+ "docusaurus": "docusaurus",
+ "start": "docusaurus start",
+ "build": "docusaurus build",
+ "swizzle": "docusaurus swizzle",
+ "deploy": "docusaurus deploy"
+ },
+ "dependencies": {
+ "@docusaurus/core": "^2.0.0-alpha.50",
+ "@docusaurus/preset-classic": "^2.0.0-alpha.50",
+ "react": "^16.13.1",
+ "react-dom": "^16.13.1"
+ },
+ "browserslist": {
+ "production": [
+ ">0.2%",
+ "not dead",
+ "not op_mini all"
+ ],
+ "development": [
+ "last 1 chrome version",
+ "last 1 firefox version",
+ "last 1 safari version"
+ ]
+ }
+}
diff --git a/documentation/sidebars.js b/documentation/sidebars.js
new file mode 100755
index 00000000..31b8dfd1
--- /dev/null
+++ b/documentation/sidebars.js
@@ -0,0 +1,29 @@
+module.exports = {
+ docs: {
+ "Getting Started": [
+ "introduction",
+ "installation",
+ "installation-on-bucklescript",
+ "installation-on-native",
+ "clients",
+ "getting-started",
+ ],
+ Usage: [
+ "graphql-extension-point",
+ "definition",
+ "operation",
+ "fragment",
+ "custom-fields",
+ "directives",
+ "configuration",
+ ],
+ Guides: ["extending-graphql-ppx", "using-with-apollo", "using-with-gatsby"],
+ Advanced: [
+ "future-added-values",
+ "modeling-expected-errors",
+ "troubleshooting",
+ "not-supported-yet",
+ "contributing",
+ ],
+ },
+};
diff --git a/documentation/src/css/custom.css b/documentation/src/css/custom.css
new file mode 100755
index 00000000..6260bb2a
--- /dev/null
+++ b/documentation/src/css/custom.css
@@ -0,0 +1,52 @@
+/**
+ * Any CSS included here will be global. The classic template
+ * bundles Infima by default. Infima is a CSS framework designed to
+ * work well for content-centric websites.
+ */
+
+/* You can override the default Infima variables here. */
+:root {
+ --ifm-color-primary: #cb5747;
+ --ifm-color-primary-dark: #c04736;
+ --ifm-color-primary-darker: #b64333;
+ --ifm-color-primary-darkest: #96372a;
+ --ifm-color-primary-light: #d16b5c;
+ --ifm-color-primary-lighter: #d47467;
+ --ifm-color-primary-lightest: #dd9287;
+
+ --ifm-alert-color: rgba(0, 0, 0, 0.7);
+ --ifm-color-info: rgba(46, 204, 113, 0.1);
+ --ifm-color-success: rgba(52, 152, 219, 0.1);
+ --ifm-color-warning: rgba(241, 196, 15, 0.1);
+ --ifm-color-danger: rgba(230, 126, 34, 0.1);
+}
+
+.admonition-heading {
+ --ifm-heading-color: rgba(0, 0, 0, 1);
+ --ra-admonition-icon-color: rgba(0, 0, 0, 1);
+}
+
+html[data-theme="dark"]:root {
+ --ifm-alert-color: rgba(255, 255, 255, 0.7);
+}
+
+html[data-theme="dark"] .admonition-heading {
+ --ifm-heading-color: rgba(255, 255, 255, 1);
+ --ra-admonition-icon-color: rgba(255, 255, 255, 1);
+}
+
+.docusaurus-highlight-code-line {
+ background-color: rgb(0, 0, 0, 0.1);
+ display: block;
+ margin: 0 calc(-1 * var(--ifm-pre-padding));
+ padding: 0 var(--ifm-pre-padding);
+}
+
+html[data-theme="dark"] .docusaurus-highlight-code-line {
+ background-color: rgb(0, 0, 0, 0.3);
+}
+
+h5 {
+ text-transform: uppercase;
+ opacity: 0.7;
+}
diff --git a/documentation/src/pages/index.js b/documentation/src/pages/index.js
new file mode 100755
index 00000000..5ca74a12
--- /dev/null
+++ b/documentation/src/pages/index.js
@@ -0,0 +1,93 @@
+import React from "react";
+import Layout from "@theme/Layout";
+import Link from "@docusaurus/Link";
+import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import styles from "./styles.module.css";
+
+function Home() {
+ const context = useDocusaurusContext();
+ const { siteConfig = {} } = context;
+ return (
+
+
+
+
+
+
+ Typesafe GraphQL{" "}
+ operations and{" "}
+ fragments in
+ ReasonML
+
+
+
+ Get Started
+
+
+
+
+
+
+
+
+
+
+
+
+ Language level GraphQL primitives
+
+
+ graphql-ppx offers language level GraphQL primitives within
+ ReasonML using a compiler preprocessor extension. This means
+ you have a simple syntax to define queries, mutations and
+ fragments in your ReasonML project.
+
+
+
+
+ Building block for GraphQL clients
+
+
+ graphql-ppx automatically generates types, and parse/serialize
+ functions for converting GraphQL data and arguments to
+ idiomatic ReasonML data structures. This provides a building
+ block for GraphQL clients in the ReasonML ecosystem.
+
+
+
+ 100% type safe!
+
+ With graphql-ppx your project is completely type safe. Types
+ are generated from the GraphQL schema of your backend. This
+ means that no runtime errors occur when working with server
+ data. And if a schema change breaks your app, your app simply
+ won't compile!
+
+
+
+
+
+
+
+ );
+}
+
+export default Home;
diff --git a/documentation/src/pages/styles.module.css b/documentation/src/pages/styles.module.css
new file mode 100755
index 00000000..a1b3d4e9
--- /dev/null
+++ b/documentation/src/pages/styles.module.css
@@ -0,0 +1,151 @@
+.section {
+ padding: 72px 0;
+}
+
+.sectionAlt {
+ background-color: var(--ifm-color-emphasis-inverse-alpha-30);
+}
+
+.sectionInner {
+ margin: 0 auto;
+}
+
+.featureImage {
+ max-width: 60%;
+ max-height: 128px;
+ margin: 0 auto;
+}
+
+.featureHeading {
+ font-size: var(--ifm-h3-font-size);
+ padding-top: 1rem;
+}
+
+.announcement {
+ font-weight: bold;
+ font-size: 24px;
+ padding: 48px;
+ margin: 0 auto;
+ text-align: center;
+}
+
+.announcementDark {
+ background-color: #20232a;
+ color: #fff;
+}
+
+.announcementInner {
+ margin: 0 auto;
+ max-width: 768px;
+}
+
+.hero {
+ background-color: #2b3137;
+ padding: 48px;
+}
+
+.heroInner {
+ margin: 0 auto;
+ max-width: 1100px;
+ padding: 0 20px;
+}
+
+.heroProjectTagline {
+ color: #fff;
+ font-size: 60px;
+ margin: 0;
+}
+
+.heroProjectKeywords {
+ color: var(--ifm-color-primary);
+}
+
+@keyframes jackInTheBox {
+ from {
+ opacity: 0;
+ transform: scale(0.1) rotate(30deg);
+ transform-origin: center bottom;
+ }
+
+ 50% {
+ transform: rotate(-10deg);
+ }
+
+ 70% {
+ transform: rotate(3deg);
+ }
+
+ to {
+ opacity: 1;
+ transform: scale(1);
+ }
+}
+
+.heroLogo {
+ animation-duration: 2s;
+ animation-name: jackInTheBox;
+ float: right;
+ margin-top: 20px;
+ padding: 20px;
+}
+
+.indexCtas {
+ display: flex;
+ align-items: center;
+ margin-top: 24px;
+}
+
+.indexCtasGetStartedButton {
+ border: 1px solid var(--ifm-color-primary);
+ display: inline-block;
+ line-height: 1.2em;
+ text-decoration: none !important;
+ text-transform: uppercase;
+ transition: background 0.3s, color 0.3s;
+ border-radius: 8px;
+ border-width: 2px;
+ color: #fff;
+ font-size: 24px;
+ font-weight: bold;
+ padding: 18px 36px;
+}
+
+.indexCtasGitHubButtonWrapper {
+ display: flex;
+}
+
+.indexCtasGitHubButton {
+ border: none;
+ margin-left: 24px;
+ overflow: hidden;
+}
+
+@media only screen and (max-width: 768px) {
+ .hero {
+ padding-left: 20px;
+ padding-right: 20px;
+ }
+
+ .heroInner {
+ padding: 0;
+ }
+
+ .heroProjectTagline {
+ font-size: 36px;
+ text-align: center;
+ }
+
+ .heroLogo {
+ display: block;
+ float: none;
+ margin: 0 auto;
+ }
+
+ .indexCtas {
+ justify-content: center;
+ }
+
+ .indexCtasGitHubButton {
+ display: none;
+ }
+}
diff --git a/documentation/static/img/favicon.png b/documentation/static/img/favicon.png
new file mode 100644
index 00000000..d54e02ef
Binary files /dev/null and b/documentation/static/img/favicon.png differ
diff --git a/documentation/static/img/logo.svg b/documentation/static/img/logo.svg
new file mode 100755
index 00000000..6df14584
--- /dev/null
+++ b/documentation/static/img/logo.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/yarn.lock b/documentation/yarn.lock
new file mode 100644
index 00000000..b974af68
--- /dev/null
+++ b/documentation/yarn.lock
@@ -0,0 +1,9731 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@babel/code-frame@7.8.3", "@babel/code-frame@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"
+ integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==
+ dependencies:
+ "@babel/highlight" "^7.8.3"
+
+"@babel/compat-data@^7.8.6", "@babel/compat-data@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c"
+ integrity sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g==
+ dependencies:
+ browserslist "^4.9.1"
+ invariant "^2.2.4"
+ semver "^5.5.0"
+
+"@babel/core@7.8.4":
+ version "7.8.4"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e"
+ integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==
+ dependencies:
+ "@babel/code-frame" "^7.8.3"
+ "@babel/generator" "^7.8.4"
+ "@babel/helpers" "^7.8.4"
+ "@babel/parser" "^7.8.4"
+ "@babel/template" "^7.8.3"
+ "@babel/traverse" "^7.8.4"
+ "@babel/types" "^7.8.3"
+ convert-source-map "^1.7.0"
+ debug "^4.1.0"
+ gensync "^1.0.0-beta.1"
+ json5 "^2.1.0"
+ lodash "^4.17.13"
+ resolve "^1.3.2"
+ semver "^5.4.1"
+ source-map "^0.5.0"
+
+"@babel/core@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e"
+ integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==
+ dependencies:
+ "@babel/code-frame" "^7.8.3"
+ "@babel/generator" "^7.9.0"
+ "@babel/helper-module-transforms" "^7.9.0"
+ "@babel/helpers" "^7.9.0"
+ "@babel/parser" "^7.9.0"
+ "@babel/template" "^7.8.6"
+ "@babel/traverse" "^7.9.0"
+ "@babel/types" "^7.9.0"
+ convert-source-map "^1.7.0"
+ debug "^4.1.0"
+ gensync "^1.0.0-beta.1"
+ json5 "^2.1.2"
+ lodash "^4.17.13"
+ resolve "^1.3.2"
+ semver "^5.4.1"
+ source-map "^0.5.0"
+
+"@babel/generator@^7.8.4", "@babel/generator@^7.9.0", "@babel/generator@^7.9.5":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9"
+ integrity sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ==
+ dependencies:
+ "@babel/types" "^7.9.5"
+ jsesc "^2.5.1"
+ lodash "^4.17.13"
+ source-map "^0.5.0"
+
+"@babel/helper-annotate-as-pure@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz#60bc0bc657f63a0924ff9a4b4a0b24a13cf4deee"
+ integrity sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==
+ dependencies:
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-builder-binary-assignment-operator-visitor@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz#c84097a427a061ac56a1c30ebf54b7b22d241503"
+ integrity sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==
+ dependencies:
+ "@babel/helper-explode-assignable-expression" "^7.8.3"
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-builder-react-jsx-experimental@^7.9.0":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.9.5.tgz#0b4b3e04e6123f03b404ca4dfd6528fe6bb92fe3"
+ integrity sha512-HAagjAC93tk748jcXpZ7oYRZH485RCq/+yEv9SIWezHRPv9moZArTnkUNciUNzvwHUABmiWKlcxJvMcu59UwTg==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.8.3"
+ "@babel/helper-module-imports" "^7.8.3"
+ "@babel/types" "^7.9.5"
+
+"@babel/helper-builder-react-jsx@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.9.0.tgz#16bf391990b57732700a3278d4d9a81231ea8d32"
+ integrity sha512-weiIo4gaoGgnhff54GQ3P5wsUQmnSwpkvU0r6ZHq6TzoSzKy4JxHEgnxNytaKbov2a9z/CVNyzliuCOUPEX3Jw==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.8.3"
+ "@babel/types" "^7.9.0"
+
+"@babel/helper-compilation-targets@^7.8.7":
+ version "7.8.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde"
+ integrity sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw==
+ dependencies:
+ "@babel/compat-data" "^7.8.6"
+ browserslist "^4.9.1"
+ invariant "^2.2.4"
+ levenary "^1.1.1"
+ semver "^5.5.0"
+
+"@babel/helper-create-class-features-plugin@^7.8.3":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.9.5.tgz#79753d44017806b481017f24b02fd4113c7106ea"
+ integrity sha512-IipaxGaQmW4TfWoXdqjY0TzoXQ1HRS0kPpEgvjosb3u7Uedcq297xFqDQiCcQtRRwzIMif+N1MLVI8C5a4/PAA==
+ dependencies:
+ "@babel/helper-function-name" "^7.9.5"
+ "@babel/helper-member-expression-to-functions" "^7.8.3"
+ "@babel/helper-optimise-call-expression" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-replace-supers" "^7.8.6"
+ "@babel/helper-split-export-declaration" "^7.8.3"
+
+"@babel/helper-create-regexp-features-plugin@^7.8.3", "@babel/helper-create-regexp-features-plugin@^7.8.8":
+ version "7.8.8"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz#5d84180b588f560b7864efaeea89243e58312087"
+ integrity sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.8.3"
+ "@babel/helper-regex" "^7.8.3"
+ regexpu-core "^4.7.0"
+
+"@babel/helper-define-map@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz#a0655cad5451c3760b726eba875f1cd8faa02c15"
+ integrity sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==
+ dependencies:
+ "@babel/helper-function-name" "^7.8.3"
+ "@babel/types" "^7.8.3"
+ lodash "^4.17.13"
+
+"@babel/helper-explode-assignable-expression@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz#a728dc5b4e89e30fc2dfc7d04fa28a930653f982"
+ integrity sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==
+ dependencies:
+ "@babel/traverse" "^7.8.3"
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-function-name@^7.8.3", "@babel/helper-function-name@^7.9.5":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz#2b53820d35275120e1874a82e5aabe1376920a5c"
+ integrity sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==
+ dependencies:
+ "@babel/helper-get-function-arity" "^7.8.3"
+ "@babel/template" "^7.8.3"
+ "@babel/types" "^7.9.5"
+
+"@babel/helper-get-function-arity@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5"
+ integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==
+ dependencies:
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-hoist-variables@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz#1dbe9b6b55d78c9b4183fc8cdc6e30ceb83b7134"
+ integrity sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==
+ dependencies:
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-member-expression-to-functions@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c"
+ integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==
+ dependencies:
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-module-imports@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498"
+ integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==
+ dependencies:
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-module-transforms@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5"
+ integrity sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==
+ dependencies:
+ "@babel/helper-module-imports" "^7.8.3"
+ "@babel/helper-replace-supers" "^7.8.6"
+ "@babel/helper-simple-access" "^7.8.3"
+ "@babel/helper-split-export-declaration" "^7.8.3"
+ "@babel/template" "^7.8.6"
+ "@babel/types" "^7.9.0"
+ lodash "^4.17.13"
+
+"@babel/helper-optimise-call-expression@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9"
+ integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==
+ dependencies:
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-plugin-utils@7.8.3", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670"
+ integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==
+
+"@babel/helper-plugin-utils@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250"
+ integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==
+
+"@babel/helper-regex@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.8.3.tgz#139772607d51b93f23effe72105b319d2a4c6965"
+ integrity sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==
+ dependencies:
+ lodash "^4.17.13"
+
+"@babel/helper-remap-async-to-generator@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz#273c600d8b9bf5006142c1e35887d555c12edd86"
+ integrity sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.8.3"
+ "@babel/helper-wrap-function" "^7.8.3"
+ "@babel/template" "^7.8.3"
+ "@babel/traverse" "^7.8.3"
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6":
+ version "7.8.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8"
+ integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==
+ dependencies:
+ "@babel/helper-member-expression-to-functions" "^7.8.3"
+ "@babel/helper-optimise-call-expression" "^7.8.3"
+ "@babel/traverse" "^7.8.6"
+ "@babel/types" "^7.8.6"
+
+"@babel/helper-simple-access@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae"
+ integrity sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==
+ dependencies:
+ "@babel/template" "^7.8.3"
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-split-export-declaration@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9"
+ integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==
+ dependencies:
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-validator-identifier@^7.9.0", "@babel/helper-validator-identifier@^7.9.5":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80"
+ integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==
+
+"@babel/helper-wrap-function@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz#9dbdb2bb55ef14aaa01fe8c99b629bd5352d8610"
+ integrity sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==
+ dependencies:
+ "@babel/helper-function-name" "^7.8.3"
+ "@babel/template" "^7.8.3"
+ "@babel/traverse" "^7.8.3"
+ "@babel/types" "^7.8.3"
+
+"@babel/helpers@^7.8.4", "@babel/helpers@^7.9.0":
+ version "7.9.2"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f"
+ integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==
+ dependencies:
+ "@babel/template" "^7.8.3"
+ "@babel/traverse" "^7.9.0"
+ "@babel/types" "^7.9.0"
+
+"@babel/highlight@^7.8.3":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079"
+ integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.9.0"
+ chalk "^2.0.0"
+ js-tokens "^4.0.0"
+
+"@babel/parser@^7.8.4", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0", "@babel/parser@^7.9.4":
+ version "7.9.4"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8"
+ integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==
+
+"@babel/plugin-proposal-async-generator-functions@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f"
+ integrity sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-remap-async-to-generator" "^7.8.3"
+ "@babel/plugin-syntax-async-generators" "^7.8.0"
+
+"@babel/plugin-proposal-dynamic-import@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz#38c4fe555744826e97e2ae930b0fb4cc07e66054"
+ integrity sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-dynamic-import" "^7.8.0"
+
+"@babel/plugin-proposal-json-strings@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz#da5216b238a98b58a1e05d6852104b10f9a70d6b"
+ integrity sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-json-strings" "^7.8.0"
+
+"@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2"
+ integrity sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0"
+
+"@babel/plugin-proposal-numeric-separator@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz#5d6769409699ec9b3b68684cd8116cedff93bad8"
+ integrity sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-numeric-separator" "^7.8.3"
+
+"@babel/plugin-proposal-object-rest-spread@7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz#eb5ae366118ddca67bed583b53d7554cad9951bb"
+ integrity sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-object-rest-spread" "^7.8.0"
+
+"@babel/plugin-proposal-object-rest-spread@^7.9.5":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz#3fd65911306d8746014ec0d0cf78f0e39a149116"
+ integrity sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-object-rest-spread" "^7.8.0"
+ "@babel/plugin-transform-parameters" "^7.9.5"
+
+"@babel/plugin-proposal-optional-catch-binding@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz#9dee96ab1650eed88646ae9734ca167ac4a9c5c9"
+ integrity sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-optional-catch-binding" "^7.8.0"
+
+"@babel/plugin-proposal-optional-chaining@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz#31db16b154c39d6b8a645292472b98394c292a58"
+ integrity sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-optional-chaining" "^7.8.0"
+
+"@babel/plugin-proposal-unicode-property-regex@^7.4.4", "@babel/plugin-proposal-unicode-property-regex@^7.8.3":
+ version "7.8.8"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz#ee3a95e90cdc04fe8cd92ec3279fa017d68a0d1d"
+ integrity sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==
+ dependencies:
+ "@babel/helper-create-regexp-features-plugin" "^7.8.8"
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-syntax-async-generators@^7.8.0":
+ version "7.8.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"
+ integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-dynamic-import@^7.8.0", "@babel/plugin-syntax-dynamic-import@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3"
+ integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-json-strings@^7.8.0":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a"
+ integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-jsx@7.8.3", "@babel/plugin-syntax-jsx@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz#521b06c83c40480f1e58b4fd33b92eceb1d6ea94"
+ integrity sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9"
+ integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-numeric-separator@^7.8.0", "@babel/plugin-syntax-numeric-separator@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz#0e3fb63e09bea1b11e96467271c8308007e7c41f"
+ integrity sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-syntax-object-rest-spread@7.8.3", "@babel/plugin-syntax-object-rest-spread@^7.8.0":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871"
+ integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-optional-catch-binding@^7.8.0":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1"
+ integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-optional-chaining@^7.8.0":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a"
+ integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/plugin-syntax-top-level-await@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz#3acdece695e6b13aaf57fc291d1a800950c71391"
+ integrity sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-syntax-typescript@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz#c1f659dda97711a569cef75275f7e15dcaa6cabc"
+ integrity sha512-GO1MQ/SGGGoiEXY0e0bSpHimJvxqB7lktLLIq2pv8xG7WZ8IMEle74jIe1FhprHBWjwjZtXHkycDLZXIWM5Wfg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-arrow-functions@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz#82776c2ed0cd9e1a49956daeb896024c9473b8b6"
+ integrity sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-async-to-generator@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz#4308fad0d9409d71eafb9b1a6ee35f9d64b64086"
+ integrity sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==
+ dependencies:
+ "@babel/helper-module-imports" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-remap-async-to-generator" "^7.8.3"
+
+"@babel/plugin-transform-block-scoped-functions@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz#437eec5b799b5852072084b3ae5ef66e8349e8a3"
+ integrity sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-block-scoping@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz#97d35dab66857a437c166358b91d09050c868f3a"
+ integrity sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ lodash "^4.17.13"
+
+"@babel/plugin-transform-classes@^7.9.5":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz#800597ddb8aefc2c293ed27459c1fcc935a26c2c"
+ integrity sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.8.3"
+ "@babel/helper-define-map" "^7.8.3"
+ "@babel/helper-function-name" "^7.9.5"
+ "@babel/helper-optimise-call-expression" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-replace-supers" "^7.8.6"
+ "@babel/helper-split-export-declaration" "^7.8.3"
+ globals "^11.1.0"
+
+"@babel/plugin-transform-computed-properties@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz#96d0d28b7f7ce4eb5b120bb2e0e943343c86f81b"
+ integrity sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-destructuring@^7.9.5":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz#72c97cf5f38604aea3abf3b935b0e17b1db76a50"
+ integrity sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-dotall-regex@^7.4.4", "@babel/plugin-transform-dotall-regex@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz#c3c6ec5ee6125c6993c5cbca20dc8621a9ea7a6e"
+ integrity sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==
+ dependencies:
+ "@babel/helper-create-regexp-features-plugin" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-duplicate-keys@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz#8d12df309aa537f272899c565ea1768e286e21f1"
+ integrity sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-exponentiation-operator@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz#581a6d7f56970e06bf51560cd64f5e947b70d7b7"
+ integrity sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==
+ dependencies:
+ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-for-of@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz#0f260e27d3e29cd1bb3128da5e76c761aa6c108e"
+ integrity sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-function-name@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz#279373cb27322aaad67c2683e776dfc47196ed8b"
+ integrity sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==
+ dependencies:
+ "@babel/helper-function-name" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-literals@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz#aef239823d91994ec7b68e55193525d76dbd5dc1"
+ integrity sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-member-expression-literals@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz#963fed4b620ac7cbf6029c755424029fa3a40410"
+ integrity sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-modules-amd@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz#19755ee721912cf5bb04c07d50280af3484efef4"
+ integrity sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q==
+ dependencies:
+ "@babel/helper-module-transforms" "^7.9.0"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ babel-plugin-dynamic-import-node "^2.3.0"
+
+"@babel/plugin-transform-modules-commonjs@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940"
+ integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==
+ dependencies:
+ "@babel/helper-module-transforms" "^7.9.0"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-simple-access" "^7.8.3"
+ babel-plugin-dynamic-import-node "^2.3.0"
+
+"@babel/plugin-transform-modules-systemjs@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz#e9fd46a296fc91e009b64e07ddaa86d6f0edeb90"
+ integrity sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ==
+ dependencies:
+ "@babel/helper-hoist-variables" "^7.8.3"
+ "@babel/helper-module-transforms" "^7.9.0"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ babel-plugin-dynamic-import-node "^2.3.0"
+
+"@babel/plugin-transform-modules-umd@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz#e909acae276fec280f9b821a5f38e1f08b480697"
+ integrity sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==
+ dependencies:
+ "@babel/helper-module-transforms" "^7.9.0"
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-named-capturing-groups-regex@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz#a2a72bffa202ac0e2d0506afd0939c5ecbc48c6c"
+ integrity sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==
+ dependencies:
+ "@babel/helper-create-regexp-features-plugin" "^7.8.3"
+
+"@babel/plugin-transform-new-target@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz#60cc2ae66d85c95ab540eb34babb6434d4c70c43"
+ integrity sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-object-super@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz#ebb6a1e7a86ffa96858bd6ac0102d65944261725"
+ integrity sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-replace-supers" "^7.8.3"
+
+"@babel/plugin-transform-parameters@^7.9.5":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz#173b265746f5e15b2afe527eeda65b73623a0795"
+ integrity sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA==
+ dependencies:
+ "@babel/helper-get-function-arity" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-property-literals@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz#33194300d8539c1ed28c62ad5087ba3807b98263"
+ integrity sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-react-display-name@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.8.3.tgz#70ded987c91609f78353dd76d2fb2a0bb991e8e5"
+ integrity sha512-3Jy/PCw8Fe6uBKtEgz3M82ljt+lTg+xJaM4og+eyu83qLT87ZUSckn0wy7r31jflURWLO83TW6Ylf7lyXj3m5A==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-react-jsx-development@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.9.0.tgz#3c2a130727caf00c2a293f0aed24520825dbf754"
+ integrity sha512-tK8hWKrQncVvrhvtOiPpKrQjfNX3DtkNLSX4ObuGcpS9p0QrGetKmlySIGR07y48Zft8WVgPakqd/bk46JrMSw==
+ dependencies:
+ "@babel/helper-builder-react-jsx-experimental" "^7.9.0"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-jsx" "^7.8.3"
+
+"@babel/plugin-transform-react-jsx-self@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.9.0.tgz#f4f26a325820205239bb915bad8e06fcadabb49b"
+ integrity sha512-K2ObbWPKT7KUTAoyjCsFilOkEgMvFG+y0FqOl6Lezd0/13kMkkjHskVsZvblRPj1PHA44PrToaZANrryppzTvQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-jsx" "^7.8.3"
+
+"@babel/plugin-transform-react-jsx-source@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.9.0.tgz#89ef93025240dd5d17d3122294a093e5e0183de0"
+ integrity sha512-K6m3LlSnTSfRkM6FcRk8saNEeaeyG5k7AVkBU2bZK3+1zdkSED3qNdsWrUgQBeTVD2Tp3VMmerxVO2yM5iITmw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-jsx" "^7.8.3"
+
+"@babel/plugin-transform-react-jsx@^7.9.4":
+ version "7.9.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.9.4.tgz#86f576c8540bd06d0e95e0b61ea76d55f6cbd03f"
+ integrity sha512-Mjqf3pZBNLt854CK0C/kRuXAnE6H/bo7xYojP+WGtX8glDGSibcwnsWwhwoSuRg0+EBnxPC1ouVnuetUIlPSAw==
+ dependencies:
+ "@babel/helper-builder-react-jsx" "^7.9.0"
+ "@babel/helper-builder-react-jsx-experimental" "^7.9.0"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-jsx" "^7.8.3"
+
+"@babel/plugin-transform-regenerator@^7.8.7":
+ version "7.8.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz#5e46a0dca2bee1ad8285eb0527e6abc9c37672f8"
+ integrity sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==
+ dependencies:
+ regenerator-transform "^0.14.2"
+
+"@babel/plugin-transform-reserved-words@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz#9a0635ac4e665d29b162837dd3cc50745dfdf1f5"
+ integrity sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-runtime@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.0.tgz#45468c0ae74cc13204e1d3b1f4ce6ee83258af0b"
+ integrity sha512-pUu9VSf3kI1OqbWINQ7MaugnitRss1z533436waNXp+0N3ur3zfut37sXiQMxkuCF4VUjwZucen/quskCh7NHw==
+ dependencies:
+ "@babel/helper-module-imports" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ resolve "^1.8.1"
+ semver "^5.5.1"
+
+"@babel/plugin-transform-shorthand-properties@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz#28545216e023a832d4d3a1185ed492bcfeac08c8"
+ integrity sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-spread@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz#9c8ffe8170fdfb88b114ecb920b82fb6e95fe5e8"
+ integrity sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-sticky-regex@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz#be7a1290f81dae767475452199e1f76d6175b100"
+ integrity sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-regex" "^7.8.3"
+
+"@babel/plugin-transform-template-literals@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz#7bfa4732b455ea6a43130adc0ba767ec0e402a80"
+ integrity sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-typeof-symbol@^7.8.4":
+ version "7.8.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz#ede4062315ce0aaf8a657a920858f1a2f35fc412"
+ integrity sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/plugin-transform-typescript@^7.9.0":
+ version "7.9.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.4.tgz#4bb4dde4f10bbf2d787fce9707fb09b483e33359"
+ integrity sha512-yeWeUkKx2auDbSxRe8MusAG+n4m9BFY/v+lPjmQDgOFX5qnySkUY5oXzkp6FwPdsYqnKay6lorXYdC0n3bZO7w==
+ dependencies:
+ "@babel/helper-create-class-features-plugin" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-syntax-typescript" "^7.8.3"
+
+"@babel/plugin-transform-unicode-regex@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad"
+ integrity sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==
+ dependencies:
+ "@babel/helper-create-regexp-features-plugin" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+
+"@babel/preset-env@^7.9.0":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.5.tgz#8ddc76039bc45b774b19e2fc548f6807d8a8919f"
+ integrity sha512-eWGYeADTlPJH+wq1F0wNfPbVS1w1wtmMJiYk55Td5Yu28AsdR9AsC97sZ0Qq8fHqQuslVSIYSGJMcblr345GfQ==
+ dependencies:
+ "@babel/compat-data" "^7.9.0"
+ "@babel/helper-compilation-targets" "^7.8.7"
+ "@babel/helper-module-imports" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-proposal-async-generator-functions" "^7.8.3"
+ "@babel/plugin-proposal-dynamic-import" "^7.8.3"
+ "@babel/plugin-proposal-json-strings" "^7.8.3"
+ "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3"
+ "@babel/plugin-proposal-numeric-separator" "^7.8.3"
+ "@babel/plugin-proposal-object-rest-spread" "^7.9.5"
+ "@babel/plugin-proposal-optional-catch-binding" "^7.8.3"
+ "@babel/plugin-proposal-optional-chaining" "^7.9.0"
+ "@babel/plugin-proposal-unicode-property-regex" "^7.8.3"
+ "@babel/plugin-syntax-async-generators" "^7.8.0"
+ "@babel/plugin-syntax-dynamic-import" "^7.8.0"
+ "@babel/plugin-syntax-json-strings" "^7.8.0"
+ "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0"
+ "@babel/plugin-syntax-numeric-separator" "^7.8.0"
+ "@babel/plugin-syntax-object-rest-spread" "^7.8.0"
+ "@babel/plugin-syntax-optional-catch-binding" "^7.8.0"
+ "@babel/plugin-syntax-optional-chaining" "^7.8.0"
+ "@babel/plugin-syntax-top-level-await" "^7.8.3"
+ "@babel/plugin-transform-arrow-functions" "^7.8.3"
+ "@babel/plugin-transform-async-to-generator" "^7.8.3"
+ "@babel/plugin-transform-block-scoped-functions" "^7.8.3"
+ "@babel/plugin-transform-block-scoping" "^7.8.3"
+ "@babel/plugin-transform-classes" "^7.9.5"
+ "@babel/plugin-transform-computed-properties" "^7.8.3"
+ "@babel/plugin-transform-destructuring" "^7.9.5"
+ "@babel/plugin-transform-dotall-regex" "^7.8.3"
+ "@babel/plugin-transform-duplicate-keys" "^7.8.3"
+ "@babel/plugin-transform-exponentiation-operator" "^7.8.3"
+ "@babel/plugin-transform-for-of" "^7.9.0"
+ "@babel/plugin-transform-function-name" "^7.8.3"
+ "@babel/plugin-transform-literals" "^7.8.3"
+ "@babel/plugin-transform-member-expression-literals" "^7.8.3"
+ "@babel/plugin-transform-modules-amd" "^7.9.0"
+ "@babel/plugin-transform-modules-commonjs" "^7.9.0"
+ "@babel/plugin-transform-modules-systemjs" "^7.9.0"
+ "@babel/plugin-transform-modules-umd" "^7.9.0"
+ "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3"
+ "@babel/plugin-transform-new-target" "^7.8.3"
+ "@babel/plugin-transform-object-super" "^7.8.3"
+ "@babel/plugin-transform-parameters" "^7.9.5"
+ "@babel/plugin-transform-property-literals" "^7.8.3"
+ "@babel/plugin-transform-regenerator" "^7.8.7"
+ "@babel/plugin-transform-reserved-words" "^7.8.3"
+ "@babel/plugin-transform-shorthand-properties" "^7.8.3"
+ "@babel/plugin-transform-spread" "^7.8.3"
+ "@babel/plugin-transform-sticky-regex" "^7.8.3"
+ "@babel/plugin-transform-template-literals" "^7.8.3"
+ "@babel/plugin-transform-typeof-symbol" "^7.8.4"
+ "@babel/plugin-transform-unicode-regex" "^7.8.3"
+ "@babel/preset-modules" "^0.1.3"
+ "@babel/types" "^7.9.5"
+ browserslist "^4.9.1"
+ core-js-compat "^3.6.2"
+ invariant "^2.2.2"
+ levenary "^1.1.1"
+ semver "^5.5.0"
+
+"@babel/preset-modules@^0.1.3":
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.3.tgz#13242b53b5ef8c883c3cf7dddd55b36ce80fbc72"
+ integrity sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/plugin-proposal-unicode-property-regex" "^7.4.4"
+ "@babel/plugin-transform-dotall-regex" "^7.4.4"
+ "@babel/types" "^7.4.4"
+ esutils "^2.0.2"
+
+"@babel/preset-react@^7.9.4":
+ version "7.9.4"
+ resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.9.4.tgz#c6c97693ac65b6b9c0b4f25b948a8f665463014d"
+ integrity sha512-AxylVB3FXeOTQXNXyiuAQJSvss62FEotbX2Pzx3K/7c+MKJMdSg6Ose6QYllkdCFA8EInCJVw7M/o5QbLuA4ZQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-transform-react-display-name" "^7.8.3"
+ "@babel/plugin-transform-react-jsx" "^7.9.4"
+ "@babel/plugin-transform-react-jsx-development" "^7.9.0"
+ "@babel/plugin-transform-react-jsx-self" "^7.9.0"
+ "@babel/plugin-transform-react-jsx-source" "^7.9.0"
+
+"@babel/preset-typescript@^7.9.0":
+ version "7.9.0"
+ resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.9.0.tgz#87705a72b1f0d59df21c179f7c3d2ef4b16ce192"
+ integrity sha512-S4cueFnGrIbvYJgwsVFKdvOmpiL0XGw9MFW9D0vgRys5g36PBhZRL8NX8Gr2akz8XRtzq6HuDXPD/1nniagNUg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/plugin-transform-typescript" "^7.9.0"
+
+"@babel/runtime@^7.1.2", "@babel/runtime@^7.4.0":
+ version "7.6.2"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.2.tgz#c3d6e41b304ef10dcf13777a33e7694ec4a9a6dd"
+ integrity sha512-EXxN64agfUqqIGeEjI5dL5z0Sw0ZwWo1mLTi4mQowCZ42O59b7DRpZAnTC6OqdF28wMBMFKNb/4uFGrVaigSpg==
+ dependencies:
+ regenerator-runtime "^0.13.2"
+
+"@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
+ version "7.9.2"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06"
+ integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==
+ dependencies:
+ regenerator-runtime "^0.13.4"
+
+"@babel/template@^7.8.3", "@babel/template@^7.8.6":
+ version "7.8.6"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b"
+ integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==
+ dependencies:
+ "@babel/code-frame" "^7.8.3"
+ "@babel/parser" "^7.8.6"
+ "@babel/types" "^7.8.6"
+
+"@babel/traverse@^7.8.3", "@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2"
+ integrity sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ==
+ dependencies:
+ "@babel/code-frame" "^7.8.3"
+ "@babel/generator" "^7.9.5"
+ "@babel/helper-function-name" "^7.9.5"
+ "@babel/helper-split-export-declaration" "^7.8.3"
+ "@babel/parser" "^7.9.0"
+ "@babel/types" "^7.9.5"
+ debug "^4.1.0"
+ globals "^11.1.0"
+ lodash "^4.17.13"
+
+"@babel/types@^7.4.4":
+ version "7.6.1"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648"
+ integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==
+ dependencies:
+ esutils "^2.0.2"
+ lodash "^4.17.13"
+ to-fast-properties "^2.0.0"
+
+"@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5":
+ version "7.9.5"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444"
+ integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.9.5"
+ lodash "^4.17.13"
+ to-fast-properties "^2.0.0"
+
+"@csstools/convert-colors@^1.4.0":
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
+ integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==
+
+"@docusaurus/core@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-alpha.50.tgz#4631efd9956a95aff29a6dfc9b3afffbcf6939e4"
+ integrity sha512-lNvft+di325Ww3/S/kgbJmDmZF6OgJc3gM5zE8Lcl2Hqa6gZ6INIsGhnGxIX5Of1apliWGRVSojEF+mxf0BE1g==
+ dependencies:
+ "@babel/core" "^7.9.0"
+ "@babel/plugin-syntax-dynamic-import" "^7.8.3"
+ "@babel/plugin-transform-runtime" "^7.9.0"
+ "@babel/preset-env" "^7.9.0"
+ "@babel/preset-react" "^7.9.4"
+ "@babel/preset-typescript" "^7.9.0"
+ "@babel/runtime" "^7.9.2"
+ "@docusaurus/utils" "^2.0.0-alpha.50"
+ "@endiliey/static-site-generator-webpack-plugin" "^4.0.0"
+ babel-loader "^8.1.0"
+ babel-plugin-dynamic-import-node "^2.3.0"
+ cache-loader "^4.1.0"
+ chalk "^3.0.0"
+ chokidar "^3.3.0"
+ classnames "^2.2.6"
+ commander "^4.0.1"
+ copy-webpack-plugin "^5.0.5"
+ core-js "^2.6.5"
+ css-loader "^3.4.2"
+ del "^5.1.0"
+ ejs "^3.0.2"
+ express "^4.17.1"
+ fs-extra "^8.1.0"
+ globby "^10.0.1"
+ html-minifier-terser "^5.0.5"
+ html-tags "^3.1.0"
+ html-webpack-plugin "^4.0.4"
+ import-fresh "^3.2.1"
+ lodash "^4.17.15"
+ mini-css-extract-plugin "^0.8.0"
+ nprogress "^0.2.0"
+ null-loader "^3.0.0"
+ optimize-css-assets-webpack-plugin "^5.0.3"
+ portfinder "^1.0.25"
+ postcss-loader "^3.0.0"
+ postcss-preset-env "^6.7.0"
+ react-dev-utils "^10.2.1"
+ react-helmet "^6.0.0-beta"
+ react-loadable "^5.5.0"
+ react-loadable-ssr-addon "^0.2.0"
+ react-router "^5.1.2"
+ react-router-config "^5.1.1"
+ react-router-dom "^5.1.2"
+ semver "^6.3.0"
+ shelljs "^0.8.3"
+ std-env "^2.2.1"
+ terser-webpack-plugin "^2.3.5"
+ wait-file "^1.0.5"
+ webpack "^4.41.2"
+ webpack-bundle-analyzer "^3.6.1"
+ webpack-dev-server "^3.10.3"
+ webpack-merge "^4.2.2"
+ webpackbar "^4.0.0"
+
+"@docusaurus/mdx-loader@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-alpha.50.tgz#77d179404c7e9a16c0f59b4b637a9fdd74d6dca3"
+ integrity sha512-S4e+zR0yWnMQQCcmQzWZi3Bl74FeF1E3qzyE4laQHXD1+napUo0j6eY8gFSI8h4mY2AaMQ3smCxqmqUU5IvtpQ==
+ dependencies:
+ "@babel/parser" "^7.9.4"
+ "@babel/traverse" "^7.9.0"
+ "@mdx-js/mdx" "^1.5.8"
+ "@mdx-js/react" "^1.5.8"
+ escape-html "^1.0.3"
+ fs-extra "^8.1.0"
+ github-slugger "^1.3.0"
+ gray-matter "^4.0.2"
+ loader-utils "^1.2.3"
+ mdast-util-to-string "^1.1.0"
+ remark-emoji "^2.1.0"
+ stringify-object "^3.3.0"
+ unist-util-visit "^2.0.2"
+
+"@docusaurus/plugin-content-blog@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.0.0-alpha.50.tgz#847c7abebaa364b8394060c0c1255c3f0a125f6f"
+ integrity sha512-dHlahBYhCt0Orfj1bnrNAViUzylCV0oLpZlFAiJnv3vYSYpJsNtz6MFrhd3k/1agO6VRsUzMOkS7huFrZcIamw==
+ dependencies:
+ "@docusaurus/mdx-loader" "^2.0.0-alpha.50"
+ "@docusaurus/utils" "^2.0.0-alpha.50"
+ feed "^4.1.0"
+ fs-extra "^8.1.0"
+ globby "^10.0.1"
+ loader-utils "^1.2.3"
+ lodash.kebabcase "^4.1.1"
+
+"@docusaurus/plugin-content-docs@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.0.0-alpha.50.tgz#67a18a5ee203c66b9211552f73daa9edb009f757"
+ integrity sha512-jBOq9kqntE+7RSZ4urivohFTEpb37pYVyRETtNFm+ArisBCclEOnxQetk3n36kNDijBKDnGxAVWPJF+zaEAe4Q==
+ dependencies:
+ "@docusaurus/mdx-loader" "^2.0.0-alpha.50"
+ "@docusaurus/utils" "^2.0.0-alpha.50"
+ execa "^3.4.0"
+ fs-extra "^8.1.0"
+ globby "^10.0.1"
+ import-fresh "^3.2.1"
+ loader-utils "^1.2.3"
+ lodash "^4.17.15"
+ shelljs "^0.8.3"
+
+"@docusaurus/plugin-content-pages@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.0.0-alpha.50.tgz#34a77bc036e9e9a08815c6fef4e9be1c3abe619e"
+ integrity sha512-fSoQTcJdCh1EFGVvAvNMPaU6eilXM2pRaOgP9GthBktB8iasVxnUM5bpCuFjHXqvEZux1ho8XqrvQgTh06jPsA==
+ dependencies:
+ "@docusaurus/types" "^2.0.0-alpha.50"
+ "@docusaurus/utils" "^2.0.0-alpha.50"
+ globby "^10.0.1"
+
+"@docusaurus/plugin-google-analytics@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.0.0-alpha.50.tgz#862989777cb1f62b81fb1462dd5cfba34237cddf"
+ integrity sha512-99tw5yGRhrMfeTFny4dkjLdgeTrE/jbTQGUNHKaTiKQxm+APhiwDoKlptUrkMy4lxwPc3IW1cEcgF8j0oao1EQ==
+
+"@docusaurus/plugin-google-gtag@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.0.0-alpha.50.tgz#4b69c23ef6818f96e6a13588c0e53f43ff264611"
+ integrity sha512-fdW6ycdnLbWah31vx1e8/n4oopwmo5H89zzC9xVsJB0snBPQnMNbuZ82ob9TXYN57JcnK5bZeVPR/RYiAh0CWQ==
+
+"@docusaurus/plugin-sitemap@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.0.0-alpha.50.tgz#a9ab066286e96ef7ef51cdadb0429562d95514e0"
+ integrity sha512-aGTeDohtjPc/nnwG4QxMem/xmbqi345Cdvkij3HZi2/kfEb0e6VxZ/YXa6Vvdb7f4ezav2N5bY7uqQojGDz8vg==
+ dependencies:
+ "@docusaurus/types" "^2.0.0-alpha.50"
+ sitemap "^3.2.2"
+
+"@docusaurus/preset-classic@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.0.0-alpha.50.tgz#56a3ca2b7d7a01c410009309fed7d57a67bb8788"
+ integrity sha512-SrVE95VNOY/X5Cc7ZL175TiCNjW50PEVoGVp/Y86/RAQEq7Wm5Bi32jFAcsjndbTOqKaEhRikSkqEQipbrF8GA==
+ dependencies:
+ "@docusaurus/plugin-content-blog" "^2.0.0-alpha.50"
+ "@docusaurus/plugin-content-docs" "^2.0.0-alpha.50"
+ "@docusaurus/plugin-content-pages" "^2.0.0-alpha.50"
+ "@docusaurus/plugin-google-analytics" "^2.0.0-alpha.50"
+ "@docusaurus/plugin-google-gtag" "^2.0.0-alpha.50"
+ "@docusaurus/plugin-sitemap" "^2.0.0-alpha.50"
+ "@docusaurus/theme-classic" "^2.0.0-alpha.50"
+ "@docusaurus/theme-search-algolia" "^2.0.0-alpha.50"
+ remark-admonitions "^1.2.1"
+
+"@docusaurus/theme-classic@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-2.0.0-alpha.50.tgz#244062bde993a62dc31fe0d4593a7c3354b13b0b"
+ integrity sha512-tcMnUsdHi3jKg7DLqohftYnwDGa8Tyrtrx0zcMDXOUcYF9NCdoz3DT/39c5Fo5tDIvvGAKVkuSBJX8O/UnzDIQ==
+ dependencies:
+ "@mdx-js/mdx" "^1.5.8"
+ "@mdx-js/react" "^1.5.8"
+ classnames "^2.2.6"
+ clipboard "^2.0.6"
+ infima "0.2.0-alpha.6"
+ parse-numeric-range "^0.0.2"
+ prism-react-renderer "^1.0.2"
+ prismjs "^1.19.0"
+ react-router-dom "^5.1.2"
+ react-toggle "^4.1.1"
+
+"@docusaurus/theme-search-algolia@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.0.0-alpha.50.tgz#da7105a0b751fcb127aba945d178abbdd58b63cf"
+ integrity sha512-ixceplsidNabn0L15XYaOHzf+DCPM0+0sESW7xXK2X/K/IQaP1Mrcrs/MPovjCqylt/0UuHro1CUJimQi/x8yw==
+ dependencies:
+ classnames "^2.2.6"
+ docsearch.js "^2.6.3"
+
+"@docusaurus/types@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.0.0-alpha.50.tgz#0ea5dde077faa2e70a694eb7562bcdf21f35bc2e"
+ integrity sha512-wrbBGRfTF/Obt4oaCBoVY2yKaU6jEJlqdAqSj346vBUTxKyHNVDp2EgFrjZ+nesmWlHfP6ELfIvjc/cgRwliLQ==
+ dependencies:
+ "@types/webpack" "^4.41.0"
+ commander "^4.0.1"
+ querystring "0.2.0"
+
+"@docusaurus/utils@^2.0.0-alpha.50":
+ version "2.0.0-alpha.50"
+ resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-alpha.50.tgz#1ceba4fafe70a7617e4d2b1e5ffa2d51d0d99927"
+ integrity sha512-1mQgmlF7/kB4Ud1EpUcS5C9fafI2TpjChIUEvT6Qgi5m1XOxiOTiV8x0JY/SCewR3aSmiR5nP/+hiiv57CxIFA==
+ dependencies:
+ escape-string-regexp "^2.0.0"
+ fs-extra "^8.1.0"
+ gray-matter "^4.0.2"
+ lodash "^4.17.15"
+
+"@endiliey/static-site-generator-webpack-plugin@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@endiliey/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.0.tgz#94bfe58fd83aeda355de797fcb5112adaca3a6b1"
+ integrity sha512-3MBqYCs30qk1OBRC697NqhGouYbs71D1B8hrk/AFJC6GwF2QaJOQZtA1JYAaGSe650sZ8r5ppRTtCRXepDWlng==
+ dependencies:
+ bluebird "^3.7.1"
+ cheerio "^0.22.0"
+ eval "^0.1.4"
+ url "^0.11.0"
+ webpack-sources "^1.4.3"
+
+"@hapi/address@2.x.x":
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.2.tgz#1c794cd6dbf2354d1eb1ef10e0303f573e1c7222"
+ integrity sha512-O4QDrx+JoGKZc6aN64L04vqa7e41tIiLU+OvKdcYaEMP97UttL0f9GIi9/0A4WAMx0uBd6SidDIhktZhgOcN8Q==
+
+"@hapi/bourne@1.x.x":
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-1.3.2.tgz#0a7095adea067243ce3283e1b56b8a8f453b242a"
+ integrity sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==
+
+"@hapi/hoek@8.x.x":
+ version "8.2.4"
+ resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.2.4.tgz#684a14f4ca35d46f44abc87dfc696e5e4fe8a020"
+ integrity sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==
+
+"@hapi/joi@^15.1.0":
+ version "15.1.1"
+ resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-15.1.1.tgz#c675b8a71296f02833f8d6d243b34c57b8ce19d7"
+ integrity sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==
+ dependencies:
+ "@hapi/address" "2.x.x"
+ "@hapi/bourne" "1.x.x"
+ "@hapi/hoek" "8.x.x"
+ "@hapi/topo" "3.x.x"
+
+"@hapi/topo@3.x.x":
+ version "3.1.4"
+ resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.4.tgz#42e2fe36f593d90ad258a08b582be128c141c45d"
+ integrity sha512-aVWQTOI9wBD6zawmOr6f+tdEIxQC8JXfQVLTjgGe8YEStAWGn/GNNVTobKJhbWKveQj2RyYF3oYbO9SC8/eOCA==
+ dependencies:
+ "@hapi/hoek" "8.x.x"
+
+"@mdx-js/mdx@^1.5.8":
+ version "1.5.8"
+ resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-1.5.8.tgz#40740eaf0b0007b461cee8df13a7ae5a1af8064a"
+ integrity sha512-OzanPTN0p9GZOEVeEuEa8QsjxxGyfFOOnI/+V1oC1su9UIN4KUg1k4n/hWTZC+VZhdW1Lfj6+Ho8nIs6L+pbDA==
+ dependencies:
+ "@babel/core" "7.8.4"
+ "@babel/plugin-syntax-jsx" "7.8.3"
+ "@babel/plugin-syntax-object-rest-spread" "7.8.3"
+ "@mdx-js/util" "^1.5.8"
+ babel-plugin-apply-mdx-type-prop "^1.5.8"
+ babel-plugin-extract-import-names "^1.5.8"
+ camelcase-css "2.0.1"
+ detab "2.0.3"
+ hast-util-raw "5.0.2"
+ lodash.uniq "4.5.0"
+ mdast-util-to-hast "7.0.0"
+ remark-mdx "^1.5.8"
+ remark-parse "7.0.2"
+ remark-squeeze-paragraphs "3.0.4"
+ style-to-object "0.3.0"
+ unified "8.4.2"
+ unist-builder "2.0.3"
+ unist-util-visit "2.0.2"
+
+"@mdx-js/react@^1.5.8":
+ version "1.5.8"
+ resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-1.5.8.tgz#fc38fe0eb278ae24666b2df3c751e726e33f5fac"
+ integrity sha512-L3rehITVxqDHOPJFGBSHKt3Mv/p3MENYlGIwLNYU89/iVqTLMD/vz8hL9RQtKqRoMbKuWpzzLlKIObqJzthNYg==
+
+"@mdx-js/util@^1.5.8":
+ version "1.5.8"
+ resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.5.8.tgz#cbadda0378af899c17ce1aa69c677015cab28448"
+ integrity sha512-a7Gjjw8bfBSertA/pTWBA/9WKEhgaSxvQE2NTSUzaknrzGFOhs4alZSHh3RHmSFdSWv5pUuzAgsWseMLhWEVkQ==
+
+"@mrmlnc/readdir-enhanced@^2.2.1":
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
+ integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==
+ dependencies:
+ call-me-maybe "^1.0.1"
+ glob-to-regexp "^0.3.0"
+
+"@nodelib/fs.scandir@2.1.2":
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.2.tgz#1f981cd5b83e85cfdeb386fc693d4baab392fa54"
+ integrity sha512-wrIBsjA5pl13f0RN4Zx4FNWmU71lv03meGKnqRUoCyan17s4V3WL92f3w3AIuWbNnpcrQyFBU5qMavJoB8d27w==
+ dependencies:
+ "@nodelib/fs.stat" "2.0.2"
+ run-parallel "^1.1.9"
+
+"@nodelib/fs.stat@2.0.2", "@nodelib/fs.stat@^2.0.1":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.2.tgz#2762aea8fe78ea256860182dcb52d61ee4b8fda6"
+ integrity sha512-z8+wGWV2dgUhLqrtRYa03yDx4HWMvXKi1z8g3m2JyxAx8F7xk74asqPk5LAETjqDSGLFML/6CDl0+yFunSYicw==
+
+"@nodelib/fs.stat@^1.1.2":
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
+ integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==
+
+"@nodelib/fs.walk@^1.2.1":
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.3.tgz#a555dc256acaf00c62b0db29529028dd4d4cb141"
+ integrity sha512-l6t8xEhfK9Sa4YO5mIRdau7XSOADfmh3jCr0evNHdY+HNkW6xuQhgMH7D73VV6WpZOagrW0UludvMTiifiwTfA==
+ dependencies:
+ "@nodelib/fs.scandir" "2.1.2"
+ fastq "^1.6.0"
+
+"@types/anymatch@*":
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a"
+ integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==
+
+"@types/color-name@^1.1.1":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
+ integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
+
+"@types/events@*":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
+ integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==
+
+"@types/glob@^7.1.1":
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575"
+ integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==
+ dependencies:
+ "@types/events" "*"
+ "@types/minimatch" "*"
+ "@types/node" "*"
+
+"@types/html-minifier-terser@^5.0.0":
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.0.0.tgz#7532440c138605ced1b555935c3115ddd20e8bef"
+ integrity sha512-q95SP4FdkmF0CwO0F2q0H6ZgudsApaY/yCtAQNRn1gduef5fGpyEphzy0YCq/N0UFvDSnLg5V8jFK/YGXlDiCw==
+
+"@types/minimatch@*":
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
+ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
+
+"@types/node@*":
+ version "12.7.8"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.8.tgz#cb1bf6800238898bc2ff6ffa5702c3cadd350708"
+ integrity sha512-FMdVn84tJJdV+xe+53sYiZS4R5yn1mAIxfj+DVoNiQjTYz1+OYmjwEZr1ev9nU0axXwda0QDbYl06QHanRVH3A==
+
+"@types/q@^1.5.1":
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8"
+ integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==
+
+"@types/source-list-map@*":
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9"
+ integrity sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==
+
+"@types/tapable@*", "@types/tapable@^1.0.5":
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.5.tgz#9adbc12950582aa65ead76bffdf39fe0c27a3c02"
+ integrity sha512-/gG2M/Imw7cQFp8PGvz/SwocNrmKFjFsm5Pb8HdbHkZ1K8pmuPzOX4VeVoiEecFCVf4CsN1r3/BRvx+6sNqwtQ==
+
+"@types/uglify-js@*":
+ version "3.9.0"
+ resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.9.0.tgz#4490a140ca82aa855ad68093829e7fd6ae94ea87"
+ integrity sha512-3ZcoyPYHVOCcLpnfZwD47KFLr8W/mpUcgjpf1M4Q78TMJIw7KMAHSjiCLJp1z3ZrBR9pTLbe191O0TldFK5zcw==
+ dependencies:
+ source-map "^0.6.1"
+
+"@types/unist@^2.0.0", "@types/unist@^2.0.2", "@types/unist@^2.0.3":
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e"
+ integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==
+
+"@types/webpack-sources@*":
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.7.tgz#0a330a9456113410c74a5d64180af0cbca007141"
+ integrity sha512-XyaHrJILjK1VHVC4aVlKsdNN5KBTwufMb43cQs+flGxtPAf/1Qwl8+Q0tp5BwEGaI8D6XT1L+9bSWXckgkjTLw==
+ dependencies:
+ "@types/node" "*"
+ "@types/source-list-map" "*"
+ source-map "^0.6.1"
+
+"@types/webpack@^4.41.0", "@types/webpack@^4.41.8":
+ version "4.41.11"
+ resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.11.tgz#7b7f725397d3b630bede05415d34e9ff30d9771f"
+ integrity sha512-PtEZISfBMWL05qOpZN19hztZPt0rPuGQh5sbBP3bB4RrJgzdb0SScn47hdcMaoN1IgaU7NZWeDO6reFcKTK2iQ==
+ dependencies:
+ "@types/anymatch" "*"
+ "@types/node" "*"
+ "@types/tapable" "*"
+ "@types/uglify-js" "*"
+ "@types/webpack-sources" "*"
+ source-map "^0.6.0"
+
+"@webassemblyjs/ast@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964"
+ integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==
+ dependencies:
+ "@webassemblyjs/helper-module-context" "1.9.0"
+ "@webassemblyjs/helper-wasm-bytecode" "1.9.0"
+ "@webassemblyjs/wast-parser" "1.9.0"
+
+"@webassemblyjs/floating-point-hex-parser@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4"
+ integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==
+
+"@webassemblyjs/helper-api-error@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2"
+ integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==
+
+"@webassemblyjs/helper-buffer@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00"
+ integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==
+
+"@webassemblyjs/helper-code-frame@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27"
+ integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==
+ dependencies:
+ "@webassemblyjs/wast-printer" "1.9.0"
+
+"@webassemblyjs/helper-fsm@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8"
+ integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==
+
+"@webassemblyjs/helper-module-context@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07"
+ integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==
+ dependencies:
+ "@webassemblyjs/ast" "1.9.0"
+
+"@webassemblyjs/helper-wasm-bytecode@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790"
+ integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==
+
+"@webassemblyjs/helper-wasm-section@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346"
+ integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==
+ dependencies:
+ "@webassemblyjs/ast" "1.9.0"
+ "@webassemblyjs/helper-buffer" "1.9.0"
+ "@webassemblyjs/helper-wasm-bytecode" "1.9.0"
+ "@webassemblyjs/wasm-gen" "1.9.0"
+
+"@webassemblyjs/ieee754@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4"
+ integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==
+ dependencies:
+ "@xtuc/ieee754" "^1.2.0"
+
+"@webassemblyjs/leb128@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95"
+ integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==
+ dependencies:
+ "@xtuc/long" "4.2.2"
+
+"@webassemblyjs/utf8@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab"
+ integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==
+
+"@webassemblyjs/wasm-edit@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf"
+ integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==
+ dependencies:
+ "@webassemblyjs/ast" "1.9.0"
+ "@webassemblyjs/helper-buffer" "1.9.0"
+ "@webassemblyjs/helper-wasm-bytecode" "1.9.0"
+ "@webassemblyjs/helper-wasm-section" "1.9.0"
+ "@webassemblyjs/wasm-gen" "1.9.0"
+ "@webassemblyjs/wasm-opt" "1.9.0"
+ "@webassemblyjs/wasm-parser" "1.9.0"
+ "@webassemblyjs/wast-printer" "1.9.0"
+
+"@webassemblyjs/wasm-gen@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c"
+ integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==
+ dependencies:
+ "@webassemblyjs/ast" "1.9.0"
+ "@webassemblyjs/helper-wasm-bytecode" "1.9.0"
+ "@webassemblyjs/ieee754" "1.9.0"
+ "@webassemblyjs/leb128" "1.9.0"
+ "@webassemblyjs/utf8" "1.9.0"
+
+"@webassemblyjs/wasm-opt@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61"
+ integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==
+ dependencies:
+ "@webassemblyjs/ast" "1.9.0"
+ "@webassemblyjs/helper-buffer" "1.9.0"
+ "@webassemblyjs/wasm-gen" "1.9.0"
+ "@webassemblyjs/wasm-parser" "1.9.0"
+
+"@webassemblyjs/wasm-parser@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e"
+ integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==
+ dependencies:
+ "@webassemblyjs/ast" "1.9.0"
+ "@webassemblyjs/helper-api-error" "1.9.0"
+ "@webassemblyjs/helper-wasm-bytecode" "1.9.0"
+ "@webassemblyjs/ieee754" "1.9.0"
+ "@webassemblyjs/leb128" "1.9.0"
+ "@webassemblyjs/utf8" "1.9.0"
+
+"@webassemblyjs/wast-parser@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914"
+ integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==
+ dependencies:
+ "@webassemblyjs/ast" "1.9.0"
+ "@webassemblyjs/floating-point-hex-parser" "1.9.0"
+ "@webassemblyjs/helper-api-error" "1.9.0"
+ "@webassemblyjs/helper-code-frame" "1.9.0"
+ "@webassemblyjs/helper-fsm" "1.9.0"
+ "@xtuc/long" "4.2.2"
+
+"@webassemblyjs/wast-printer@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899"
+ integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==
+ dependencies:
+ "@webassemblyjs/ast" "1.9.0"
+ "@webassemblyjs/wast-parser" "1.9.0"
+ "@xtuc/long" "4.2.2"
+
+"@xtuc/ieee754@^1.2.0":
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790"
+ integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==
+
+"@xtuc/long@4.2.2":
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
+ integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==
+
+abbrev@1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
+ integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
+
+accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7:
+ version "1.3.7"
+ resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
+ integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
+ dependencies:
+ mime-types "~2.1.24"
+ negotiator "0.6.2"
+
+acorn-walk@^7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.1.1.tgz#345f0dffad5c735e7373d2fec9a1023e6a44b83e"
+ integrity sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==
+
+acorn@^6.2.1:
+ version "6.4.1"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474"
+ integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==
+
+acorn@^7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf"
+ integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==
+
+address@1.1.2, address@^1.0.1:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6"
+ integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==
+
+agentkeepalive@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-2.2.0.tgz#c5d1bd4b129008f1163f236f86e5faea2026e2ef"
+ integrity sha1-xdG9SxKQCPEWPyNvhuX66iAm4u8=
+
+aggregate-error@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0"
+ integrity sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==
+ dependencies:
+ clean-stack "^2.0.0"
+ indent-string "^4.0.0"
+
+ajv-errors@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d"
+ integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==
+
+ajv-keywords@^3.1.0, ajv-keywords@^3.4.1:
+ version "3.4.1"
+ resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da"
+ integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==
+
+ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5:
+ version "6.10.2"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52"
+ integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==
+ dependencies:
+ fast-deep-equal "^2.0.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
+ajv@^6.12.0:
+ version "6.12.0"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7"
+ integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==
+ dependencies:
+ fast-deep-equal "^3.1.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
+algoliasearch@^3.24.5:
+ version "3.35.0"
+ resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-3.35.0.tgz#03f2900698c7c547fce9fb8fb8d0b9a56c8da405"
+ integrity sha512-Om4aLzkGbUi+Rc3sa8s48CRj2Qe7u5TXS7lK7Z681x2EiAa5Qx5uB/kbp8A6qY6dFDX7vstYRIYZ7t9XgdJ1dw==
+ dependencies:
+ agentkeepalive "^2.2.0"
+ debug "^2.6.9"
+ envify "^4.0.0"
+ es6-promise "^4.1.0"
+ events "^1.1.0"
+ foreach "^2.0.5"
+ global "^4.3.2"
+ inherits "^2.0.1"
+ isarray "^2.0.1"
+ load-script "^1.0.0"
+ object-keys "^1.0.11"
+ querystring-es3 "^0.2.1"
+ reduce "^1.0.1"
+ semver "^5.1.0"
+ tunnel-agent "^0.6.0"
+
+alphanum-sort@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
+ integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
+
+ansi-colors@^3.0.0:
+ version "3.2.4"
+ resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf"
+ integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==
+
+ansi-escapes@^4.2.1:
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61"
+ integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==
+ dependencies:
+ type-fest "^0.11.0"
+
+ansi-html@0.0.7:
+ version "0.0.7"
+ resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e"
+ integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4=
+
+ansi-regex@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+ integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+ integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
+
+ansi-regex@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
+ integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
+
+ansi-regex@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
+ integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
+
+ansi-styles@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+ integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=
+
+ansi-styles@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+ integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
+ dependencies:
+ color-convert "^1.9.0"
+
+ansi-styles@^4.0.0, ansi-styles@^4.1.0:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
+ integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
+ dependencies:
+ "@types/color-name" "^1.1.1"
+ color-convert "^2.0.1"
+
+anymatch@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
+ integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==
+ dependencies:
+ micromatch "^3.1.4"
+ normalize-path "^2.1.1"
+
+anymatch@~3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
+ integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
+ dependencies:
+ normalize-path "^3.0.0"
+ picomatch "^2.0.4"
+
+aproba@^1.0.3, aproba@^1.1.1:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
+ integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
+
+are-we-there-yet@~1.1.2:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
+ integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==
+ dependencies:
+ delegates "^1.0.0"
+ readable-stream "^2.0.6"
+
+argparse@^1.0.7:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
+ integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
+ dependencies:
+ sprintf-js "~1.0.2"
+
+arr-diff@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
+ integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=
+
+arr-flatten@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+ integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==
+
+arr-union@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
+ integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
+
+array-flatten@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
+ integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
+
+array-flatten@^2.1.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099"
+ integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==
+
+array-union@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
+ integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=
+ dependencies:
+ array-uniq "^1.0.1"
+
+array-union@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
+ integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
+
+array-uniq@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
+ integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=
+
+array-unique@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
+ integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
+
+arrify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+ integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
+
+asn1.js@^4.0.0:
+ version "4.10.1"
+ resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0"
+ integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==
+ dependencies:
+ bn.js "^4.0.0"
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+
+asn1@~0.2.3:
+ version "0.2.4"
+ resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
+ integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
+ dependencies:
+ safer-buffer "~2.1.0"
+
+assert-plus@1.0.0, assert-plus@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
+ integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
+
+assert@^1.1.1:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb"
+ integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==
+ dependencies:
+ object-assign "^4.1.1"
+ util "0.10.3"
+
+assign-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+ integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
+
+async-each@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf"
+ integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==
+
+async-limiter@~1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
+ integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==
+
+async@^2.6.2:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
+ integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==
+ dependencies:
+ lodash "^4.17.14"
+
+asynckit@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+ integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
+
+atob@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
+ integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
+
+autocomplete.js@0.36.0:
+ version "0.36.0"
+ resolved "https://registry.yarnpkg.com/autocomplete.js/-/autocomplete.js-0.36.0.tgz#94fe775fe64b6cd42e622d076dc7fd26bedd837b"
+ integrity sha512-jEwUXnVMeCHHutUt10i/8ZiRaCb0Wo+ZyKxeGsYwBDtw6EJHqEeDrq4UwZRD8YBSvp3g6klP678il2eeiVXN2Q==
+ dependencies:
+ immediate "^3.2.3"
+
+autoprefixer@^9.6.1:
+ version "9.6.1"
+ resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47"
+ integrity sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw==
+ dependencies:
+ browserslist "^4.6.3"
+ caniuse-lite "^1.0.30000980"
+ chalk "^2.4.2"
+ normalize-range "^0.1.2"
+ num2fraction "^1.2.2"
+ postcss "^7.0.17"
+ postcss-value-parser "^4.0.0"
+
+aws-sign2@~0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
+ integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
+
+aws4@^1.8.0:
+ version "1.8.0"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
+ integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==
+
+babel-code-frame@^6.22.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
+ integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=
+ dependencies:
+ chalk "^1.1.3"
+ esutils "^2.0.2"
+ js-tokens "^3.0.2"
+
+babel-loader@^8.1.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3"
+ integrity sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==
+ dependencies:
+ find-cache-dir "^2.1.0"
+ loader-utils "^1.4.0"
+ mkdirp "^0.5.3"
+ pify "^4.0.1"
+ schema-utils "^2.6.5"
+
+babel-plugin-apply-mdx-type-prop@^1.5.8:
+ version "1.5.8"
+ resolved "https://registry.yarnpkg.com/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.5.8.tgz#f5ff6d9d7a7fcde0e5f5bd02d3d3cd10e5cca5bf"
+ integrity sha512-xYp5F9mAnZdDRFSd1vF3XQ0GQUbIulCpnuht2jCmK30GAHL8szVL7TgzwhEGamQ6yJmP/gEyYNM9OR5D2n26eA==
+ dependencies:
+ "@babel/helper-plugin-utils" "7.8.3"
+ "@mdx-js/util" "^1.5.8"
+
+babel-plugin-dynamic-import-node@^2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f"
+ integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==
+ dependencies:
+ object.assign "^4.1.0"
+
+babel-plugin-extract-import-names@^1.5.8:
+ version "1.5.8"
+ resolved "https://registry.yarnpkg.com/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.5.8.tgz#418057261346451d689dff5036168567036b8cf6"
+ integrity sha512-LcLfP8ZRBZMdMAXHLugyvvd5PY0gMmLMWFogWAUsG32X6TYW2Eavx+il2bw73KDbW+UdCC1bAJ3NuU25T1MI3g==
+ dependencies:
+ "@babel/helper-plugin-utils" "7.8.3"
+
+bail@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.4.tgz#7181b66d508aa3055d3f6c13f0a0c720641dde9b"
+ integrity sha512-S8vuDB4w6YpRhICUDET3guPlQpaJl7od94tpZ0Fvnyp+MKW/HyDTcRDck+29C9g+d/qQHnddRH3+94kZdrW0Ww==
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+
+base64-js@^1.0.2:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1"
+ integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==
+
+base@^0.11.1:
+ version "0.11.2"
+ resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
+ integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==
+ dependencies:
+ cache-base "^1.0.1"
+ class-utils "^0.3.5"
+ component-emitter "^1.2.1"
+ define-property "^1.0.0"
+ isobject "^3.0.1"
+ mixin-deep "^1.2.0"
+ pascalcase "^0.1.1"
+
+batch@0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16"
+ integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=
+
+bcrypt-pbkdf@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
+ integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
+ dependencies:
+ tweetnacl "^0.14.3"
+
+bfj@^6.1.1:
+ version "6.1.2"
+ resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.2.tgz#325c861a822bcb358a41c78a33b8e6e2086dde7f"
+ integrity sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw==
+ dependencies:
+ bluebird "^3.5.5"
+ check-types "^8.0.3"
+ hoopy "^0.1.4"
+ tryer "^1.0.1"
+
+big.js@^5.2.2:
+ version "5.2.2"
+ resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
+ integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==
+
+binary-extensions@^1.0.0:
+ version "1.13.1"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
+ integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==
+
+binary-extensions@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c"
+ integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==
+
+bluebird@^3.5.5:
+ version "3.5.5"
+ resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f"
+ integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==
+
+bluebird@^3.7.1:
+ version "3.7.2"
+ resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
+ integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
+
+bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
+ version "4.11.8"
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
+ integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==
+
+body-parser@1.19.0:
+ version "1.19.0"
+ resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
+ integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==
+ dependencies:
+ bytes "3.1.0"
+ content-type "~1.0.4"
+ debug "2.6.9"
+ depd "~1.1.2"
+ http-errors "1.7.2"
+ iconv-lite "0.4.24"
+ on-finished "~2.3.0"
+ qs "6.7.0"
+ raw-body "2.4.0"
+ type-is "~1.6.17"
+
+bonjour@^3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5"
+ integrity sha1-jokKGD2O6aI5OzhExpGkK897yfU=
+ dependencies:
+ array-flatten "^2.1.0"
+ deep-equal "^1.0.1"
+ dns-equal "^1.0.0"
+ dns-txt "^2.0.2"
+ multicast-dns "^6.0.1"
+ multicast-dns-service-types "^1.1.0"
+
+boolbase@^1.0.0, boolbase@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
+ integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^2.3.1, braces@^2.3.2:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
+ integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==
+ dependencies:
+ arr-flatten "^1.1.0"
+ array-unique "^0.3.2"
+ extend-shallow "^2.0.1"
+ fill-range "^4.0.0"
+ isobject "^3.0.1"
+ repeat-element "^1.1.2"
+ snapdragon "^0.8.1"
+ snapdragon-node "^2.0.1"
+ split-string "^3.0.2"
+ to-regex "^3.0.1"
+
+braces@^3.0.1, braces@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
+ integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
+ dependencies:
+ fill-range "^7.0.1"
+
+brorand@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
+ integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
+
+browserify-aes@^1.0.0, browserify-aes@^1.0.4:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48"
+ integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==
+ dependencies:
+ buffer-xor "^1.0.3"
+ cipher-base "^1.0.0"
+ create-hash "^1.1.0"
+ evp_bytestokey "^1.0.3"
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+browserify-cipher@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0"
+ integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==
+ dependencies:
+ browserify-aes "^1.0.4"
+ browserify-des "^1.0.0"
+ evp_bytestokey "^1.0.0"
+
+browserify-des@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c"
+ integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==
+ dependencies:
+ cipher-base "^1.0.1"
+ des.js "^1.0.0"
+ inherits "^2.0.1"
+ safe-buffer "^5.1.2"
+
+browserify-rsa@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524"
+ integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=
+ dependencies:
+ bn.js "^4.1.0"
+ randombytes "^2.0.1"
+
+browserify-sign@^4.0.0:
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298"
+ integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=
+ dependencies:
+ bn.js "^4.1.1"
+ browserify-rsa "^4.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.2"
+ elliptic "^6.0.0"
+ inherits "^2.0.1"
+ parse-asn1 "^5.0.0"
+
+browserify-zlib@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f"
+ integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==
+ dependencies:
+ pako "~1.0.5"
+
+browserslist@4.10.0:
+ version "4.10.0"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.10.0.tgz#f179737913eaf0d2b98e4926ac1ca6a15cbcc6a9"
+ integrity sha512-TpfK0TDgv71dzuTsEAlQiHeWQ/tiPqgNZVdv046fvNtBZrjbv2O3TsWCDU0AWGJJKCF/KsjNdLzR9hXOsh/CfA==
+ dependencies:
+ caniuse-lite "^1.0.30001035"
+ electron-to-chromium "^1.3.378"
+ node-releases "^1.1.52"
+ pkg-up "^3.1.0"
+
+browserslist@^4.0.0, browserslist@^4.6.3, browserslist@^4.6.4:
+ version "4.7.0"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17"
+ integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA==
+ dependencies:
+ caniuse-lite "^1.0.30000989"
+ electron-to-chromium "^1.3.247"
+ node-releases "^1.1.29"
+
+browserslist@^4.8.5, browserslist@^4.9.1:
+ version "4.11.1"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b"
+ integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g==
+ dependencies:
+ caniuse-lite "^1.0.30001038"
+ electron-to-chromium "^1.3.390"
+ node-releases "^1.1.53"
+ pkg-up "^2.0.0"
+
+buffer-from@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
+ integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
+
+buffer-indexof@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c"
+ integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==
+
+buffer-json@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/buffer-json/-/buffer-json-2.0.0.tgz#f73e13b1e42f196fe2fd67d001c7d7107edd7c23"
+ integrity sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw==
+
+buffer-xor@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
+ integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=
+
+buffer@^4.3.0:
+ version "4.9.1"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298"
+ integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=
+ dependencies:
+ base64-js "^1.0.2"
+ ieee754 "^1.1.4"
+ isarray "^1.0.0"
+
+builtin-status-codes@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
+ integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=
+
+bytes@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
+ integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=
+
+bytes@3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
+ integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
+
+cacache@^12.0.2:
+ version "12.0.3"
+ resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390"
+ integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==
+ dependencies:
+ bluebird "^3.5.5"
+ chownr "^1.1.1"
+ figgy-pudding "^3.5.1"
+ glob "^7.1.4"
+ graceful-fs "^4.1.15"
+ infer-owner "^1.0.3"
+ lru-cache "^5.1.1"
+ mississippi "^3.0.0"
+ mkdirp "^0.5.1"
+ move-concurrently "^1.0.1"
+ promise-inflight "^1.0.1"
+ rimraf "^2.6.3"
+ ssri "^6.0.1"
+ unique-filename "^1.1.1"
+ y18n "^4.0.0"
+
+cacache@^12.0.3:
+ version "12.0.4"
+ resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c"
+ integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==
+ dependencies:
+ bluebird "^3.5.5"
+ chownr "^1.1.1"
+ figgy-pudding "^3.5.1"
+ glob "^7.1.4"
+ graceful-fs "^4.1.15"
+ infer-owner "^1.0.3"
+ lru-cache "^5.1.1"
+ mississippi "^3.0.0"
+ mkdirp "^0.5.1"
+ move-concurrently "^1.0.1"
+ promise-inflight "^1.0.1"
+ rimraf "^2.6.3"
+ ssri "^6.0.1"
+ unique-filename "^1.1.1"
+ y18n "^4.0.0"
+
+cacache@^13.0.1:
+ version "13.0.1"
+ resolved "https://registry.yarnpkg.com/cacache/-/cacache-13.0.1.tgz#a8000c21697089082f85287a1aec6e382024a71c"
+ integrity sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==
+ dependencies:
+ chownr "^1.1.2"
+ figgy-pudding "^3.5.1"
+ fs-minipass "^2.0.0"
+ glob "^7.1.4"
+ graceful-fs "^4.2.2"
+ infer-owner "^1.0.4"
+ lru-cache "^5.1.1"
+ minipass "^3.0.0"
+ minipass-collect "^1.0.2"
+ minipass-flush "^1.0.5"
+ minipass-pipeline "^1.2.2"
+ mkdirp "^0.5.1"
+ move-concurrently "^1.0.1"
+ p-map "^3.0.0"
+ promise-inflight "^1.0.1"
+ rimraf "^2.7.1"
+ ssri "^7.0.0"
+ unique-filename "^1.1.1"
+
+cache-base@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
+ integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==
+ dependencies:
+ collection-visit "^1.0.0"
+ component-emitter "^1.2.1"
+ get-value "^2.0.6"
+ has-value "^1.0.0"
+ isobject "^3.0.1"
+ set-value "^2.0.0"
+ to-object-path "^0.3.0"
+ union-value "^1.0.0"
+ unset-value "^1.0.0"
+
+cache-loader@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/cache-loader/-/cache-loader-4.1.0.tgz#9948cae353aec0a1fcb1eafda2300816ec85387e"
+ integrity sha512-ftOayxve0PwKzBF/GLsZNC9fJBXl8lkZE3TOsjkboHfVHVkL39iUEs1FO07A33mizmci5Dudt38UZrrYXDtbhw==
+ dependencies:
+ buffer-json "^2.0.0"
+ find-cache-dir "^3.0.0"
+ loader-utils "^1.2.3"
+ mkdirp "^0.5.1"
+ neo-async "^2.6.1"
+ schema-utils "^2.0.0"
+
+call-me-maybe@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
+ integrity sha1-JtII6onje1y95gJQoV8DHBak1ms=
+
+caller-callsite@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134"
+ integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=
+ dependencies:
+ callsites "^2.0.0"
+
+caller-path@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4"
+ integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=
+ dependencies:
+ caller-callsite "^2.0.0"
+
+callsites@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50"
+ integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=
+
+callsites@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
+ integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
+
+camel-case@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.1.tgz#1fc41c854f00e2f7d0139dfeba1542d6896fe547"
+ integrity sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q==
+ dependencies:
+ pascal-case "^3.1.1"
+ tslib "^1.10.0"
+
+camelcase-css@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5"
+ integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
+
+camelcase@^5.0.0, camelcase@^5.3.1:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
+ integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
+
+caniuse-api@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0"
+ integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==
+ dependencies:
+ browserslist "^4.0.0"
+ caniuse-lite "^1.0.0"
+ lodash.memoize "^4.1.2"
+ lodash.uniq "^4.5.0"
+
+caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30000989:
+ version "1.0.30000997"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000997.tgz#ba44a606804f8680894b7042612c2c7f65685b7e"
+ integrity sha512-BQLFPIdj2ntgBNWp9Q64LGUIEmvhKkzzHhUHR3CD5A9Lb7ZKF20/+sgadhFap69lk5XmK1fTUleDclaRFvgVUA==
+
+caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001038:
+ version "1.0.30001042"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001042.tgz#c91ec21ec2d270bd76dbc2ce261260c292b8c93c"
+ integrity sha512-igMQ4dlqnf4tWv0xjaaE02op9AJ2oQzXKjWf4EuAHFN694Uo9/EfPVIPJcmn2WkU9RqozCxx5e2KPcVClHDbDw==
+
+caseless@~0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
+ integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
+
+ccount@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.4.tgz#9cf2de494ca84060a2a8d2854edd6dfb0445f386"
+ integrity sha512-fpZ81yYfzentuieinmGnphk0pLkOTMm6MZdVqwd77ROvhko6iujLNGrHH5E7utq3ygWklwfmwuG+A7P+NpqT6w==
+
+chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
+ integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
+ dependencies:
+ ansi-styles "^3.2.1"
+ escape-string-regexp "^1.0.5"
+ supports-color "^5.3.0"
+
+chalk@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+ integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=
+ dependencies:
+ ansi-styles "^2.2.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^2.0.0"
+ strip-ansi "^3.0.0"
+ supports-color "^2.0.0"
+
+chalk@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
+ integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
+ dependencies:
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
+
+character-entities-legacy@^1.0.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.3.tgz#3c729991d9293da0ede6dddcaf1f2ce1009ee8b4"
+ integrity sha512-YAxUpPoPwxYFsslbdKkhrGnXAtXoHNgYjlBM3WMXkWGTl5RsY3QmOyhwAgL8Nxm9l5LBThXGawxKPn68y6/fww==
+
+character-entities@^1.0.0:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.3.tgz#bbed4a52fe7ef98cc713c6d80d9faa26916d54e6"
+ integrity sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w==
+
+character-reference-invalid@^1.0.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.3.tgz#1647f4f726638d3ea4a750cf5d1975c1c7919a85"
+ integrity sha512-VOq6PRzQBam/8Jm6XBGk2fNEnHXAdGd6go0rtd4weAGECBamHDwwCQSOT12TACIYUZegUXnV6xBXqUssijtxIg==
+
+chardet@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
+ integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
+
+check-types@^8.0.3:
+ version "8.0.3"
+ resolved "https://registry.yarnpkg.com/check-types/-/check-types-8.0.3.tgz#3356cca19c889544f2d7a95ed49ce508a0ecf552"
+ integrity sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==
+
+cheerio@^0.22.0:
+ version "0.22.0"
+ resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e"
+ integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=
+ dependencies:
+ css-select "~1.2.0"
+ dom-serializer "~0.1.0"
+ entities "~1.1.1"
+ htmlparser2 "^3.9.1"
+ lodash.assignin "^4.0.9"
+ lodash.bind "^4.1.4"
+ lodash.defaults "^4.0.1"
+ lodash.filter "^4.4.0"
+ lodash.flatten "^4.2.0"
+ lodash.foreach "^4.3.0"
+ lodash.map "^4.4.0"
+ lodash.merge "^4.4.0"
+ lodash.pick "^4.2.1"
+ lodash.reduce "^4.4.0"
+ lodash.reject "^4.4.0"
+ lodash.some "^4.4.0"
+
+chokidar@^2.0.2, chokidar@^2.1.8:
+ version "2.1.8"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917"
+ integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==
+ dependencies:
+ anymatch "^2.0.0"
+ async-each "^1.0.1"
+ braces "^2.3.2"
+ glob-parent "^3.1.0"
+ inherits "^2.0.3"
+ is-binary-path "^1.0.0"
+ is-glob "^4.0.0"
+ normalize-path "^3.0.0"
+ path-is-absolute "^1.0.0"
+ readdirp "^2.2.1"
+ upath "^1.1.1"
+ optionalDependencies:
+ fsevents "^1.2.7"
+
+chokidar@^3.3.0:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450"
+ integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==
+ dependencies:
+ anymatch "~3.1.1"
+ braces "~3.0.2"
+ glob-parent "~5.1.0"
+ is-binary-path "~2.1.0"
+ is-glob "~4.0.1"
+ normalize-path "~3.0.0"
+ readdirp "~3.3.0"
+ optionalDependencies:
+ fsevents "~2.1.2"
+
+chownr@^1.1.1:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142"
+ integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==
+
+chownr@^1.1.2:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
+ integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
+
+chrome-trace-event@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4"
+ integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==
+ dependencies:
+ tslib "^1.9.0"
+
+ci-info@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
+ integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==
+
+cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"
+ integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==
+ dependencies:
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+class-utils@^0.3.5:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
+ integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==
+ dependencies:
+ arr-union "^3.1.0"
+ define-property "^0.2.5"
+ isobject "^3.0.0"
+ static-extend "^0.1.1"
+
+classnames@^2.2.5, classnames@^2.2.6:
+ version "2.2.6"
+ resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce"
+ integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==
+
+clean-css@^4.2.3:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78"
+ integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==
+ dependencies:
+ source-map "~0.6.0"
+
+clean-stack@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
+ integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
+
+cli-cursor@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
+ integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
+ dependencies:
+ restore-cursor "^3.1.0"
+
+cli-width@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
+ integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=
+
+clipboard@^2.0.0, clipboard@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376"
+ integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==
+ dependencies:
+ good-listener "^1.2.2"
+ select "^1.1.2"
+ tiny-emitter "^2.0.0"
+
+cliui@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49"
+ integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==
+ dependencies:
+ string-width "^2.1.1"
+ strip-ansi "^4.0.0"
+ wrap-ansi "^2.0.0"
+
+coa@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3"
+ integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==
+ dependencies:
+ "@types/q" "^1.5.1"
+ chalk "^2.4.1"
+ q "^1.1.2"
+
+code-point-at@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+ integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
+
+collapse-white-space@^1.0.0, collapse-white-space@^1.0.2:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.5.tgz#c2495b699ab1ed380d29a1091e01063e75dbbe3a"
+ integrity sha512-703bOOmytCYAX9cXYqoikYIx6twmFCXsnzRQheBcTG3nzKYBR4P/+wkYeH+Mvj7qUz8zZDtdyzbxfnEi/kYzRQ==
+
+collection-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
+ integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=
+ dependencies:
+ map-visit "^1.0.0"
+ object-visit "^1.0.0"
+
+color-convert@^1.9.0, color-convert@^1.9.1:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
+ integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
+ dependencies:
+ color-name "1.1.3"
+
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
+color-name@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+ integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+
+color-name@^1.0.0, color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
+color-string@^1.5.2:
+ version "1.5.3"
+ resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc"
+ integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==
+ dependencies:
+ color-name "^1.0.0"
+ simple-swizzle "^0.2.2"
+
+color@^3.0.0:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10"
+ integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==
+ dependencies:
+ color-convert "^1.9.1"
+ color-string "^1.5.2"
+
+combined-stream@^1.0.6, combined-stream@~1.0.6:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
+ integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
+ dependencies:
+ delayed-stream "~1.0.0"
+
+comma-separated-tokens@^1.0.0:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.7.tgz#419cd7fb3258b1ed838dc0953167a25e152f5b59"
+ integrity sha512-Jrx3xsP4pPv4AwJUDWY9wOXGtwPXARej6Xd99h4TUGotmf8APuquKMpK+dnD3UgyxK7OEWaisjZz+3b5jtL6xQ==
+
+commander@^2.18.0, commander@^2.20.0:
+ version "2.20.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
+ integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
+
+commander@^4.0.1, commander@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
+ integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
+
+commondir@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
+ integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=
+
+component-emitter@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
+ integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
+
+compressible@~2.0.16:
+ version "2.0.17"
+ resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.17.tgz#6e8c108a16ad58384a977f3a482ca20bff2f38c1"
+ integrity sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==
+ dependencies:
+ mime-db ">= 1.40.0 < 2"
+
+compression@^1.7.4:
+ version "1.7.4"
+ resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f"
+ integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==
+ dependencies:
+ accepts "~1.3.5"
+ bytes "3.0.0"
+ compressible "~2.0.16"
+ debug "2.6.9"
+ on-headers "~1.0.2"
+ safe-buffer "5.1.2"
+ vary "~1.1.2"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+
+concat-stream@^1.5.0:
+ version "1.6.2"
+ resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
+ integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==
+ dependencies:
+ buffer-from "^1.0.0"
+ inherits "^2.0.3"
+ readable-stream "^2.2.2"
+ typedarray "^0.0.6"
+
+connect-history-api-fallback@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"
+ integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==
+
+consola@^2.10.0:
+ version "2.11.3"
+ resolved "https://registry.yarnpkg.com/consola/-/consola-2.11.3.tgz#f7315836224c143ac5094b47fd4c816c2cd1560e"
+ integrity sha512-aoW0YIIAmeftGR8GSpw6CGQluNdkWMWh3yEFjH/hmynTYnMtibXszii3lxCXmk8YxJtI3FAK5aTiquA5VH68Gw==
+
+console-browserify@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
+ integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=
+ dependencies:
+ date-now "^0.1.4"
+
+console-control-strings@^1.0.0, console-control-strings@~1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
+ integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
+
+constants-browserify@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
+ integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=
+
+content-disposition@0.5.3:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd"
+ integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
+ dependencies:
+ safe-buffer "5.1.2"
+
+content-type@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
+ integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
+
+convert-source-map@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442"
+ integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==
+ dependencies:
+ safe-buffer "~5.1.1"
+
+cookie-signature@1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
+ integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
+
+cookie@0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
+ integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
+
+copy-concurrently@^1.0.0:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0"
+ integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==
+ dependencies:
+ aproba "^1.1.1"
+ fs-write-stream-atomic "^1.0.8"
+ iferr "^0.1.5"
+ mkdirp "^0.5.1"
+ rimraf "^2.5.4"
+ run-queue "^1.0.0"
+
+copy-descriptor@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
+ integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
+
+copy-webpack-plugin@^5.0.5:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz#5481a03dea1123d88a988c6ff8b78247214f0b88"
+ integrity sha512-P15M5ZC8dyCjQHWwd4Ia/dm0SgVvZJMYeykVIVYXbGyqO4dWB5oyPHp9i7wjwo5LhtlhKbiBCdS2NvM07Wlybg==
+ dependencies:
+ cacache "^12.0.3"
+ find-cache-dir "^2.1.0"
+ glob-parent "^3.1.0"
+ globby "^7.1.1"
+ is-glob "^4.0.1"
+ loader-utils "^1.2.3"
+ minimatch "^3.0.4"
+ normalize-path "^3.0.0"
+ p-limit "^2.2.1"
+ schema-utils "^1.0.0"
+ serialize-javascript "^2.1.2"
+ webpack-log "^2.0.0"
+
+core-js-compat@^3.6.2:
+ version "3.6.5"
+ resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c"
+ integrity sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==
+ dependencies:
+ browserslist "^4.8.5"
+ semver "7.0.0"
+
+core-js@^2.6.5:
+ version "2.6.11"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
+ integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==
+
+core-util-is@1.0.2, core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+ integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+
+cosmiconfig@^5.0.0:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a"
+ integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==
+ dependencies:
+ import-fresh "^2.0.0"
+ is-directory "^0.3.1"
+ js-yaml "^3.13.1"
+ parse-json "^4.0.0"
+
+create-ecdh@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff"
+ integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==
+ dependencies:
+ bn.js "^4.1.0"
+ elliptic "^6.0.0"
+
+create-hash@^1.1.0, create-hash@^1.1.2:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196"
+ integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==
+ dependencies:
+ cipher-base "^1.0.1"
+ inherits "^2.0.1"
+ md5.js "^1.3.4"
+ ripemd160 "^2.0.1"
+ sha.js "^2.4.0"
+
+create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff"
+ integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==
+ dependencies:
+ cipher-base "^1.0.3"
+ create-hash "^1.1.0"
+ inherits "^2.0.1"
+ ripemd160 "^2.0.0"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
+cross-spawn@7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14"
+ integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==
+ dependencies:
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
+
+cross-spawn@^6.0.0:
+ version "6.0.5"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
+ integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
+ dependencies:
+ nice-try "^1.0.4"
+ path-key "^2.0.1"
+ semver "^5.5.0"
+ shebang-command "^1.2.0"
+ which "^1.2.9"
+
+cross-spawn@^7.0.0:
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.2.tgz#d0d7dcfa74e89115c7619f4f721a94e1fdb716d6"
+ integrity sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==
+ dependencies:
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
+
+crypto-browserify@^3.11.0:
+ version "3.12.0"
+ resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
+ integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==
+ dependencies:
+ browserify-cipher "^1.0.0"
+ browserify-sign "^4.0.0"
+ create-ecdh "^4.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.0"
+ diffie-hellman "^5.0.0"
+ inherits "^2.0.1"
+ pbkdf2 "^3.0.3"
+ public-encrypt "^4.0.0"
+ randombytes "^2.0.0"
+ randomfill "^1.0.3"
+
+css-blank-pseudo@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz#dfdefd3254bf8a82027993674ccf35483bfcb3c5"
+ integrity sha512-LHz35Hr83dnFeipc7oqFDmsjHdljj3TQtxGGiNWSOsTLIAubSm4TEz8qCaKFpk7idaQ1GfWscF4E6mgpBysA1w==
+ dependencies:
+ postcss "^7.0.5"
+
+css-color-names@0.0.4, css-color-names@^0.0.4:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
+ integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=
+
+css-declaration-sorter@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22"
+ integrity sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==
+ dependencies:
+ postcss "^7.0.1"
+ timsort "^0.3.0"
+
+css-has-pseudo@^0.10.0:
+ version "0.10.0"
+ resolved "https://registry.yarnpkg.com/css-has-pseudo/-/css-has-pseudo-0.10.0.tgz#3c642ab34ca242c59c41a125df9105841f6966ee"
+ integrity sha512-Z8hnfsZu4o/kt+AuFzeGpLVhFOGO9mluyHBaA2bA8aCGTwah5sT3WV/fTHH8UNZUytOIImuGPrl/prlb4oX4qQ==
+ dependencies:
+ postcss "^7.0.6"
+ postcss-selector-parser "^5.0.0-rc.4"
+
+css-loader@^3.4.2:
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.5.2.tgz#6483ae56f48a7f901fbe07dde2fc96b01eafab3c"
+ integrity sha512-hDL0DPopg6zQQSRlZm0hyeaqIRnL0wbWjay9BZxoiJBpbfOW4WHfbaYQhwnDmEa0kZUc1CJ3IFo15ot1yULMIQ==
+ dependencies:
+ camelcase "^5.3.1"
+ cssesc "^3.0.0"
+ icss-utils "^4.1.1"
+ loader-utils "^1.2.3"
+ normalize-path "^3.0.0"
+ postcss "^7.0.27"
+ postcss-modules-extract-imports "^2.0.0"
+ postcss-modules-local-by-default "^3.0.2"
+ postcss-modules-scope "^2.2.0"
+ postcss-modules-values "^3.0.0"
+ postcss-value-parser "^4.0.3"
+ schema-utils "^2.6.5"
+ semver "^6.3.0"
+
+css-prefers-color-scheme@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/css-prefers-color-scheme/-/css-prefers-color-scheme-3.1.1.tgz#6f830a2714199d4f0d0d0bb8a27916ed65cff1f4"
+ integrity sha512-MTu6+tMs9S3EUqzmqLXEcgNRbNkkD/TGFvowpeoWJn5Vfq7FMgsmRQs9X5NXAURiOBmOxm/lLjsDNXDE6k9bhg==
+ dependencies:
+ postcss "^7.0.5"
+
+css-select-base-adapter@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7"
+ integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==
+
+css-select@^1.1.0, css-select@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858"
+ integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=
+ dependencies:
+ boolbase "~1.0.0"
+ css-what "2.1"
+ domutils "1.5.1"
+ nth-check "~1.0.1"
+
+css-select@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.0.2.tgz#ab4386cec9e1f668855564b17c3733b43b2a5ede"
+ integrity sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==
+ dependencies:
+ boolbase "^1.0.0"
+ css-what "^2.1.2"
+ domutils "^1.7.0"
+ nth-check "^1.0.2"
+
+css-tree@1.0.0-alpha.29:
+ version "1.0.0-alpha.29"
+ resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.29.tgz#3fa9d4ef3142cbd1c301e7664c1f352bd82f5a39"
+ integrity sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==
+ dependencies:
+ mdn-data "~1.1.0"
+ source-map "^0.5.3"
+
+css-tree@1.0.0-alpha.33:
+ version "1.0.0-alpha.33"
+ resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.33.tgz#970e20e5a91f7a378ddd0fc58d0b6c8d4f3be93e"
+ integrity sha512-SPt57bh5nQnpsTBsx/IXbO14sRc9xXu5MtMAVuo0BaQQmyf0NupNPPSoMaqiAF5tDFafYsTkfeH4Q/HCKXkg4w==
+ dependencies:
+ mdn-data "2.0.4"
+ source-map "^0.5.3"
+
+css-unit-converter@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.1.tgz#d9b9281adcfd8ced935bdbaba83786897f64e996"
+ integrity sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=
+
+css-what@2.1, css-what@^2.1.2:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2"
+ integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==
+
+cssdb@^4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-4.4.0.tgz#3bf2f2a68c10f5c6a08abd92378331ee803cddb0"
+ integrity sha512-LsTAR1JPEM9TpGhl/0p3nQecC2LJ0kD8X5YARu1hk/9I1gril5vDtMZyNxcEpxxDj34YNck/ucjuoUd66K03oQ==
+
+cssesc@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703"
+ integrity sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==
+
+cssesc@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
+ integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
+
+cssnano-preset-default@^4.0.7:
+ version "4.0.7"
+ resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz#51ec662ccfca0f88b396dcd9679cdb931be17f76"
+ integrity sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==
+ dependencies:
+ css-declaration-sorter "^4.0.1"
+ cssnano-util-raw-cache "^4.0.1"
+ postcss "^7.0.0"
+ postcss-calc "^7.0.1"
+ postcss-colormin "^4.0.3"
+ postcss-convert-values "^4.0.1"
+ postcss-discard-comments "^4.0.2"
+ postcss-discard-duplicates "^4.0.2"
+ postcss-discard-empty "^4.0.1"
+ postcss-discard-overridden "^4.0.1"
+ postcss-merge-longhand "^4.0.11"
+ postcss-merge-rules "^4.0.3"
+ postcss-minify-font-values "^4.0.2"
+ postcss-minify-gradients "^4.0.2"
+ postcss-minify-params "^4.0.2"
+ postcss-minify-selectors "^4.0.2"
+ postcss-normalize-charset "^4.0.1"
+ postcss-normalize-display-values "^4.0.2"
+ postcss-normalize-positions "^4.0.2"
+ postcss-normalize-repeat-style "^4.0.2"
+ postcss-normalize-string "^4.0.2"
+ postcss-normalize-timing-functions "^4.0.2"
+ postcss-normalize-unicode "^4.0.1"
+ postcss-normalize-url "^4.0.1"
+ postcss-normalize-whitespace "^4.0.2"
+ postcss-ordered-values "^4.1.2"
+ postcss-reduce-initial "^4.0.3"
+ postcss-reduce-transforms "^4.0.2"
+ postcss-svgo "^4.0.2"
+ postcss-unique-selectors "^4.0.1"
+
+cssnano-util-get-arguments@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f"
+ integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=
+
+cssnano-util-get-match@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d"
+ integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=
+
+cssnano-util-raw-cache@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282"
+ integrity sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==
+ dependencies:
+ postcss "^7.0.0"
+
+cssnano-util-same-parent@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3"
+ integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==
+
+cssnano@^4.1.10:
+ version "4.1.10"
+ resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2"
+ integrity sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==
+ dependencies:
+ cosmiconfig "^5.0.0"
+ cssnano-preset-default "^4.0.7"
+ is-resolvable "^1.0.0"
+ postcss "^7.0.0"
+
+csso@^3.5.1:
+ version "3.5.1"
+ resolved "https://registry.yarnpkg.com/csso/-/csso-3.5.1.tgz#7b9eb8be61628973c1b261e169d2f024008e758b"
+ integrity sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==
+ dependencies:
+ css-tree "1.0.0-alpha.29"
+
+cyclist@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
+ integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=
+
+dashdash@^1.12.0:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
+ integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
+ dependencies:
+ assert-plus "^1.0.0"
+
+date-now@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
+ integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=
+
+debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+debug@^3.0.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6:
+ version "3.2.6"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
+ integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
+ dependencies:
+ ms "^2.1.1"
+
+debug@^4.1.0, debug@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
+ integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
+ dependencies:
+ ms "^2.1.1"
+
+decamelize@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+ integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
+
+decode-uri-component@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
+ integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
+
+deep-equal@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.0.tgz#3103cdf8ab6d32cf4a8df7865458f2b8d33f3745"
+ integrity sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==
+ dependencies:
+ is-arguments "^1.0.4"
+ is-date-object "^1.0.1"
+ is-regex "^1.0.4"
+ object-is "^1.0.1"
+ object-keys "^1.1.1"
+ regexp.prototype.flags "^1.2.0"
+
+deep-extend@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
+ integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
+
+default-gateway@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b"
+ integrity sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==
+ dependencies:
+ execa "^1.0.0"
+ ip-regex "^2.1.0"
+
+define-properties@^1.1.2, define-properties@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
+ integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
+ dependencies:
+ object-keys "^1.0.12"
+
+define-property@^0.2.5:
+ version "0.2.5"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
+ integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=
+ dependencies:
+ is-descriptor "^0.1.0"
+
+define-property@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
+ integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY=
+ dependencies:
+ is-descriptor "^1.0.0"
+
+define-property@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
+ integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==
+ dependencies:
+ is-descriptor "^1.0.2"
+ isobject "^3.0.1"
+
+del@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4"
+ integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==
+ dependencies:
+ "@types/glob" "^7.1.1"
+ globby "^6.1.0"
+ is-path-cwd "^2.0.0"
+ is-path-in-cwd "^2.0.0"
+ p-map "^2.0.0"
+ pify "^4.0.1"
+ rimraf "^2.6.3"
+
+del@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7"
+ integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==
+ dependencies:
+ globby "^10.0.1"
+ graceful-fs "^4.2.2"
+ is-glob "^4.0.1"
+ is-path-cwd "^2.2.0"
+ is-path-inside "^3.0.1"
+ p-map "^3.0.0"
+ rimraf "^3.0.0"
+ slash "^3.0.0"
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+ integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
+
+delegate@^3.1.2:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166"
+ integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==
+
+delegates@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
+ integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
+
+depd@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
+ integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
+
+des.js@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc"
+ integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=
+ dependencies:
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+
+destroy@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
+ integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
+
+detab@2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/detab/-/detab-2.0.3.tgz#33e5dd74d230501bd69985a0d2b9a3382699a130"
+ integrity sha512-Up8P0clUVwq0FnFjDclzZsy9PadzRn5FFxrr47tQQvMHqyiFYVbpH8oXDzWtF0Q7pYy3l+RPmtBl+BsFF6wH0A==
+ dependencies:
+ repeat-string "^1.5.4"
+
+detab@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/detab/-/detab-2.0.2.tgz#074970d1a807b045d0258a4235df5928dd683561"
+ integrity sha512-Q57yPrxScy816TTE1P/uLRXLDKjXhvYTbfxS/e6lPD+YrqghbsMlGB9nQzj/zVtSPaF0DFPSdO916EWO4sQUyQ==
+ dependencies:
+ repeat-string "^1.5.4"
+
+detect-libc@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
+ integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
+
+detect-node@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
+ integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==
+
+detect-port-alt@1.1.6:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275"
+ integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==
+ dependencies:
+ address "^1.0.1"
+ debug "^2.6.0"
+
+diffie-hellman@^5.0.0:
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
+ integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==
+ dependencies:
+ bn.js "^4.1.0"
+ miller-rabin "^4.0.0"
+ randombytes "^2.0.0"
+
+dir-glob@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034"
+ integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==
+ dependencies:
+ arrify "^1.0.1"
+ path-type "^3.0.0"
+
+dir-glob@^2.0.0:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4"
+ integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==
+ dependencies:
+ path-type "^3.0.0"
+
+dir-glob@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
+ integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
+ dependencies:
+ path-type "^4.0.0"
+
+dns-equal@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
+ integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0=
+
+dns-packet@^1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a"
+ integrity sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==
+ dependencies:
+ ip "^1.1.0"
+ safe-buffer "^5.0.1"
+
+dns-txt@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6"
+ integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=
+ dependencies:
+ buffer-indexof "^1.0.0"
+
+docsearch.js@^2.6.3:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/docsearch.js/-/docsearch.js-2.6.3.tgz#57cb4600d3b6553c677e7cbbe6a734593e38625d"
+ integrity sha512-GN+MBozuyz664ycpZY0ecdQE0ND/LSgJKhTLA0/v3arIS3S1Rpf2OJz6A35ReMsm91V5apcmzr5/kM84cvUg+A==
+ dependencies:
+ algoliasearch "^3.24.5"
+ autocomplete.js "0.36.0"
+ hogan.js "^3.0.2"
+ request "^2.87.0"
+ stack-utils "^1.0.1"
+ to-factory "^1.0.0"
+ zepto "^1.2.0"
+
+dom-converter@^0.2:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768"
+ integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==
+ dependencies:
+ utila "~0.4"
+
+dom-serializer@0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.1.tgz#13650c850daffea35d8b626a4cfc4d3a17643fdb"
+ integrity sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==
+ dependencies:
+ domelementtype "^2.0.1"
+ entities "^2.0.0"
+
+dom-serializer@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0"
+ integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==
+ dependencies:
+ domelementtype "^1.3.0"
+ entities "^1.1.1"
+
+dom-walk@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
+ integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=
+
+domain-browser@^1.1.1:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
+ integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==
+
+domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f"
+ integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
+
+domelementtype@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d"
+ integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==
+
+domhandler@^2.3.0:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803"
+ integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==
+ dependencies:
+ domelementtype "1"
+
+domutils@1.5.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
+ integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=
+ dependencies:
+ dom-serializer "0"
+ domelementtype "1"
+
+domutils@^1.5.1, domutils@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a"
+ integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==
+ dependencies:
+ dom-serializer "0"
+ domelementtype "1"
+
+dot-case@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.3.tgz#21d3b52efaaba2ea5fda875bb1aa8124521cf4aa"
+ integrity sha512-7hwEmg6RiSQfm/GwPL4AAWXKy3YNNZA3oFv2Pdiey0mwkRCPZ9x6SZbkLcn8Ma5PYeVokzoD4Twv2n7LKp5WeA==
+ dependencies:
+ no-case "^3.0.3"
+ tslib "^1.10.0"
+
+dot-prop@^4.1.1:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57"
+ integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==
+ dependencies:
+ is-obj "^1.0.0"
+
+duplexer@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
+ integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=
+
+duplexify@^3.4.2, duplexify@^3.6.0:
+ version "3.7.1"
+ resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309"
+ integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==
+ dependencies:
+ end-of-stream "^1.0.0"
+ inherits "^2.0.1"
+ readable-stream "^2.0.0"
+ stream-shift "^1.0.0"
+
+ecc-jsbn@~0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
+ integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
+ dependencies:
+ jsbn "~0.1.0"
+ safer-buffer "^2.1.0"
+
+ee-first@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
+ integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
+
+ejs@^2.6.1:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.1.tgz#5b5ab57f718b79d4aca9254457afecd36fa80228"
+ integrity sha512-kS/gEPzZs3Y1rRsbGX4UOSjtP/CeJP0CxSNZHYxGfVM/VgLcv0ZqM7C45YyTj2DI2g7+P9Dd24C+IMIg6D0nYQ==
+
+ejs@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.0.2.tgz#745b01cdcfe38c1c6a2da3bbb2d9957060a31226"
+ integrity sha512-IncmUpn1yN84hy2shb0POJ80FWrfGNY0cxO9f4v+/sG7qcBvAtVWUA1IdzY/8EYUmOVhoKJVdJjNd3AZcnxOjA==
+
+electron-to-chromium@^1.3.247:
+ version "1.3.267"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.267.tgz#7745ff9d447fd2a9802e1c6dfa518631e0cf5357"
+ integrity sha512-9Q2ixAJC+oHjWNtJV0MQ4vJMCWSowIrC6V6vcr+bwPddTDHj2ddv9xxXCzf4jT/fy6HP7maPoW0gifXkRxCttQ==
+
+electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.390:
+ version "1.3.412"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.412.tgz#da0475c653b48e5935f300aa9c875377bf8ddcf9"
+ integrity sha512-4bVdSeJScR8fT7ERveLWbxemY5uXEHVseqMRyORosiKcTUSGtVwBkV8uLjXCqoFLeImA57Z9hbz3TOid01U4Hw==
+
+elliptic@^6.0.0:
+ version "6.5.1"
+ resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.1.tgz#c380f5f909bf1b9b4428d028cd18d3b0efd6b52b"
+ integrity sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==
+ dependencies:
+ bn.js "^4.4.0"
+ brorand "^1.0.1"
+ hash.js "^1.0.0"
+ hmac-drbg "^1.0.0"
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+ minimalistic-crypto-utils "^1.0.0"
+
+"emoji-regex@>=6.0.0 <=6.1.1":
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e"
+ integrity sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4=
+
+emoji-regex@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
+ integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
+
+emojis-list@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
+ integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k=
+
+emojis-list@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78"
+ integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==
+
+emoticon@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/emoticon/-/emoticon-3.2.0.tgz#c008ca7d7620fac742fe1bf4af8ff8fed154ae7f"
+ integrity sha512-SNujglcLTTg+lDAcApPNgEdudaqQFiAbJCqzjNxJkvN9vAwCGi0uu8IUVvx+f16h+V44KCY6Y2yboroc9pilHg==
+
+encodeurl@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
+ integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
+
+end-of-stream@^1.0.0, end-of-stream@^1.1.0:
+ version "1.4.4"
+ resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
+ integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
+ dependencies:
+ once "^1.4.0"
+
+enhanced-resolve@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f"
+ integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==
+ dependencies:
+ graceful-fs "^4.1.2"
+ memory-fs "^0.4.0"
+ tapable "^1.0.0"
+
+entities@^1.1.1, entities@~1.1.1:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
+ integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==
+
+entities@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4"
+ integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==
+
+envify@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/envify/-/envify-4.1.0.tgz#f39ad3db9d6801b4e6b478b61028d3f0b6819f7e"
+ integrity sha512-IKRVVoAYr4pIx4yIWNsz9mOsboxlNXiu7TNBnem/K/uTHdkyzXWDzHCK7UTolqBbgaBz0tQHsD3YNls0uIIjiw==
+ dependencies:
+ esprima "^4.0.0"
+ through "~2.3.4"
+
+errno@^0.1.3, errno@~0.1.7:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
+ integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==
+ dependencies:
+ prr "~1.0.1"
+
+error-ex@^1.3.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
+ integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
+ dependencies:
+ is-arrayish "^0.2.1"
+
+es-abstract@^1.12.0, es-abstract@^1.5.1:
+ version "1.14.2"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.14.2.tgz#7ce108fad83068c8783c3cdf62e504e084d8c497"
+ integrity sha512-DgoQmbpFNOofkjJtKwr87Ma5EW4Dc8fWhD0R+ndq7Oc456ivUfGOOP6oAZTTKl5/CcNMP+EN+e3/iUzgE0veZg==
+ dependencies:
+ es-to-primitive "^1.2.0"
+ function-bind "^1.1.1"
+ has "^1.0.3"
+ has-symbols "^1.0.0"
+ is-callable "^1.1.4"
+ is-regex "^1.0.4"
+ object-inspect "^1.6.0"
+ object-keys "^1.1.1"
+ string.prototype.trimleft "^2.0.0"
+ string.prototype.trimright "^2.0.0"
+
+es-to-primitive@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377"
+ integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==
+ dependencies:
+ is-callable "^1.1.4"
+ is-date-object "^1.0.1"
+ is-symbol "^1.0.2"
+
+es6-promise@^4.1.0:
+ version "4.2.8"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a"
+ integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==
+
+escape-html@^1.0.3, escape-html@~1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
+ integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
+
+escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
+ integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
+
+escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+ integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
+
+eslint-scope@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"
+ integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==
+ dependencies:
+ esrecurse "^4.1.0"
+ estraverse "^4.1.1"
+
+esprima@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
+ integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
+
+esrecurse@^4.1.0:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
+ integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==
+ dependencies:
+ estraverse "^4.1.0"
+
+estraverse@^4.1.0, estraverse@^4.1.1:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
+ integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
+
+esutils@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
+ integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
+
+etag@~1.8.1:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
+ integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
+
+eval@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/eval/-/eval-0.1.4.tgz#e05dbe0dab4b9330215cbb7bf4886eb24bd58700"
+ integrity sha512-npGsebJejyjMRnLdFu+T/97dnigqIU0Ov3IGrZ8ygd1v7RL1vGkEKtvyWZobqUH1AQgKlg0Yqqe2BtMA9/QZLw==
+ dependencies:
+ require-like ">= 0.1.1"
+
+eventemitter3@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb"
+ integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==
+
+events@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
+ integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=
+
+events@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88"
+ integrity sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==
+
+eventsource@^1.0.7:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0"
+ integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==
+ dependencies:
+ original "^1.0.0"
+
+evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02"
+ integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==
+ dependencies:
+ md5.js "^1.3.4"
+ safe-buffer "^5.1.1"
+
+execa@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
+ integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==
+ dependencies:
+ cross-spawn "^6.0.0"
+ get-stream "^4.0.0"
+ is-stream "^1.1.0"
+ npm-run-path "^2.0.0"
+ p-finally "^1.0.0"
+ signal-exit "^3.0.0"
+ strip-eof "^1.0.0"
+
+execa@^3.4.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-3.4.0.tgz#c08ed4550ef65d858fac269ffc8572446f37eb89"
+ integrity sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==
+ dependencies:
+ cross-spawn "^7.0.0"
+ get-stream "^5.0.0"
+ human-signals "^1.1.1"
+ is-stream "^2.0.0"
+ merge-stream "^2.0.0"
+ npm-run-path "^4.0.0"
+ onetime "^5.1.0"
+ p-finally "^2.0.0"
+ signal-exit "^3.0.2"
+ strip-final-newline "^2.0.0"
+
+expand-brackets@^2.1.4:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
+ integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI=
+ dependencies:
+ debug "^2.3.3"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ posix-character-classes "^0.1.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+express@^4.16.3, express@^4.17.1:
+ version "4.17.1"
+ resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
+ integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==
+ dependencies:
+ accepts "~1.3.7"
+ array-flatten "1.1.1"
+ body-parser "1.19.0"
+ content-disposition "0.5.3"
+ content-type "~1.0.4"
+ cookie "0.4.0"
+ cookie-signature "1.0.6"
+ debug "2.6.9"
+ depd "~1.1.2"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ finalhandler "~1.1.2"
+ fresh "0.5.2"
+ merge-descriptors "1.0.1"
+ methods "~1.1.2"
+ on-finished "~2.3.0"
+ parseurl "~1.3.3"
+ path-to-regexp "0.1.7"
+ proxy-addr "~2.0.5"
+ qs "6.7.0"
+ range-parser "~1.2.1"
+ safe-buffer "5.1.2"
+ send "0.17.1"
+ serve-static "1.14.1"
+ setprototypeof "1.1.1"
+ statuses "~1.5.0"
+ type-is "~1.6.18"
+ utils-merge "1.0.1"
+ vary "~1.1.2"
+
+extend-shallow@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+ integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=
+ dependencies:
+ is-extendable "^0.1.0"
+
+extend-shallow@^3.0.0, extend-shallow@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
+ integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=
+ dependencies:
+ assign-symbols "^1.0.0"
+ is-extendable "^1.0.1"
+
+extend@^3.0.0, extend@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
+ integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
+
+external-editor@^3.0.3:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
+ integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
+ dependencies:
+ chardet "^0.7.0"
+ iconv-lite "^0.4.24"
+ tmp "^0.0.33"
+
+extglob@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
+ integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==
+ dependencies:
+ array-unique "^0.3.2"
+ define-property "^1.0.0"
+ expand-brackets "^2.1.4"
+ extend-shallow "^2.0.1"
+ fragment-cache "^0.2.1"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+extsprintf@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
+ integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
+
+extsprintf@^1.2.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
+ integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
+
+fast-deep-equal@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
+ integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
+
+fast-deep-equal@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4"
+ integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==
+
+fast-glob@^2.0.2:
+ version "2.2.7"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d"
+ integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==
+ dependencies:
+ "@mrmlnc/readdir-enhanced" "^2.2.1"
+ "@nodelib/fs.stat" "^1.1.2"
+ glob-parent "^3.1.0"
+ is-glob "^4.0.0"
+ merge2 "^1.2.3"
+ micromatch "^3.1.10"
+
+fast-glob@^3.0.3:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.0.4.tgz#d484a41005cb6faeb399b951fd1bd70ddaebb602"
+ integrity sha512-wkIbV6qg37xTJwqSsdnIphL1e+LaGz4AIQqr00mIubMaEhv1/HEmJ0uuCGZRNRUkZZmOB5mJKO0ZUTVq+SxMQg==
+ dependencies:
+ "@nodelib/fs.stat" "^2.0.1"
+ "@nodelib/fs.walk" "^1.2.1"
+ glob-parent "^5.0.0"
+ is-glob "^4.0.1"
+ merge2 "^1.2.3"
+ micromatch "^4.0.2"
+
+fast-json-stable-stringify@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
+ integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I=
+
+fastq@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.0.tgz#4ec8a38f4ac25f21492673adb7eae9cfef47d1c2"
+ integrity sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==
+ dependencies:
+ reusify "^1.0.0"
+
+faye-websocket@^0.10.0:
+ version "0.10.0"
+ resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4"
+ integrity sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=
+ dependencies:
+ websocket-driver ">=0.5.1"
+
+faye-websocket@~0.11.1:
+ version "0.11.3"
+ resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e"
+ integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==
+ dependencies:
+ websocket-driver ">=0.5.1"
+
+feed@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/feed/-/feed-4.1.0.tgz#58f1c9cc2b44715d14ac59234e1bf20c5d757aa7"
+ integrity sha512-dAXWXM8QMxZ1DRnAxDmy1MaWZFlh1Ku7TU3onbXgHrVJynsxkNGPUed1AxszVW8AXo43xExronVkIqK+ACsoBA==
+ dependencies:
+ xml-js "^1.6.11"
+
+figgy-pudding@^3.5.1:
+ version "3.5.1"
+ resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
+ integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==
+
+figures@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
+ integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
+ dependencies:
+ escape-string-regexp "^1.0.5"
+
+filesize@6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.0.1.tgz#f850b509909c7c86f7e450ea19006c31c2ed3d2f"
+ integrity sha512-u4AYWPgbI5GBhs6id1KdImZWn5yfyFrrQ8OWZdN7ZMfA8Bf4HcO0BGo9bmUIEV8yrp8I1xVfJ/dn90GtFNNJcg==
+
+filesize@^3.6.1:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317"
+ integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==
+
+fill-range@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
+ integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+ to-regex-range "^2.1.0"
+
+fill-range@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
+ integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
+ dependencies:
+ to-regex-range "^5.0.1"
+
+finalhandler@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
+ integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==
+ dependencies:
+ debug "2.6.9"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ on-finished "~2.3.0"
+ parseurl "~1.3.3"
+ statuses "~1.5.0"
+ unpipe "~1.0.0"
+
+find-cache-dir@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7"
+ integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==
+ dependencies:
+ commondir "^1.0.1"
+ make-dir "^2.0.0"
+ pkg-dir "^3.0.0"
+
+find-cache-dir@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.0.0.tgz#cd4b7dd97b7185b7e17dbfe2d6e4115ee3eeb8fc"
+ integrity sha512-t7ulV1fmbxh5G9l/492O1p5+EBbr3uwpt6odhFTMc+nWyhmbloe+ja9BZ8pIBtqFWhOmCWVjx+pTW4zDkFoclw==
+ dependencies:
+ commondir "^1.0.1"
+ make-dir "^3.0.0"
+ pkg-dir "^4.1.0"
+
+find-cache-dir@^3.2.0:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880"
+ integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==
+ dependencies:
+ commondir "^1.0.1"
+ make-dir "^3.0.2"
+ pkg-dir "^4.1.0"
+
+find-up@4.1.0, find-up@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
+ integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
+ dependencies:
+ locate-path "^5.0.0"
+ path-exists "^4.0.0"
+
+find-up@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
+ integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
+ dependencies:
+ locate-path "^2.0.0"
+
+find-up@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
+ integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==
+ dependencies:
+ locate-path "^3.0.0"
+
+flatten@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
+ integrity sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=
+
+flush-write-stream@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8"
+ integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==
+ dependencies:
+ inherits "^2.0.3"
+ readable-stream "^2.3.6"
+
+follow-redirects@^1.0.0:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f"
+ integrity sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==
+ dependencies:
+ debug "^3.0.0"
+
+for-in@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+ integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
+
+foreach@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
+ integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k=
+
+forever-agent@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
+ integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
+
+fork-ts-checker-webpack-plugin@3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-3.1.1.tgz#a1642c0d3e65f50c2cc1742e9c0a80f441f86b19"
+ integrity sha512-DuVkPNrM12jR41KM2e+N+styka0EgLkTnXmNcXdgOM37vtGeY+oCBK/Jx0hzSeEU6memFCtWb4htrHPMDfwwUQ==
+ dependencies:
+ babel-code-frame "^6.22.0"
+ chalk "^2.4.1"
+ chokidar "^3.3.0"
+ micromatch "^3.1.10"
+ minimatch "^3.0.4"
+ semver "^5.6.0"
+ tapable "^1.0.0"
+ worker-rpc "^0.1.0"
+
+form-data@~2.3.2:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
+ integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.6"
+ mime-types "^2.1.12"
+
+forwarded@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
+ integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
+
+fragment-cache@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
+ integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=
+ dependencies:
+ map-cache "^0.2.2"
+
+fresh@0.5.2:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
+ integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
+
+from2@^2.1.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af"
+ integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=
+ dependencies:
+ inherits "^2.0.1"
+ readable-stream "^2.0.0"
+
+fs-extra@^8.1.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
+ integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
+ dependencies:
+ graceful-fs "^4.2.0"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
+fs-minipass@^1.2.5:
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7"
+ integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==
+ dependencies:
+ minipass "^2.6.0"
+
+fs-minipass@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb"
+ integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==
+ dependencies:
+ minipass "^3.0.0"
+
+fs-write-stream-atomic@^1.0.8:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9"
+ integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=
+ dependencies:
+ graceful-fs "^4.1.2"
+ iferr "^0.1.5"
+ imurmurhash "^0.1.4"
+ readable-stream "1 || 2"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
+
+fsevents@^1.2.7:
+ version "1.2.9"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f"
+ integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==
+ dependencies:
+ nan "^2.12.1"
+ node-pre-gyp "^0.12.0"
+
+fsevents@~2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805"
+ integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==
+
+function-bind@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
+ integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+
+gauge@~2.7.3:
+ version "2.7.4"
+ resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
+ integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=
+ dependencies:
+ aproba "^1.0.3"
+ console-control-strings "^1.0.0"
+ has-unicode "^2.0.0"
+ object-assign "^4.1.0"
+ signal-exit "^3.0.0"
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+ wide-align "^1.1.0"
+
+gensync@^1.0.0-beta.1:
+ version "1.0.0-beta.1"
+ resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269"
+ integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==
+
+get-caller-file@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
+ integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==
+
+get-own-enumerable-property-symbols@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203"
+ integrity sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg==
+
+get-stream@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
+ integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
+ dependencies:
+ pump "^3.0.0"
+
+get-stream@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9"
+ integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==
+ dependencies:
+ pump "^3.0.0"
+
+get-value@^2.0.3, get-value@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
+ integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=
+
+getpass@^0.1.1:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
+ integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
+ dependencies:
+ assert-plus "^1.0.0"
+
+github-slugger@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.3.0.tgz#9bd0a95c5efdfc46005e82a906ef8e2a059124c9"
+ integrity sha512-gwJScWVNhFYSRDvURk/8yhcFBee6aFjye2a7Lhb2bUyRulpIoek9p0I9Kt7PT67d/nUlZbFu8L9RLiA0woQN8Q==
+ dependencies:
+ emoji-regex ">=6.0.0 <=6.1.1"
+
+glob-parent@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
+ integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=
+ dependencies:
+ is-glob "^3.1.0"
+ path-dirname "^1.0.0"
+
+glob-parent@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2"
+ integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==
+ dependencies:
+ is-glob "^4.0.1"
+
+glob-parent@~5.1.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
+ integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==
+ dependencies:
+ is-glob "^4.0.1"
+
+glob-to-regexp@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
+ integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=
+
+glob@^7.0.0, glob@^7.0.3, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
+ version "7.1.4"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
+ integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+global-modules@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780"
+ integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==
+ dependencies:
+ global-prefix "^3.0.0"
+
+global-prefix@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97"
+ integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==
+ dependencies:
+ ini "^1.3.5"
+ kind-of "^6.0.2"
+ which "^1.3.1"
+
+global@^4.3.2:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406"
+ integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==
+ dependencies:
+ min-document "^2.19.0"
+ process "^0.11.10"
+
+globals@^11.1.0:
+ version "11.12.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
+ integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
+
+globby@8.0.2:
+ version "8.0.2"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d"
+ integrity sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==
+ dependencies:
+ array-union "^1.0.1"
+ dir-glob "2.0.0"
+ fast-glob "^2.0.2"
+ glob "^7.1.2"
+ ignore "^3.3.5"
+ pify "^3.0.0"
+ slash "^1.0.0"
+
+globby@^10.0.1:
+ version "10.0.1"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22"
+ integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==
+ dependencies:
+ "@types/glob" "^7.1.1"
+ array-union "^2.1.0"
+ dir-glob "^3.0.1"
+ fast-glob "^3.0.3"
+ glob "^7.1.3"
+ ignore "^5.1.1"
+ merge2 "^1.2.3"
+ slash "^3.0.0"
+
+globby@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
+ integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=
+ dependencies:
+ array-union "^1.0.1"
+ glob "^7.0.3"
+ object-assign "^4.0.1"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+globby@^7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
+ integrity sha1-+yzP+UAfhgCUXfral0QMypcrhoA=
+ dependencies:
+ array-union "^1.0.1"
+ dir-glob "^2.0.0"
+ glob "^7.1.2"
+ ignore "^3.3.5"
+ pify "^3.0.0"
+ slash "^1.0.0"
+
+good-listener@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50"
+ integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=
+ dependencies:
+ delegate "^3.1.2"
+
+graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02"
+ integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==
+
+graceful-fs@^4.2.2:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
+ integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
+
+gray-matter@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.2.tgz#9aa379e3acaf421193fce7d2a28cebd4518ac454"
+ integrity sha512-7hB/+LxrOjq/dd8APlK0r24uL/67w7SkYnfwhNFwg/VDIGWGmduTDYf3WNstLW2fbbmRwrDGCVSJ2isuf2+4Hw==
+ dependencies:
+ js-yaml "^3.11.0"
+ kind-of "^6.0.2"
+ section-matter "^1.0.0"
+ strip-bom-string "^1.0.0"
+
+gud@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0"
+ integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==
+
+gzip-size@5.1.1, gzip-size@^5.0.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274"
+ integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==
+ dependencies:
+ duplexer "^0.1.1"
+ pify "^4.0.1"
+
+handle-thing@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.0.tgz#0e039695ff50c93fc288557d696f3c1dc6776754"
+ integrity sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==
+
+har-schema@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
+ integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
+
+har-validator@~5.1.0:
+ version "5.1.3"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080"
+ integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==
+ dependencies:
+ ajv "^6.5.5"
+ har-schema "^2.0.0"
+
+has-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+ integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=
+ dependencies:
+ ansi-regex "^2.0.0"
+
+has-flag@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+ integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
+has-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44"
+ integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=
+
+has-unicode@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
+ integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
+
+has-value@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
+ integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=
+ dependencies:
+ get-value "^2.0.3"
+ has-values "^0.1.4"
+ isobject "^2.0.0"
+
+has-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
+ integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=
+ dependencies:
+ get-value "^2.0.6"
+ has-values "^1.0.0"
+ isobject "^3.0.0"
+
+has-values@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
+ integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E=
+
+has-values@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
+ integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
+has@^1.0.0, has@^1.0.1, has@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
+ integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
+ dependencies:
+ function-bind "^1.1.1"
+
+hash-base@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918"
+ integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=
+ dependencies:
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+hash.js@^1.0.0, hash.js@^1.0.3:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42"
+ integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==
+ dependencies:
+ inherits "^2.0.3"
+ minimalistic-assert "^1.0.1"
+
+hast-to-hyperscript@^7.0.0:
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/hast-to-hyperscript/-/hast-to-hyperscript-7.0.2.tgz#e9237c88c6069999ad38aec847fefc296f484c4c"
+ integrity sha512-NBMMst0hkDR21uSH75m9W2DkljBrLoMQEhGiLMLNij4HIzEDJMC1UG+CFR6EAjHi2zs3NHBoaAHJOHxftoIN2g==
+ dependencies:
+ comma-separated-tokens "^1.0.0"
+ property-information "^5.0.0"
+ space-separated-tokens "^1.0.0"
+ style-to-object "^0.2.1"
+ unist-util-is "^3.0.0"
+ web-namespaces "^1.1.2"
+
+hast-util-from-parse5@^5.0.0:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-5.0.1.tgz#7da8841d707dcf7be73715f7f3b14e021c4e469a"
+ integrity sha512-UfPzdl6fbxGAxqGYNThRUhRlDYY7sXu6XU9nQeX4fFZtV+IHbyEJtd+DUuwOqNV4z3K05E/1rIkoVr/JHmeWWA==
+ dependencies:
+ ccount "^1.0.3"
+ hastscript "^5.0.0"
+ property-information "^5.0.0"
+ web-namespaces "^1.1.2"
+ xtend "^4.0.1"
+
+hast-util-parse-selector@^2.2.0:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.2.tgz#66aabccb252c47d94975f50a281446955160380b"
+ integrity sha512-jIMtnzrLTjzqgVEQqPEmwEZV+ea4zHRFTP8Z2Utw0I5HuBOXHzUPPQWr6ouJdJqDKLbFU/OEiYwZ79LalZkmmw==
+
+hast-util-raw@5.0.2:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/hast-util-raw/-/hast-util-raw-5.0.2.tgz#62288f311ec2f35e066a30d5e0277f963ad43a67"
+ integrity sha512-3ReYQcIHmzSgMq8UrDZHFL0oGlbuVGdLKs8s/Fe8BfHFAyZDrdv1fy/AGn+Fim8ZuvAHcJ61NQhVMtyfHviT/g==
+ dependencies:
+ hast-util-from-parse5 "^5.0.0"
+ hast-util-to-parse5 "^5.0.0"
+ html-void-elements "^1.0.0"
+ parse5 "^5.0.0"
+ unist-util-position "^3.0.0"
+ web-namespaces "^1.0.0"
+ xtend "^4.0.0"
+ zwitch "^1.0.0"
+
+hast-util-to-parse5@^5.0.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/hast-util-to-parse5/-/hast-util-to-parse5-5.1.1.tgz#cabf2dbe9ed988a5128fc708457b37cdf535a2e8"
+ integrity sha512-ivCeAd5FCXr7bapJIVsWMnx/EmbjkkW2TU2hd1prq+jGwiaUoK+FcpjyPNwsC5ogzCwWO669tOqIovGeLc/ntg==
+ dependencies:
+ hast-to-hyperscript "^7.0.0"
+ property-information "^5.0.0"
+ web-namespaces "^1.0.0"
+ xtend "^4.0.1"
+ zwitch "^1.0.0"
+
+hastscript@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-5.1.0.tgz#a19b3cca6a26a2bcd0f1b1eac574af9427c1c7df"
+ integrity sha512-7mOQX5VfVs/gmrOGlN8/EDfp1GqV6P3gTNVt+KnX4gbYhpASTM8bklFdFQCbFRAadURXAmw0R1QQdBdqp7jswQ==
+ dependencies:
+ comma-separated-tokens "^1.0.0"
+ hast-util-parse-selector "^2.2.0"
+ property-information "^5.0.1"
+ space-separated-tokens "^1.0.0"
+
+he@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
+ integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
+
+hex-color-regex@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"
+ integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
+
+history@^4.9.0:
+ version "4.10.1"
+ resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3"
+ integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==
+ dependencies:
+ "@babel/runtime" "^7.1.2"
+ loose-envify "^1.2.0"
+ resolve-pathname "^3.0.0"
+ tiny-invariant "^1.0.2"
+ tiny-warning "^1.0.0"
+ value-equal "^1.0.1"
+
+hmac-drbg@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
+ integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=
+ dependencies:
+ hash.js "^1.0.3"
+ minimalistic-assert "^1.0.0"
+ minimalistic-crypto-utils "^1.0.1"
+
+hogan.js@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/hogan.js/-/hogan.js-3.0.2.tgz#4cd9e1abd4294146e7679e41d7898732b02c7bfd"
+ integrity sha1-TNnhq9QpQUbnZ55B14mHMrAse/0=
+ dependencies:
+ mkdirp "0.3.0"
+ nopt "1.0.10"
+
+hoist-non-react-statics@^3.1.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b"
+ integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==
+ dependencies:
+ react-is "^16.7.0"
+
+hoopy@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d"
+ integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==
+
+hpack.js@^2.1.6:
+ version "2.1.6"
+ resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2"
+ integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=
+ dependencies:
+ inherits "^2.0.1"
+ obuf "^1.0.0"
+ readable-stream "^2.0.1"
+ wbuf "^1.1.0"
+
+hsl-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e"
+ integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=
+
+hsla-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38"
+ integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg=
+
+html-comment-regex@^1.1.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7"
+ integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==
+
+html-entities@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f"
+ integrity sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=
+
+html-minifier-terser@^5.0.1, html-minifier-terser@^5.0.5:
+ version "5.0.5"
+ resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.0.5.tgz#8f12f639789f04faa9f5cf2ff9b9f65607f21f8b"
+ integrity sha512-cBSFFghQh/uHcfSiL42KxxIRMF7A144+3E44xdlctIjxEmkEfCvouxNyFH2wysXk1fCGBPwtcr3hDWlGTfkDew==
+ dependencies:
+ camel-case "^4.1.1"
+ clean-css "^4.2.3"
+ commander "^4.1.1"
+ he "^1.2.0"
+ param-case "^3.0.3"
+ relateurl "^0.2.7"
+ terser "^4.6.3"
+
+html-tags@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.1.0.tgz#7b5e6f7e665e9fb41f30007ed9e0d41e97fb2140"
+ integrity sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==
+
+html-void-elements@^1.0.0:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-1.0.5.tgz#ce9159494e86d95e45795b166c2021c2cfca4483"
+ integrity sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==
+
+html-webpack-plugin@^4.0.4:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.2.0.tgz#ea46f15b620d4c1c8c73ea399395c81208e9f823"
+ integrity sha512-zL7LYTuq/fcJX6vV6tmmvFR508Bd9e6kvVGbS76YAjZ2CPVRzsjkvDYs/SshPevpolSdTWgaDV39D6k6oQoVFw==
+ dependencies:
+ "@types/html-minifier-terser" "^5.0.0"
+ "@types/tapable" "^1.0.5"
+ "@types/webpack" "^4.41.8"
+ html-minifier-terser "^5.0.1"
+ loader-utils "^1.2.3"
+ lodash "^4.17.15"
+ pretty-error "^2.1.1"
+ tapable "^1.1.3"
+ util.promisify "1.0.0"
+
+htmlparser2@^3.3.0, htmlparser2@^3.9.1:
+ version "3.10.1"
+ resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f"
+ integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==
+ dependencies:
+ domelementtype "^1.3.1"
+ domhandler "^2.3.0"
+ domutils "^1.5.1"
+ entities "^1.1.1"
+ inherits "^2.0.1"
+ readable-stream "^3.1.1"
+
+http-deceiver@^1.2.7:
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87"
+ integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=
+
+http-errors@1.7.2:
+ version "1.7.2"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f"
+ integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.3"
+ setprototypeof "1.1.1"
+ statuses ">= 1.5.0 < 2"
+ toidentifier "1.0.0"
+
+http-errors@~1.6.2:
+ version "1.6.3"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d"
+ integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.3"
+ setprototypeof "1.1.0"
+ statuses ">= 1.4.0 < 2"
+
+http-errors@~1.7.2:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
+ integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.4"
+ setprototypeof "1.1.1"
+ statuses ">= 1.5.0 < 2"
+ toidentifier "1.0.0"
+
+"http-parser-js@>=0.4.0 <0.4.11":
+ version "0.4.10"
+ resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4"
+ integrity sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=
+
+http-proxy-middleware@0.19.1:
+ version "0.19.1"
+ resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a"
+ integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==
+ dependencies:
+ http-proxy "^1.17.0"
+ is-glob "^4.0.0"
+ lodash "^4.17.11"
+ micromatch "^3.1.10"
+
+http-proxy@^1.17.0:
+ version "1.18.0"
+ resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a"
+ integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==
+ dependencies:
+ eventemitter3 "^4.0.0"
+ follow-redirects "^1.0.0"
+ requires-port "^1.0.0"
+
+http-signature@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
+ integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
+ dependencies:
+ assert-plus "^1.0.0"
+ jsprim "^1.2.2"
+ sshpk "^1.7.0"
+
+https-browserify@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
+ integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
+
+human-signals@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
+ integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
+
+iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4:
+ version "0.4.24"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+icss-utils@^4.0.0, icss-utils@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467"
+ integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==
+ dependencies:
+ postcss "^7.0.14"
+
+ieee754@^1.1.4:
+ version "1.1.13"
+ resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
+ integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
+
+iferr@^0.1.5:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"
+ integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE=
+
+ignore-walk@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.2.tgz#99d83a246c196ea5c93ef9315ad7b0819c35069b"
+ integrity sha512-EXyErtpHbn75ZTsOADsfx6J/FPo6/5cjev46PXrcTpd8z3BoRkXgYu9/JVqrI7tusjmwCZutGeRJeU0Wo1e4Cw==
+ dependencies:
+ minimatch "^3.0.4"
+
+ignore@^3.3.5:
+ version "3.3.10"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
+ integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==
+
+ignore@^5.1.1:
+ version "5.1.4"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf"
+ integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==
+
+immediate@^3.2.3:
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c"
+ integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=
+
+immer@1.10.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/immer/-/immer-1.10.0.tgz#bad67605ba9c810275d91e1c2a47d4582e98286d"
+ integrity sha512-O3sR1/opvCDGLEVcvrGTMtLac8GJ5IwZC4puPrLuRj3l7ICKvkmA0vGuU9OW8mV9WIBRnaxp5GJh9IEAaNOoYg==
+
+import-cwd@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9"
+ integrity sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=
+ dependencies:
+ import-from "^2.1.0"
+
+import-fresh@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546"
+ integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY=
+ dependencies:
+ caller-path "^2.0.0"
+ resolve-from "^3.0.0"
+
+import-fresh@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
+ integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==
+ dependencies:
+ parent-module "^1.0.0"
+ resolve-from "^4.0.0"
+
+import-from@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1"
+ integrity sha1-M1238qev/VOqpHHUuAId7ja387E=
+ dependencies:
+ resolve-from "^3.0.0"
+
+import-local@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
+ integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==
+ dependencies:
+ pkg-dir "^3.0.0"
+ resolve-cwd "^2.0.0"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+ integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
+
+indent-string@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
+ integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
+
+indexes-of@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607"
+ integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc=
+
+infer-owner@^1.0.3, infer-owner@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467"
+ integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==
+
+infima@0.2.0-alpha.6:
+ version "0.2.0-alpha.6"
+ resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.6.tgz#69233fc055a7e9eb08fd70e1497ff8e2a68dd928"
+ integrity sha512-5Oin586QeBa5VdP8xpPuHB/BDg1D66+B5bFG67XPqKV8mD0hwKt2LJFYqoSJKGPBccxGBQpHEOFUd2sUSdhdGA==
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+inherits@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
+ integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=
+
+inherits@2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+ integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
+
+ini@^1.3.5, ini@~1.3.0:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
+ integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
+
+inline-style-parser@0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1"
+ integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==
+
+inquirer@7.0.4:
+ version "7.0.4"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.4.tgz#99af5bde47153abca23f5c7fc30db247f39da703"
+ integrity sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==
+ dependencies:
+ ansi-escapes "^4.2.1"
+ chalk "^2.4.2"
+ cli-cursor "^3.1.0"
+ cli-width "^2.0.0"
+ external-editor "^3.0.3"
+ figures "^3.0.0"
+ lodash "^4.17.15"
+ mute-stream "0.0.8"
+ run-async "^2.2.0"
+ rxjs "^6.5.3"
+ string-width "^4.1.0"
+ strip-ansi "^5.1.0"
+ through "^2.3.6"
+
+internal-ip@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907"
+ integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==
+ dependencies:
+ default-gateway "^4.2.0"
+ ipaddr.js "^1.9.0"
+
+interpret@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296"
+ integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==
+
+invariant@^2.2.2, invariant@^2.2.4:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+ integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
+ dependencies:
+ loose-envify "^1.0.0"
+
+invert-kv@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02"
+ integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==
+
+ip-regex@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9"
+ integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=
+
+ip@^1.1.0, ip@^1.1.5:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
+ integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=
+
+ipaddr.js@1.9.0:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65"
+ integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==
+
+ipaddr.js@^1.9.0:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
+ integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
+
+is-absolute-url@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6"
+ integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=
+
+is-absolute-url@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698"
+ integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==
+
+is-accessor-descriptor@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
+ integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-accessor-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
+ integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-alphabetical@1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d"
+ integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==
+
+is-alphabetical@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.3.tgz#eb04cc47219a8895d8450ace4715abff2258a1f8"
+ integrity sha512-eEMa6MKpHFzw38eKm56iNNi6GJ7lf6aLLio7Kr23sJPAECscgRtZvOBYybejWDQ2bM949Y++61PY+udzj5QMLA==
+
+is-alphanumerical@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.3.tgz#57ae21c374277b3defe0274c640a5704b8f6657c"
+ integrity sha512-A1IGAPO5AW9vSh7omxIlOGwIqEvpW/TA+DksVOPM5ODuxKlZS09+TEM1E3275lJqO2oJ38vDpeAL3DCIiHE6eA==
+ dependencies:
+ is-alphabetical "^1.0.0"
+ is-decimal "^1.0.0"
+
+is-arguments@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3"
+ integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+ integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
+
+is-arrayish@^0.3.1:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
+ integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==
+
+is-binary-path@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
+ integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=
+ dependencies:
+ binary-extensions "^1.0.0"
+
+is-binary-path@~2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
+ integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
+ dependencies:
+ binary-extensions "^2.0.0"
+
+is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+ integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
+
+is-buffer@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725"
+ integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==
+
+is-callable@^1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
+ integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==
+
+is-color-stop@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345"
+ integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=
+ dependencies:
+ css-color-names "^0.0.4"
+ hex-color-regex "^1.1.0"
+ hsl-regex "^1.0.0"
+ hsla-regex "^1.0.0"
+ rgb-regex "^1.0.1"
+ rgba-regex "^1.0.0"
+
+is-data-descriptor@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
+ integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-data-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
+ integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-date-object@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
+ integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=
+
+is-decimal@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.3.tgz#381068759b9dc807d8c0dc0bfbae2b68e1da48b7"
+ integrity sha512-bvLSwoDg2q6Gf+E2LEPiklHZxxiSi3XAh4Mav65mKqTfCO1HM3uBs24TjEH8iJX3bbDdLXKJXBTmGzuTUuAEjQ==
+
+is-descriptor@^0.1.0:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
+ integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==
+ dependencies:
+ is-accessor-descriptor "^0.1.6"
+ is-data-descriptor "^0.1.4"
+ kind-of "^5.0.0"
+
+is-descriptor@^1.0.0, is-descriptor@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
+ integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==
+ dependencies:
+ is-accessor-descriptor "^1.0.0"
+ is-data-descriptor "^1.0.0"
+ kind-of "^6.0.2"
+
+is-directory@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1"
+ integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=
+
+is-docker@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.0.0.tgz#2cb0df0e75e2d064fe1864c37cdeacb7b2dcf25b"
+ integrity sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==
+
+is-extendable@^0.1.0, is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+ integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
+
+is-extendable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+ integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
+ dependencies:
+ is-plain-object "^2.0.4"
+
+is-extglob@^2.1.0, is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+ integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
+
+is-fullwidth-code-point@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
+ integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs=
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+ integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+
+is-fullwidth-code-point@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
+ integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
+
+is-glob@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
+ integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=
+ dependencies:
+ is-extglob "^2.1.0"
+
+is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
+ integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-hexadecimal@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.3.tgz#e8a426a69b6d31470d3a33a47bb825cda02506ee"
+ integrity sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA==
+
+is-number@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+ integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
+
+is-obj@^1.0.0, is-obj@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
+ integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8=
+
+is-path-cwd@^2.0.0, is-path-cwd@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb"
+ integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==
+
+is-path-in-cwd@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb"
+ integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==
+ dependencies:
+ is-path-inside "^2.1.0"
+
+is-path-inside@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2"
+ integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==
+ dependencies:
+ path-is-inside "^1.0.2"
+
+is-path-inside@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017"
+ integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==
+
+is-plain-obj@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
+ integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
+
+is-plain-obj@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.0.0.tgz#7fd1a7f1b69e160cde9181d2313f445c68aa2679"
+ integrity sha512-EYisGhpgSCwspmIuRHGjROWTon2Xp8Z7U03Wubk/bTL5TTRC5R1rGVgyjzBrk9+ULdH6cRD06KRcw/xfqhVYKQ==
+
+is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
+ dependencies:
+ isobject "^3.0.1"
+
+is-promise@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
+ integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=
+
+is-regex@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
+ integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=
+ dependencies:
+ has "^1.0.1"
+
+is-regexp@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069"
+ integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk=
+
+is-resolvable@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
+ integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==
+
+is-root@2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c"
+ integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==
+
+is-stream@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+ integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
+
+is-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
+ integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
+
+is-svg@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75"
+ integrity sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==
+ dependencies:
+ html-comment-regex "^1.1.0"
+
+is-symbol@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38"
+ integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==
+ dependencies:
+ has-symbols "^1.0.0"
+
+is-typedarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+ integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
+
+is-whitespace-character@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.3.tgz#b3ad9546d916d7d3ffa78204bca0c26b56257fac"
+ integrity sha512-SNPgMLz9JzPccD3nPctcj8sZlX9DAMJSKH8bP7Z6bohCwuNgX8xbWr1eTAYXX9Vpi/aSn8Y1akL9WgM3t43YNQ==
+
+is-windows@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
+ integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
+
+is-word-character@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-word-character/-/is-word-character-1.0.3.tgz#264d15541cbad0ba833d3992c34e6b40873b08aa"
+ integrity sha512-0wfcrFgOOOBdgRNT9H33xe6Zi6yhX/uoc4U8NBZGeQQB0ctU1dnlNTyL9JM2646bHDTpsDm1Brb3VPoCIMrd/A==
+
+is-wsl@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
+ integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
+
+is-wsl@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d"
+ integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog==
+
+isarray@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+ integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=
+
+isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+
+isarray@^2.0.1:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723"
+ integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=
+ dependencies:
+ isarray "1.0.0"
+
+isobject@^3.0.0, isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+ integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
+
+isstream@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+ integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
+
+jest-worker@^25.1.0:
+ version "25.2.6"
+ resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.2.6.tgz#d1292625326794ce187c38f51109faced3846c58"
+ integrity sha512-FJn9XDUSxcOR4cwDzRfL1z56rUofNTFs539FGASpd50RHdb6EVkhxQqktodW2mI49l+W3H+tFJDotCHUQF6dmA==
+ dependencies:
+ merge-stream "^2.0.0"
+ supports-color "^7.0.0"
+
+"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+ integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+
+js-tokens@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
+ integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
+
+js-yaml@^3.11.0, js-yaml@^3.13.1:
+ version "3.13.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
+ integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^4.0.0"
+
+jsbn@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
+ integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
+
+jsesc@^2.5.1:
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
+ integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
+
+jsesc@~0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
+ integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=
+
+json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
+ integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==
+
+json-schema-traverse@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+ integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
+
+json-schema@0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
+ integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
+
+json-stringify-safe@~5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
+ integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
+
+json3@^3.3.2:
+ version "3.3.3"
+ resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81"
+ integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==
+
+json5@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
+ integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==
+ dependencies:
+ minimist "^1.2.0"
+
+json5@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850"
+ integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==
+ dependencies:
+ minimist "^1.2.0"
+
+json5@^2.1.2:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43"
+ integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==
+ dependencies:
+ minimist "^1.2.5"
+
+jsonfile@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
+ integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+jsprim@^1.2.2:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
+ integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
+ dependencies:
+ assert-plus "1.0.0"
+ extsprintf "1.3.0"
+ json-schema "0.2.3"
+ verror "1.10.0"
+
+killable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
+ integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==
+
+kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+ integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
+ integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==
+
+kind-of@^6.0.0, kind-of@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
+ integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==
+
+last-call-webpack-plugin@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz#9742df0e10e3cf46e5c0381c2de90d3a7a2d7555"
+ integrity sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w==
+ dependencies:
+ lodash "^4.17.5"
+ webpack-sources "^1.1.0"
+
+lcid@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf"
+ integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==
+ dependencies:
+ invert-kv "^2.0.0"
+
+leven@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
+ integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==
+
+levenary@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.1.tgz#842a9ee98d2075aa7faeedbe32679e9205f46f77"
+ integrity sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==
+ dependencies:
+ leven "^3.1.0"
+
+load-script@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4"
+ integrity sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ=
+
+loader-runner@^2.4.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357"
+ integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==
+
+loader-utils@1.2.3, loader-utils@^1.1.0, loader-utils@^1.2.3:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7"
+ integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==
+ dependencies:
+ big.js "^5.2.2"
+ emojis-list "^2.0.0"
+ json5 "^1.0.1"
+
+loader-utils@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613"
+ integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==
+ dependencies:
+ big.js "^5.2.2"
+ emojis-list "^3.0.0"
+ json5 "^1.0.1"
+
+locate-path@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
+ integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=
+ dependencies:
+ p-locate "^2.0.0"
+ path-exists "^3.0.0"
+
+locate-path@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
+ integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==
+ dependencies:
+ p-locate "^3.0.0"
+ path-exists "^3.0.0"
+
+locate-path@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
+ integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
+ dependencies:
+ p-locate "^4.1.0"
+
+lodash._reinterpolate@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
+ integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=
+
+lodash.assignin@^4.0.9:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2"
+ integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI=
+
+lodash.bind@^4.1.4:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35"
+ integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=
+
+lodash.chunk@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc"
+ integrity sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw=
+
+lodash.defaults@^4.0.1:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
+ integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=
+
+lodash.filter@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace"
+ integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=
+
+lodash.flatten@^4.2.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f"
+ integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=
+
+lodash.foreach@^4.3.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53"
+ integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=
+
+lodash.kebabcase@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"
+ integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY=
+
+lodash.map@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
+ integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=
+
+lodash.memoize@^4.1.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
+ integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=
+
+lodash.merge@^4.4.0:
+ version "4.6.2"
+ resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+ integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
+
+lodash.padstart@^4.6.1:
+ version "4.6.1"
+ resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b"
+ integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=
+
+lodash.pick@^4.2.1:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
+ integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=
+
+lodash.reduce@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b"
+ integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=
+
+lodash.reject@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415"
+ integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=
+
+lodash.some@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
+ integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=
+
+lodash.sortby@^4.7.0:
+ version "4.7.0"
+ resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
+ integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
+
+lodash.template@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab"
+ integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==
+ dependencies:
+ lodash._reinterpolate "^3.0.0"
+ lodash.templatesettings "^4.0.0"
+
+lodash.templatesettings@^4.0.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33"
+ integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==
+ dependencies:
+ lodash._reinterpolate "^3.0.0"
+
+lodash.toarray@^4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561"
+ integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE=
+
+lodash.uniq@4.5.0, lodash.uniq@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
+ integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
+
+lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5:
+ version "4.17.15"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
+ integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
+
+loglevel@^1.6.6:
+ version "1.6.8"
+ resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171"
+ integrity sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA==
+
+loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
+ integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
+ dependencies:
+ js-tokens "^3.0.0 || ^4.0.0"
+
+lower-case@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.1.tgz#39eeb36e396115cc05e29422eaea9e692c9408c7"
+ integrity sha512-LiWgfDLLb1dwbFQZsSglpRj+1ctGnayXz3Uv0/WO8n558JycT5fg6zkNcnW0G68Nn0aEldTFeEfmjCfmqry/rQ==
+ dependencies:
+ tslib "^1.10.0"
+
+lru-cache@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
+ integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
+ dependencies:
+ yallist "^3.0.2"
+
+make-dir@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
+ integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
+ dependencies:
+ pify "^4.0.1"
+ semver "^5.6.0"
+
+make-dir@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.0.tgz#1b5f39f6b9270ed33f9f054c5c0f84304989f801"
+ integrity sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==
+ dependencies:
+ semver "^6.0.0"
+
+make-dir@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392"
+ integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==
+ dependencies:
+ semver "^6.0.0"
+
+map-age-cleaner@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a"
+ integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==
+ dependencies:
+ p-defer "^1.0.0"
+
+map-cache@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+ integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=
+
+map-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
+ integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=
+ dependencies:
+ object-visit "^1.0.0"
+
+markdown-escapes@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.3.tgz#6155e10416efaafab665d466ce598216375195f5"
+ integrity sha512-XUi5HJhhV5R74k8/0H2oCbCiYf/u4cO/rX8tnGkRvrqhsr5BRNU6Mg0yt/8UIx1iIS8220BNJsDb7XnILhLepw==
+
+md5.js@^1.3.4:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f"
+ integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==
+ dependencies:
+ hash-base "^3.0.0"
+ inherits "^2.0.1"
+ safe-buffer "^5.1.2"
+
+mdast-squeeze-paragraphs@^3.0.0:
+ version "3.0.5"
+ resolved "https://registry.yarnpkg.com/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-3.0.5.tgz#f428b6b944f8faef454db9b58f170c4183cb2e61"
+ integrity sha512-xX6Vbe348Y/rukQlG4W3xH+7v4ZlzUbSY4HUIQCuYrF2DrkcHx584mCaFxkWoDZKNUfyLZItHC9VAqX3kIP7XA==
+ dependencies:
+ unist-util-remove "^1.0.0"
+
+mdast-util-definitions@^1.2.0:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-1.2.4.tgz#2b54ad4eecaff9d9fcb6bf6f9f6b68b232d77ca7"
+ integrity sha512-HfUArPog1j4Z78Xlzy9Q4aHLnrF/7fb57cooTHypyGoe2XFNbcx/kWZDoOz+ra8CkUzvg3+VHV434yqEd1DRmA==
+ dependencies:
+ unist-util-visit "^1.0.0"
+
+mdast-util-to-hast@7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-7.0.0.tgz#589b562ce1ae0a7849e6c38536a9e7bc4f415e54"
+ integrity sha512-vxnXKSZgvPG2grZM3kxaF052pxsLtq8TPAkiMkqYj1nFTOazYUPXt3LFYIEB6Ws/IX7Uyvljzk64kD6DwZl/wQ==
+ dependencies:
+ collapse-white-space "^1.0.0"
+ detab "^2.0.0"
+ mdast-util-definitions "^1.2.0"
+ mdurl "^1.0.1"
+ trim-lines "^1.0.0"
+ unist-builder "^2.0.0"
+ unist-util-generated "^1.0.0"
+ unist-util-position "^3.0.0"
+ unist-util-visit "^2.0.0"
+
+mdast-util-to-string@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz#27055500103f51637bd07d01da01eb1967a43527"
+ integrity sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==
+
+mdn-data@2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b"
+ integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==
+
+mdn-data@~1.1.0:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01"
+ integrity sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==
+
+mdurl@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
+ integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=
+
+media-typer@0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
+ integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
+
+mem@^4.0.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178"
+ integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==
+ dependencies:
+ map-age-cleaner "^0.1.1"
+ mimic-fn "^2.0.0"
+ p-is-promise "^2.0.0"
+
+memory-fs@^0.4.0, memory-fs@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552"
+ integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=
+ dependencies:
+ errno "^0.1.3"
+ readable-stream "^2.0.1"
+
+merge-descriptors@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
+ integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
+
+merge-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
+ integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
+
+merge2@^1.2.3:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81"
+ integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==
+
+methods@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
+ integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
+
+microevent.ts@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0"
+ integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g==
+
+micromatch@^3.1.10, micromatch@^3.1.4:
+ version "3.1.10"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
+ integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ braces "^2.3.1"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ extglob "^2.0.4"
+ fragment-cache "^0.2.1"
+ kind-of "^6.0.2"
+ nanomatch "^1.2.9"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.2"
+
+micromatch@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
+ integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
+ dependencies:
+ braces "^3.0.1"
+ picomatch "^2.0.5"
+
+miller-rabin@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d"
+ integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==
+ dependencies:
+ bn.js "^4.0.0"
+ brorand "^1.0.1"
+
+mime-db@1.40.0:
+ version "1.40.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32"
+ integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==
+
+"mime-db@>= 1.40.0 < 2":
+ version "1.42.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.42.0.tgz#3e252907b4c7adb906597b4b65636272cf9e7bac"
+ integrity sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==
+
+mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24:
+ version "2.1.24"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81"
+ integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==
+ dependencies:
+ mime-db "1.40.0"
+
+mime@1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
+ integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
+
+mime@^2.4.4:
+ version "2.4.4"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5"
+ integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==
+
+mimic-fn@^2.0.0, mimic-fn@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
+ integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
+
+min-document@^2.19.0:
+ version "2.19.0"
+ resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
+ integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=
+ dependencies:
+ dom-walk "^0.1.0"
+
+mini-create-react-context@^0.3.0:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz#79fc598f283dd623da8e088b05db8cddab250189"
+ integrity sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw==
+ dependencies:
+ "@babel/runtime" "^7.4.0"
+ gud "^1.0.0"
+ tiny-warning "^1.0.2"
+
+mini-css-extract-plugin@^0.8.0:
+ version "0.8.0"
+ resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.0.tgz#81d41ec4fe58c713a96ad7c723cdb2d0bd4d70e1"
+ integrity sha512-MNpRGbNA52q6U92i0qbVpQNsgk7LExy41MdAlG84FeytfDOtRIf/mCHdEgG8rpTKOaNKiqUnZdlptF469hxqOw==
+ dependencies:
+ loader-utils "^1.1.0"
+ normalize-url "1.9.1"
+ schema-utils "^1.0.0"
+ webpack-sources "^1.1.0"
+
+minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
+ integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==
+
+minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
+ integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
+
+minimatch@3.0.4, minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+ integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
+
+minimist@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+ integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
+
+minimist@^1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
+ integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
+
+minipass-collect@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617"
+ integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==
+ dependencies:
+ minipass "^3.0.0"
+
+minipass-flush@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373"
+ integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==
+ dependencies:
+ minipass "^3.0.0"
+
+minipass-pipeline@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz#3dcb6bb4a546e32969c7ad710f2c79a86abba93a"
+ integrity sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA==
+ dependencies:
+ minipass "^3.0.0"
+
+minipass@^2.6.0, minipass@^2.8.6:
+ version "2.8.6"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.8.6.tgz#620d889ace26356391d010ecb9458749df9b6db5"
+ integrity sha512-lFG7d6g3+/UaFDCOtqPiKAC9zngWWsQZl1g5q6gaONqrjq61SX2xFqXMleQiFVyDpYwa018E9hmlAFY22PCb+A==
+ dependencies:
+ safe-buffer "^5.1.2"
+ yallist "^3.0.0"
+
+minipass@^2.9.0:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6"
+ integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==
+ dependencies:
+ safe-buffer "^5.1.2"
+ yallist "^3.0.0"
+
+minipass@^3.0.0, minipass@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5"
+ integrity sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==
+ dependencies:
+ yallist "^4.0.0"
+
+minizlib@^1.2.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.2.tgz#5d24764998f98112586f7e566bd4c0999769dad4"
+ integrity sha512-lsNFqSHdJ21EwKzCp12HHJGxSMtHkCW1EMA9cceG3MkMNARjuWotZnMe3NKNshAvFXpm4loZqmYsCmRwhS2JMw==
+ dependencies:
+ minipass "^2.9.0"
+
+mississippi@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022"
+ integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==
+ dependencies:
+ concat-stream "^1.5.0"
+ duplexify "^3.4.2"
+ end-of-stream "^1.1.0"
+ flush-write-stream "^1.0.0"
+ from2 "^2.1.0"
+ parallel-transform "^1.1.0"
+ pump "^3.0.0"
+ pumpify "^1.3.3"
+ stream-each "^1.1.0"
+ through2 "^2.0.0"
+
+mixin-deep@^1.2.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
+ integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==
+ dependencies:
+ for-in "^1.0.2"
+ is-extendable "^1.0.1"
+
+mkdirp@0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e"
+ integrity sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=
+
+mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
+ dependencies:
+ minimist "0.0.8"
+
+mkdirp@^0.5.3:
+ version "0.5.5"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
+ integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
+ dependencies:
+ minimist "^1.2.5"
+
+move-concurrently@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
+ integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=
+ dependencies:
+ aproba "^1.1.1"
+ copy-concurrently "^1.0.0"
+ fs-write-stream-atomic "^1.0.8"
+ mkdirp "^0.5.1"
+ rimraf "^2.5.4"
+ run-queue "^1.0.3"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+ integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+
+ms@2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
+ integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
+
+ms@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+
+multicast-dns-service-types@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901"
+ integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=
+
+multicast-dns@^6.0.1:
+ version "6.2.3"
+ resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229"
+ integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==
+ dependencies:
+ dns-packet "^1.3.1"
+ thunky "^1.0.2"
+
+mute-stream@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
+ integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
+
+nan@^2.12.1:
+ version "2.14.0"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
+ integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==
+
+nanomatch@^1.2.9:
+ version "1.2.13"
+ resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
+ integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ fragment-cache "^0.2.1"
+ is-windows "^1.0.2"
+ kind-of "^6.0.2"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+needle@^2.2.1:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c"
+ integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==
+ dependencies:
+ debug "^3.2.6"
+ iconv-lite "^0.4.4"
+ sax "^1.2.4"
+
+negotiator@0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
+ integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
+
+neo-async@^2.5.0, neo-async@^2.6.1:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
+ integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==
+
+nice-try@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
+ integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
+
+no-case@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.3.tgz#c21b434c1ffe48b39087e86cfb4d2582e9df18f8"
+ integrity sha512-ehY/mVQCf9BL0gKfsJBvFJen+1V//U+0HQMPrWct40ixE4jnv0bfvxDbWtAHL9EcaPEOJHVVYKoQn1TlZUB8Tw==
+ dependencies:
+ lower-case "^2.0.1"
+ tslib "^1.10.0"
+
+node-emoji@^1.10.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.10.0.tgz#8886abd25d9c7bb61802a658523d1f8d2a89b2da"
+ integrity sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==
+ dependencies:
+ lodash.toarray "^4.4.0"
+
+node-forge@0.9.0:
+ version "0.9.0"
+ resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579"
+ integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==
+
+node-libs-browser@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425"
+ integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==
+ dependencies:
+ assert "^1.1.1"
+ browserify-zlib "^0.2.0"
+ buffer "^4.3.0"
+ console-browserify "^1.1.0"
+ constants-browserify "^1.0.0"
+ crypto-browserify "^3.11.0"
+ domain-browser "^1.1.1"
+ events "^3.0.0"
+ https-browserify "^1.0.0"
+ os-browserify "^0.3.0"
+ path-browserify "0.0.1"
+ process "^0.11.10"
+ punycode "^1.2.4"
+ querystring-es3 "^0.2.0"
+ readable-stream "^2.3.3"
+ stream-browserify "^2.0.1"
+ stream-http "^2.7.2"
+ string_decoder "^1.0.0"
+ timers-browserify "^2.0.4"
+ tty-browserify "0.0.0"
+ url "^0.11.0"
+ util "^0.11.0"
+ vm-browserify "^1.0.1"
+
+node-pre-gyp@^0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149"
+ integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==
+ dependencies:
+ detect-libc "^1.0.2"
+ mkdirp "^0.5.1"
+ needle "^2.2.1"
+ nopt "^4.0.1"
+ npm-packlist "^1.1.6"
+ npmlog "^4.0.2"
+ rc "^1.2.7"
+ rimraf "^2.6.1"
+ semver "^5.3.0"
+ tar "^4"
+
+node-releases@^1.1.29:
+ version "1.1.32"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.32.tgz#485b35c1bf9b4d8baa105d782f8ca731e518276e"
+ integrity sha512-VhVknkitq8dqtWoluagsGPn3dxTvN9fwgR59fV3D7sLBHe0JfDramsMI8n8mY//ccq/Kkrf8ZRHRpsyVZ3qw1A==
+ dependencies:
+ semver "^5.3.0"
+
+node-releases@^1.1.52, node-releases@^1.1.53:
+ version "1.1.53"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4"
+ integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ==
+
+nopt@1.0.10:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
+ integrity sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=
+ dependencies:
+ abbrev "1"
+
+nopt@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
+ integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=
+ dependencies:
+ abbrev "1"
+ osenv "^0.1.4"
+
+normalize-path@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
+ integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=
+ dependencies:
+ remove-trailing-separator "^1.0.1"
+
+normalize-path@^3.0.0, normalize-path@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
+
+normalize-range@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
+ integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=
+
+normalize-url@1.9.1:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
+ integrity sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=
+ dependencies:
+ object-assign "^4.0.1"
+ prepend-http "^1.0.0"
+ query-string "^4.1.0"
+ sort-keys "^1.0.0"
+
+normalize-url@^3.0.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
+ integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
+
+npm-bundled@^1.0.1:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd"
+ integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==
+
+npm-packlist@^1.1.6:
+ version "1.4.4"
+ resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.4.tgz#866224233850ac534b63d1a6e76050092b5d2f44"
+ integrity sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==
+ dependencies:
+ ignore-walk "^3.0.1"
+ npm-bundled "^1.0.1"
+
+npm-run-path@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
+ integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=
+ dependencies:
+ path-key "^2.0.0"
+
+npm-run-path@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
+ integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
+ dependencies:
+ path-key "^3.0.0"
+
+npmlog@^4.0.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
+ integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
+ dependencies:
+ are-we-there-yet "~1.1.2"
+ console-control-strings "~1.1.0"
+ gauge "~2.7.3"
+ set-blocking "~2.0.0"
+
+nprogress@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/nprogress/-/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1"
+ integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E=
+
+nth-check@^1.0.2, nth-check@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
+ integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==
+ dependencies:
+ boolbase "~1.0.0"
+
+null-loader@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/null-loader/-/null-loader-3.0.0.tgz#3e2b6c663c5bda8c73a54357d8fa0708dc61b245"
+ integrity sha512-hf5sNLl8xdRho4UPBOOeoIwT3WhjYcMUQm0zj44EhD6UscMAz72o2udpoDFBgykucdEDGIcd6SXbc/G6zssbzw==
+ dependencies:
+ loader-utils "^1.2.3"
+ schema-utils "^1.0.0"
+
+num2fraction@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"
+ integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=
+
+number-is-nan@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+ integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
+
+oauth-sign@~0.9.0:
+ version "0.9.0"
+ resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
+ integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
+
+object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+ integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
+
+object-copy@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
+ integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw=
+ dependencies:
+ copy-descriptor "^0.1.0"
+ define-property "^0.2.5"
+ kind-of "^3.0.3"
+
+object-inspect@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b"
+ integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==
+
+object-is@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6"
+ integrity sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=
+
+object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.0, object-keys@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
+ integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
+
+object-visit@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
+ integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=
+ dependencies:
+ isobject "^3.0.0"
+
+object.assign@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
+ integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==
+ dependencies:
+ define-properties "^1.1.2"
+ function-bind "^1.1.1"
+ has-symbols "^1.0.0"
+ object-keys "^1.0.11"
+
+object.getownpropertydescriptors@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
+ integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=
+ dependencies:
+ define-properties "^1.1.2"
+ es-abstract "^1.5.1"
+
+object.pick@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+ integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=
+ dependencies:
+ isobject "^3.0.1"
+
+object.values@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.0.tgz#bf6810ef5da3e5325790eaaa2be213ea84624da9"
+ integrity sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==
+ dependencies:
+ define-properties "^1.1.3"
+ es-abstract "^1.12.0"
+ function-bind "^1.1.1"
+ has "^1.0.3"
+
+obuf@^1.0.0, obuf@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e"
+ integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==
+
+on-finished@~2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
+ integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
+ dependencies:
+ ee-first "1.1.1"
+
+on-headers@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f"
+ integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==
+
+once@^1.3.0, once@^1.3.1, once@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+ dependencies:
+ wrappy "1"
+
+onetime@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5"
+ integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==
+ dependencies:
+ mimic-fn "^2.1.0"
+
+open@^7.0.2:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/open/-/open-7.0.3.tgz#db551a1af9c7ab4c7af664139930826138531c48"
+ integrity sha512-sP2ru2v0P290WFfv49Ap8MF6PkzGNnGlAwHweB4WR4mr5d2d0woiCluUeJ218w7/+PmoBy9JmYgD5A4mLcWOFA==
+ dependencies:
+ is-docker "^2.0.0"
+ is-wsl "^2.1.1"
+
+opener@^1.5.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed"
+ integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==
+
+opn@^5.5.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc"
+ integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==
+ dependencies:
+ is-wsl "^1.1.0"
+
+optimize-css-assets-webpack-plugin@^5.0.3:
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.3.tgz#e2f1d4d94ad8c0af8967ebd7cf138dcb1ef14572"
+ integrity sha512-q9fbvCRS6EYtUKKSwI87qm2IxlyJK5b4dygW1rKUBT6mMDhdG5e5bZT63v6tnJR9F9FB/H5a0HTmtw+laUBxKA==
+ dependencies:
+ cssnano "^4.1.10"
+ last-call-webpack-plugin "^3.0.0"
+
+original@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f"
+ integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==
+ dependencies:
+ url-parse "^1.4.3"
+
+os-browserify@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27"
+ integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=
+
+os-homedir@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+ integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
+
+os-locale@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a"
+ integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==
+ dependencies:
+ execa "^1.0.0"
+ lcid "^2.0.0"
+ mem "^4.0.0"
+
+os-tmpdir@^1.0.0, os-tmpdir@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+ integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+
+osenv@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
+ integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
+ dependencies:
+ os-homedir "^1.0.0"
+ os-tmpdir "^1.0.0"
+
+p-defer@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c"
+ integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=
+
+p-finally@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
+ integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
+
+p-finally@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561"
+ integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==
+
+p-is-promise@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e"
+ integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==
+
+p-limit@^1.1.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
+ integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==
+ dependencies:
+ p-try "^1.0.0"
+
+p-limit@^2.0.0, p-limit@^2.2.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537"
+ integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==
+ dependencies:
+ p-try "^2.0.0"
+
+p-limit@^2.2.1, p-limit@^2.2.2:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
+ integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
+ dependencies:
+ p-try "^2.0.0"
+
+p-locate@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
+ integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=
+ dependencies:
+ p-limit "^1.1.0"
+
+p-locate@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
+ integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==
+ dependencies:
+ p-limit "^2.0.0"
+
+p-locate@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
+ integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
+ dependencies:
+ p-limit "^2.2.0"
+
+p-map@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175"
+ integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==
+
+p-map@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d"
+ integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==
+ dependencies:
+ aggregate-error "^3.0.0"
+
+p-retry@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328"
+ integrity sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==
+ dependencies:
+ retry "^0.12.0"
+
+p-try@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
+ integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
+
+p-try@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
+ integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
+
+pako@~1.0.5:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732"
+ integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==
+
+parallel-transform@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc"
+ integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==
+ dependencies:
+ cyclist "^1.0.1"
+ inherits "^2.0.3"
+ readable-stream "^2.1.5"
+
+param-case@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.3.tgz#4be41f8399eff621c56eebb829a5e451d9801238"
+ integrity sha512-VWBVyimc1+QrzappRs7waeN2YmoZFCGXWASRYX1/rGHtXqEcrGEIDm+jqIwFa2fRXNgQEwrxaYuIrX0WcAguTA==
+ dependencies:
+ dot-case "^3.0.3"
+ tslib "^1.10.0"
+
+parent-module@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
+ integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
+ dependencies:
+ callsites "^3.0.0"
+
+parse-asn1@^5.0.0:
+ version "5.1.5"
+ resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e"
+ integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==
+ dependencies:
+ asn1.js "^4.0.0"
+ browserify-aes "^1.0.0"
+ create-hash "^1.1.0"
+ evp_bytestokey "^1.0.0"
+ pbkdf2 "^3.0.3"
+ safe-buffer "^5.1.1"
+
+parse-entities@^1.1.0:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.2.2.tgz#c31bf0f653b6661354f8973559cb86dd1d5edf50"
+ integrity sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==
+ dependencies:
+ character-entities "^1.0.0"
+ character-entities-legacy "^1.0.0"
+ character-reference-invalid "^1.0.0"
+ is-alphanumerical "^1.0.0"
+ is-decimal "^1.0.0"
+ is-hexadecimal "^1.0.0"
+
+parse-json@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
+ integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=
+ dependencies:
+ error-ex "^1.3.1"
+ json-parse-better-errors "^1.0.1"
+
+parse-numeric-range@^0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/parse-numeric-range/-/parse-numeric-range-0.0.2.tgz#b4f09d413c7adbcd987f6e9233c7b4b210c938e4"
+ integrity sha1-tPCdQTx6282Yf26SM8e0shDJOOQ=
+
+parse5@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2"
+ integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==
+
+parseurl@~1.3.2, parseurl@~1.3.3:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
+ integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
+
+pascal-case@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.1.tgz#5ac1975133ed619281e88920973d2cd1f279de5f"
+ integrity sha512-XIeHKqIrsquVTQL2crjq3NfJUxmdLasn3TYOU0VBM+UX2a6ztAWBlJQBePLGY7VHW8+2dRadeIPK5+KImwTxQA==
+ dependencies:
+ no-case "^3.0.3"
+ tslib "^1.10.0"
+
+pascalcase@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
+ integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=
+
+path-browserify@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a"
+ integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==
+
+path-dirname@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
+ integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=
+
+path-exists@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
+ integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=
+
+path-exists@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
+ integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
+
+path-is-inside@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
+ integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=
+
+path-key@^2.0.0, path-key@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
+ integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
+
+path-key@^3.0.0, path-key@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
+ integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
+
+path-parse@^1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
+ integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
+
+path-to-regexp@0.1.7:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
+ integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
+
+path-to-regexp@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d"
+ integrity sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=
+ dependencies:
+ isarray "0.0.1"
+
+path-type@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
+ integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==
+ dependencies:
+ pify "^3.0.0"
+
+path-type@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
+ integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
+
+pbkdf2@^3.0.3:
+ version "3.0.17"
+ resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6"
+ integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==
+ dependencies:
+ create-hash "^1.1.2"
+ create-hmac "^1.1.4"
+ ripemd160 "^2.0.1"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
+performance-now@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
+ integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
+
+picomatch@^2.0.4, picomatch@^2.0.5:
+ version "2.0.7"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6"
+ integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==
+
+picomatch@^2.0.7:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
+ integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
+
+pify@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+ integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
+
+pify@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
+ integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
+
+pify@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
+ integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
+
+pinkie-promise@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
+ integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o=
+ dependencies:
+ pinkie "^2.0.0"
+
+pinkie@^2.0.0:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+ integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
+
+pkg-dir@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3"
+ integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==
+ dependencies:
+ find-up "^3.0.0"
+
+pkg-dir@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
+ integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
+ dependencies:
+ find-up "^4.0.0"
+
+pkg-up@3.1.0, pkg-up@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5"
+ integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==
+ dependencies:
+ find-up "^3.0.0"
+
+pkg-up@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f"
+ integrity sha1-yBmscoBZpGHKscOImivjxJoATX8=
+ dependencies:
+ find-up "^2.1.0"
+
+portfinder@^1.0.25:
+ version "1.0.25"
+ resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca"
+ integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==
+ dependencies:
+ async "^2.6.2"
+ debug "^3.1.1"
+ mkdirp "^0.5.1"
+
+posix-character-classes@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
+ integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
+
+postcss-attribute-case-insensitive@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-4.0.1.tgz#b2a721a0d279c2f9103a36331c88981526428cc7"
+ integrity sha512-L2YKB3vF4PetdTIthQVeT+7YiSzMoNMLLYxPXXppOOP7NoazEAy45sh2LvJ8leCQjfBcfkYQs8TtCcQjeZTp8A==
+ dependencies:
+ postcss "^7.0.2"
+ postcss-selector-parser "^5.0.0"
+
+postcss-calc@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.1.tgz#36d77bab023b0ecbb9789d84dcb23c4941145436"
+ integrity sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ==
+ dependencies:
+ css-unit-converter "^1.1.1"
+ postcss "^7.0.5"
+ postcss-selector-parser "^5.0.0-rc.4"
+ postcss-value-parser "^3.3.1"
+
+postcss-color-functional-notation@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-color-functional-notation/-/postcss-color-functional-notation-2.0.1.tgz#5efd37a88fbabeb00a2966d1e53d98ced93f74e0"
+ integrity sha512-ZBARCypjEDofW4P6IdPVTLhDNXPRn8T2s1zHbZidW6rPaaZvcnCS2soYFIQJrMZSxiePJ2XIYTlcb2ztr/eT2g==
+ dependencies:
+ postcss "^7.0.2"
+ postcss-values-parser "^2.0.0"
+
+postcss-color-gray@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-color-gray/-/postcss-color-gray-5.0.0.tgz#532a31eb909f8da898ceffe296fdc1f864be8547"
+ integrity sha512-q6BuRnAGKM/ZRpfDascZlIZPjvwsRye7UDNalqVz3s7GDxMtqPY6+Q871liNxsonUw8oC61OG+PSaysYpl1bnw==
+ dependencies:
+ "@csstools/convert-colors" "^1.4.0"
+ postcss "^7.0.5"
+ postcss-values-parser "^2.0.0"
+
+postcss-color-hex-alpha@^5.0.3:
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-5.0.3.tgz#a8d9ca4c39d497c9661e374b9c51899ef0f87388"
+ integrity sha512-PF4GDel8q3kkreVXKLAGNpHKilXsZ6xuu+mOQMHWHLPNyjiUBOr75sp5ZKJfmv1MCus5/DWUGcK9hm6qHEnXYw==
+ dependencies:
+ postcss "^7.0.14"
+ postcss-values-parser "^2.0.1"
+
+postcss-color-mod-function@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/postcss-color-mod-function/-/postcss-color-mod-function-3.0.3.tgz#816ba145ac11cc3cb6baa905a75a49f903e4d31d"
+ integrity sha512-YP4VG+xufxaVtzV6ZmhEtc+/aTXH3d0JLpnYfxqTvwZPbJhWqp8bSY3nfNzNRFLgB4XSaBA82OE4VjOOKpCdVQ==
+ dependencies:
+ "@csstools/convert-colors" "^1.4.0"
+ postcss "^7.0.2"
+ postcss-values-parser "^2.0.0"
+
+postcss-color-rebeccapurple@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-4.0.1.tgz#c7a89be872bb74e45b1e3022bfe5748823e6de77"
+ integrity sha512-aAe3OhkS6qJXBbqzvZth2Au4V3KieR5sRQ4ptb2b2O8wgvB3SJBsdG+jsn2BZbbwekDG8nTfcCNKcSfe/lEy8g==
+ dependencies:
+ postcss "^7.0.2"
+ postcss-values-parser "^2.0.0"
+
+postcss-colormin@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381"
+ integrity sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==
+ dependencies:
+ browserslist "^4.0.0"
+ color "^3.0.0"
+ has "^1.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-convert-values@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f"
+ integrity sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==
+ dependencies:
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-custom-media@^7.0.8:
+ version "7.0.8"
+ resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-7.0.8.tgz#fffd13ffeffad73621be5f387076a28b00294e0c"
+ integrity sha512-c9s5iX0Ge15o00HKbuRuTqNndsJUbaXdiNsksnVH8H4gdc+zbLzr/UasOwNG6CTDpLFekVY4672eWdiiWu2GUg==
+ dependencies:
+ postcss "^7.0.14"
+
+postcss-custom-properties@^8.0.11:
+ version "8.0.11"
+ resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-8.0.11.tgz#2d61772d6e92f22f5e0d52602df8fae46fa30d97"
+ integrity sha512-nm+o0eLdYqdnJ5abAJeXp4CEU1c1k+eB2yMCvhgzsds/e0umabFrN6HoTy/8Q4K5ilxERdl/JD1LO5ANoYBeMA==
+ dependencies:
+ postcss "^7.0.17"
+ postcss-values-parser "^2.0.1"
+
+postcss-custom-selectors@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-5.1.2.tgz#64858c6eb2ecff2fb41d0b28c9dd7b3db4de7fba"
+ integrity sha512-DSGDhqinCqXqlS4R7KGxL1OSycd1lydugJ1ky4iRXPHdBRiozyMHrdu0H3o7qNOCiZwySZTUI5MV0T8QhCLu+w==
+ dependencies:
+ postcss "^7.0.2"
+ postcss-selector-parser "^5.0.0-rc.3"
+
+postcss-dir-pseudo-class@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-5.0.0.tgz#6e3a4177d0edb3abcc85fdb6fbb1c26dabaeaba2"
+ integrity sha512-3pm4oq8HYWMZePJY+5ANriPs3P07q+LW6FAdTlkFH2XqDdP4HeeJYMOzn0HYLhRSjBO3fhiqSwwU9xEULSrPgw==
+ dependencies:
+ postcss "^7.0.2"
+ postcss-selector-parser "^5.0.0-rc.3"
+
+postcss-discard-comments@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033"
+ integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==
+ dependencies:
+ postcss "^7.0.0"
+
+postcss-discard-duplicates@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb"
+ integrity sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==
+ dependencies:
+ postcss "^7.0.0"
+
+postcss-discard-empty@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765"
+ integrity sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==
+ dependencies:
+ postcss "^7.0.0"
+
+postcss-discard-overridden@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57"
+ integrity sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==
+ dependencies:
+ postcss "^7.0.0"
+
+postcss-double-position-gradients@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-double-position-gradients/-/postcss-double-position-gradients-1.0.0.tgz#fc927d52fddc896cb3a2812ebc5df147e110522e"
+ integrity sha512-G+nV8EnQq25fOI8CH/B6krEohGWnF5+3A6H/+JEpOncu5dCnkS1QQ6+ct3Jkaepw1NGVqqOZH6lqrm244mCftA==
+ dependencies:
+ postcss "^7.0.5"
+ postcss-values-parser "^2.0.0"
+
+postcss-env-function@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-env-function/-/postcss-env-function-2.0.2.tgz#0f3e3d3c57f094a92c2baf4b6241f0b0da5365d7"
+ integrity sha512-rwac4BuZlITeUbiBq60h/xbLzXY43qOsIErngWa4l7Mt+RaSkT7QBjXVGTcBHupykkblHMDrBFh30zchYPaOUw==
+ dependencies:
+ postcss "^7.0.2"
+ postcss-values-parser "^2.0.0"
+
+postcss-focus-visible@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-focus-visible/-/postcss-focus-visible-4.0.0.tgz#477d107113ade6024b14128317ade2bd1e17046e"
+ integrity sha512-Z5CkWBw0+idJHSV6+Bgf2peDOFf/x4o+vX/pwcNYrWpXFrSfTkQ3JQ1ojrq9yS+upnAlNRHeg8uEwFTgorjI8g==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-focus-within@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-focus-within/-/postcss-focus-within-3.0.0.tgz#763b8788596cee9b874c999201cdde80659ef680"
+ integrity sha512-W0APui8jQeBKbCGZudW37EeMCjDeVxKgiYfIIEo8Bdh5SpB9sxds/Iq8SEuzS0Q4YFOlG7EPFulbbxujpkrV2w==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-font-variant@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-font-variant/-/postcss-font-variant-4.0.0.tgz#71dd3c6c10a0d846c5eda07803439617bbbabacc"
+ integrity sha512-M8BFYKOvCrI2aITzDad7kWuXXTm0YhGdP9Q8HanmN4EF1Hmcgs1KK5rSHylt/lUJe8yLxiSwWAHdScoEiIxztg==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-gap-properties@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-gap-properties/-/postcss-gap-properties-2.0.0.tgz#431c192ab3ed96a3c3d09f2ff615960f902c1715"
+ integrity sha512-QZSqDaMgXCHuHTEzMsS2KfVDOq7ZFiknSpkrPJY6jmxbugUPTuSzs/vuE5I3zv0WAS+3vhrlqhijiprnuQfzmg==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-image-set-function@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-image-set-function/-/postcss-image-set-function-3.0.1.tgz#28920a2f29945bed4c3198d7df6496d410d3f288"
+ integrity sha512-oPTcFFip5LZy8Y/whto91L9xdRHCWEMs3e1MdJxhgt4jy2WYXfhkng59fH5qLXSCPN8k4n94p1Czrfe5IOkKUw==
+ dependencies:
+ postcss "^7.0.2"
+ postcss-values-parser "^2.0.0"
+
+postcss-initial@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-initial/-/postcss-initial-3.0.1.tgz#99d319669a13d6c06ef8e70d852f68cb1b399b61"
+ integrity sha512-I2Sz83ZSHybMNh02xQDK609lZ1/QOyYeuizCjzEhlMgeV/HcDJapQiH4yTqLjZss0X6/6VvKFXUeObaHpJoINw==
+ dependencies:
+ lodash.template "^4.5.0"
+ postcss "^7.0.2"
+
+postcss-lab-function@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-lab-function/-/postcss-lab-function-2.0.1.tgz#bb51a6856cd12289ab4ae20db1e3821ef13d7d2e"
+ integrity sha512-whLy1IeZKY+3fYdqQFuDBf8Auw+qFuVnChWjmxm/UhHWqNHZx+B99EwxTvGYmUBqe3Fjxs4L1BoZTJmPu6usVg==
+ dependencies:
+ "@csstools/convert-colors" "^1.4.0"
+ postcss "^7.0.2"
+ postcss-values-parser "^2.0.0"
+
+postcss-load-config@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003"
+ integrity sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q==
+ dependencies:
+ cosmiconfig "^5.0.0"
+ import-cwd "^2.0.0"
+
+postcss-loader@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d"
+ integrity sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==
+ dependencies:
+ loader-utils "^1.1.0"
+ postcss "^7.0.0"
+ postcss-load-config "^2.0.0"
+ schema-utils "^1.0.0"
+
+postcss-logical@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-logical/-/postcss-logical-3.0.0.tgz#2495d0f8b82e9f262725f75f9401b34e7b45d5b5"
+ integrity sha512-1SUKdJc2vuMOmeItqGuNaC+N8MzBWFWEkAnRnLpFYj1tGGa7NqyVBujfRtgNa2gXR+6RkGUiB2O5Vmh7E2RmiA==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-media-minmax@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-media-minmax/-/postcss-media-minmax-4.0.0.tgz#b75bb6cbc217c8ac49433e12f22048814a4f5ed5"
+ integrity sha512-fo9moya6qyxsjbFAYl97qKO9gyre3qvbMnkOZeZwlsW6XYFsvs2DMGDlchVLfAd8LHPZDxivu/+qW2SMQeTHBw==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-merge-longhand@^4.0.11:
+ version "4.0.11"
+ resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24"
+ integrity sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==
+ dependencies:
+ css-color-names "0.0.4"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+ stylehacks "^4.0.0"
+
+postcss-merge-rules@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650"
+ integrity sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==
+ dependencies:
+ browserslist "^4.0.0"
+ caniuse-api "^3.0.0"
+ cssnano-util-same-parent "^4.0.0"
+ postcss "^7.0.0"
+ postcss-selector-parser "^3.0.0"
+ vendors "^1.0.0"
+
+postcss-minify-font-values@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6"
+ integrity sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==
+ dependencies:
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-minify-gradients@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471"
+ integrity sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==
+ dependencies:
+ cssnano-util-get-arguments "^4.0.0"
+ is-color-stop "^1.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-minify-params@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874"
+ integrity sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==
+ dependencies:
+ alphanum-sort "^1.0.0"
+ browserslist "^4.0.0"
+ cssnano-util-get-arguments "^4.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+ uniqs "^2.0.0"
+
+postcss-minify-selectors@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8"
+ integrity sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==
+ dependencies:
+ alphanum-sort "^1.0.0"
+ has "^1.0.0"
+ postcss "^7.0.0"
+ postcss-selector-parser "^3.0.0"
+
+postcss-modules-extract-imports@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e"
+ integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==
+ dependencies:
+ postcss "^7.0.5"
+
+postcss-modules-local-by-default@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz#e8a6561be914aaf3c052876377524ca90dbb7915"
+ integrity sha512-jM/V8eqM4oJ/22j0gx4jrp63GSvDH6v86OqyTHHUvk4/k1vceipZsaymiZ5PvocqZOl5SFHiFJqjs3la0wnfIQ==
+ dependencies:
+ icss-utils "^4.1.1"
+ postcss "^7.0.16"
+ postcss-selector-parser "^6.0.2"
+ postcss-value-parser "^4.0.0"
+
+postcss-modules-scope@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee"
+ integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==
+ dependencies:
+ postcss "^7.0.6"
+ postcss-selector-parser "^6.0.0"
+
+postcss-modules-values@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10"
+ integrity sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==
+ dependencies:
+ icss-utils "^4.0.0"
+ postcss "^7.0.6"
+
+postcss-nesting@^7.0.0:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-7.0.1.tgz#b50ad7b7f0173e5b5e3880c3501344703e04c052"
+ integrity sha512-FrorPb0H3nuVq0Sff7W2rnc3SmIcruVC6YwpcS+k687VxyxO33iE1amna7wHuRVzM8vfiYofXSBHNAZ3QhLvYg==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-normalize-charset@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4"
+ integrity sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==
+ dependencies:
+ postcss "^7.0.0"
+
+postcss-normalize-display-values@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a"
+ integrity sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==
+ dependencies:
+ cssnano-util-get-match "^4.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-normalize-positions@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f"
+ integrity sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==
+ dependencies:
+ cssnano-util-get-arguments "^4.0.0"
+ has "^1.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-normalize-repeat-style@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c"
+ integrity sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==
+ dependencies:
+ cssnano-util-get-arguments "^4.0.0"
+ cssnano-util-get-match "^4.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-normalize-string@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c"
+ integrity sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==
+ dependencies:
+ has "^1.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-normalize-timing-functions@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9"
+ integrity sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==
+ dependencies:
+ cssnano-util-get-match "^4.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-normalize-unicode@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb"
+ integrity sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==
+ dependencies:
+ browserslist "^4.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-normalize-url@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1"
+ integrity sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==
+ dependencies:
+ is-absolute-url "^2.0.0"
+ normalize-url "^3.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-normalize-whitespace@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82"
+ integrity sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==
+ dependencies:
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-ordered-values@^4.1.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee"
+ integrity sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==
+ dependencies:
+ cssnano-util-get-arguments "^4.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-overflow-shorthand@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-overflow-shorthand/-/postcss-overflow-shorthand-2.0.0.tgz#31ecf350e9c6f6ddc250a78f0c3e111f32dd4c30"
+ integrity sha512-aK0fHc9CBNx8jbzMYhshZcEv8LtYnBIRYQD5i7w/K/wS9c2+0NSR6B3OVMu5y0hBHYLcMGjfU+dmWYNKH0I85g==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-page-break@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-page-break/-/postcss-page-break-2.0.0.tgz#add52d0e0a528cabe6afee8b46e2abb277df46bf"
+ integrity sha512-tkpTSrLpfLfD9HvgOlJuigLuk39wVTbbd8RKcy8/ugV2bNBUW3xU+AIqyxhDrQr1VUj1RmyJrBn1YWrqUm9zAQ==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-place@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-place/-/postcss-place-4.0.1.tgz#e9f39d33d2dc584e46ee1db45adb77ca9d1dcc62"
+ integrity sha512-Zb6byCSLkgRKLODj/5mQugyuj9bvAAw9LqJJjgwz5cYryGeXfFZfSXoP1UfveccFmeq0b/2xxwcTEVScnqGxBg==
+ dependencies:
+ postcss "^7.0.2"
+ postcss-values-parser "^2.0.0"
+
+postcss-preset-env@^6.7.0:
+ version "6.7.0"
+ resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-6.7.0.tgz#c34ddacf8f902383b35ad1e030f178f4cdf118a5"
+ integrity sha512-eU4/K5xzSFwUFJ8hTdTQzo2RBLbDVt83QZrAvI07TULOkmyQlnYlpwep+2yIK+K+0KlZO4BvFcleOCCcUtwchg==
+ dependencies:
+ autoprefixer "^9.6.1"
+ browserslist "^4.6.4"
+ caniuse-lite "^1.0.30000981"
+ css-blank-pseudo "^0.1.4"
+ css-has-pseudo "^0.10.0"
+ css-prefers-color-scheme "^3.1.1"
+ cssdb "^4.4.0"
+ postcss "^7.0.17"
+ postcss-attribute-case-insensitive "^4.0.1"
+ postcss-color-functional-notation "^2.0.1"
+ postcss-color-gray "^5.0.0"
+ postcss-color-hex-alpha "^5.0.3"
+ postcss-color-mod-function "^3.0.3"
+ postcss-color-rebeccapurple "^4.0.1"
+ postcss-custom-media "^7.0.8"
+ postcss-custom-properties "^8.0.11"
+ postcss-custom-selectors "^5.1.2"
+ postcss-dir-pseudo-class "^5.0.0"
+ postcss-double-position-gradients "^1.0.0"
+ postcss-env-function "^2.0.2"
+ postcss-focus-visible "^4.0.0"
+ postcss-focus-within "^3.0.0"
+ postcss-font-variant "^4.0.0"
+ postcss-gap-properties "^2.0.0"
+ postcss-image-set-function "^3.0.1"
+ postcss-initial "^3.0.0"
+ postcss-lab-function "^2.0.1"
+ postcss-logical "^3.0.0"
+ postcss-media-minmax "^4.0.0"
+ postcss-nesting "^7.0.0"
+ postcss-overflow-shorthand "^2.0.0"
+ postcss-page-break "^2.0.0"
+ postcss-place "^4.0.1"
+ postcss-pseudo-class-any-link "^6.0.0"
+ postcss-replace-overflow-wrap "^3.0.0"
+ postcss-selector-matches "^4.0.0"
+ postcss-selector-not "^4.0.0"
+
+postcss-pseudo-class-any-link@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-6.0.0.tgz#2ed3eed393b3702879dec4a87032b210daeb04d1"
+ integrity sha512-lgXW9sYJdLqtmw23otOzrtbDXofUdfYzNm4PIpNE322/swES3VU9XlXHeJS46zT2onFO7V1QFdD4Q9LiZj8mew==
+ dependencies:
+ postcss "^7.0.2"
+ postcss-selector-parser "^5.0.0-rc.3"
+
+postcss-reduce-initial@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df"
+ integrity sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==
+ dependencies:
+ browserslist "^4.0.0"
+ caniuse-api "^3.0.0"
+ has "^1.0.0"
+ postcss "^7.0.0"
+
+postcss-reduce-transforms@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29"
+ integrity sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==
+ dependencies:
+ cssnano-util-get-match "^4.0.0"
+ has "^1.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+
+postcss-replace-overflow-wrap@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-3.0.0.tgz#61b360ffdaedca84c7c918d2b0f0d0ea559ab01c"
+ integrity sha512-2T5hcEHArDT6X9+9dVSPQdo7QHzG4XKclFT8rU5TzJPDN7RIRTbO9c4drUISOVemLj03aezStHCR2AIcr8XLpw==
+ dependencies:
+ postcss "^7.0.2"
+
+postcss-selector-matches@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-selector-matches/-/postcss-selector-matches-4.0.0.tgz#71c8248f917ba2cc93037c9637ee09c64436fcff"
+ integrity sha512-LgsHwQR/EsRYSqlwdGzeaPKVT0Ml7LAT6E75T8W8xLJY62CE4S/l03BWIt3jT8Taq22kXP08s2SfTSzaraoPww==
+ dependencies:
+ balanced-match "^1.0.0"
+ postcss "^7.0.2"
+
+postcss-selector-not@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-selector-not/-/postcss-selector-not-4.0.0.tgz#c68ff7ba96527499e832724a2674d65603b645c0"
+ integrity sha512-W+bkBZRhqJaYN8XAnbbZPLWMvZD1wKTu0UxtFKdhtGjWYmxhkUneoeOhRJKdAE5V7ZTlnbHfCR+6bNwK9e1dTQ==
+ dependencies:
+ balanced-match "^1.0.0"
+ postcss "^7.0.2"
+
+postcss-selector-parser@^3.0.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz#4f875f4afb0c96573d5cf4d74011aee250a7e865"
+ integrity sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=
+ dependencies:
+ dot-prop "^4.1.1"
+ indexes-of "^1.0.1"
+ uniq "^1.0.1"
+
+postcss-selector-parser@^5.0.0, postcss-selector-parser@^5.0.0-rc.3, postcss-selector-parser@^5.0.0-rc.4:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz#249044356697b33b64f1a8f7c80922dddee7195c"
+ integrity sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==
+ dependencies:
+ cssesc "^2.0.0"
+ indexes-of "^1.0.1"
+ uniq "^1.0.1"
+
+postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c"
+ integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==
+ dependencies:
+ cssesc "^3.0.0"
+ indexes-of "^1.0.1"
+ uniq "^1.0.1"
+
+postcss-svgo@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258"
+ integrity sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==
+ dependencies:
+ is-svg "^3.0.0"
+ postcss "^7.0.0"
+ postcss-value-parser "^3.0.0"
+ svgo "^1.0.0"
+
+postcss-unique-selectors@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac"
+ integrity sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==
+ dependencies:
+ alphanum-sort "^1.0.0"
+ postcss "^7.0.0"
+ uniqs "^2.0.0"
+
+postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.1:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281"
+ integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==
+
+postcss-value-parser@^4.0.0:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9"
+ integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==
+
+postcss-value-parser@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d"
+ integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==
+
+postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz#da8b472d901da1e205b47bdc98637b9e9e550e5f"
+ integrity sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg==
+ dependencies:
+ flatten "^1.0.2"
+ indexes-of "^1.0.1"
+ uniq "^1.0.1"
+
+postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.5, postcss@^7.0.6:
+ version "7.0.18"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233"
+ integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g==
+ dependencies:
+ chalk "^2.4.2"
+ source-map "^0.6.1"
+ supports-color "^6.1.0"
+
+postcss@^7.0.27:
+ version "7.0.27"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9"
+ integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ==
+ dependencies:
+ chalk "^2.4.2"
+ source-map "^0.6.1"
+ supports-color "^6.1.0"
+
+prepend-http@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
+ integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
+
+pretty-error@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
+ integrity sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=
+ dependencies:
+ renderkid "^2.0.1"
+ utila "~0.4"
+
+pretty-time@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e"
+ integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
+
+prism-react-renderer@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.0.2.tgz#3bb9a6a42f76fc049b03266298c7068fdd4b7ea9"
+ integrity sha512-0++pJyRfu4v2OxI/Us/5RLui9ESDkTiLkVCtKuPZYdpB8UQWJpnJQhPrWab053XtsKW3oM0sD69uJ6N9exm1Ag==
+
+prismjs@^1.19.0:
+ version "1.20.0"
+ resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.20.0.tgz#9b685fc480a3514ee7198eac6a3bf5024319ff03"
+ integrity sha512-AEDjSrVNkynnw6A+B1DsFkd6AVdTnp+/WoUixFRULlCLZVRZlVQMVWio/16jv7G1FscUxQxOQhWwApgbnxr6kQ==
+ optionalDependencies:
+ clipboard "^2.0.0"
+
+private@^0.1.8:
+ version "0.1.8"
+ resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
+ integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==
+
+process-nextick-args@~2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
+ integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
+
+process@^0.11.10:
+ version "0.11.10"
+ resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
+ integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
+
+promise-inflight@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
+ integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=
+
+prop-types@^15.5.0, prop-types@^15.5.4, prop-types@^15.6.2:
+ version "15.7.2"
+ resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
+ integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
+ dependencies:
+ loose-envify "^1.4.0"
+ object-assign "^4.1.1"
+ react-is "^16.8.1"
+
+property-information@^5.0.0, property-information@^5.0.1:
+ version "5.2.2"
+ resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.2.2.tgz#20555eafd2296278a682e5a51d5123e7878ecc30"
+ integrity sha512-N2moasZmjn2mjVGIWpaqz5qnz6QyeQSGgGvMtl81gA9cPTWa6wpesRSe/quNnOjUHpvSH1oZx0pdz0EEckLFnA==
+ dependencies:
+ xtend "^4.0.1"
+
+proxy-addr@~2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34"
+ integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==
+ dependencies:
+ forwarded "~0.1.2"
+ ipaddr.js "1.9.0"
+
+prr@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
+ integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY=
+
+psl@^1.1.24:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2"
+ integrity sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==
+
+public-encrypt@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0"
+ integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==
+ dependencies:
+ bn.js "^4.1.0"
+ browserify-rsa "^4.0.0"
+ create-hash "^1.1.0"
+ parse-asn1 "^5.0.0"
+ randombytes "^2.0.1"
+ safe-buffer "^5.1.2"
+
+pump@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909"
+ integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==
+ dependencies:
+ end-of-stream "^1.1.0"
+ once "^1.3.1"
+
+pump@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
+ integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
+ dependencies:
+ end-of-stream "^1.1.0"
+ once "^1.3.1"
+
+pumpify@^1.3.3:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce"
+ integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==
+ dependencies:
+ duplexify "^3.6.0"
+ inherits "^2.0.3"
+ pump "^2.0.0"
+
+punycode@1.3.2:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
+ integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=
+
+punycode@^1.2.4, punycode@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
+ integrity sha1-wNWmOycYgArY4esPpSachN1BhF4=
+
+punycode@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
+ integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
+
+q@^1.1.2:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
+ integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
+
+qs@6.7.0:
+ version "6.7.0"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
+ integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
+
+qs@~6.5.2:
+ version "6.5.2"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
+ integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
+
+query-string@^4.1.0:
+ version "4.3.4"
+ resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
+ integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s=
+ dependencies:
+ object-assign "^4.1.0"
+ strict-uri-encode "^1.0.0"
+
+querystring-es3@^0.2.0, querystring-es3@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
+ integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=
+
+querystring@0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
+ integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=
+
+querystringify@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e"
+ integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==
+
+randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
+ integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==
+ dependencies:
+ safe-buffer "^5.1.0"
+
+randomfill@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458"
+ integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==
+ dependencies:
+ randombytes "^2.0.5"
+ safe-buffer "^5.1.0"
+
+range-parser@^1.2.1, range-parser@~1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
+ integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
+
+raw-body@2.4.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332"
+ integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==
+ dependencies:
+ bytes "3.1.0"
+ http-errors "1.7.2"
+ iconv-lite "0.4.24"
+ unpipe "1.0.0"
+
+rc@^1.2.7:
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
+ integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
+ dependencies:
+ deep-extend "^0.6.0"
+ ini "~1.3.0"
+ minimist "^1.2.0"
+ strip-json-comments "~2.0.1"
+
+react-dev-utils@^10.2.1:
+ version "10.2.1"
+ resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-10.2.1.tgz#f6de325ae25fa4d546d09df4bb1befdc6dd19c19"
+ integrity sha512-XxTbgJnYZmxuPtY3y/UV0D8/65NKkmaia4rXzViknVnZeVlklSh8u6TnaEYPfAi/Gh1TP4mEOXHI6jQOPbeakQ==
+ dependencies:
+ "@babel/code-frame" "7.8.3"
+ address "1.1.2"
+ browserslist "4.10.0"
+ chalk "2.4.2"
+ cross-spawn "7.0.1"
+ detect-port-alt "1.1.6"
+ escape-string-regexp "2.0.0"
+ filesize "6.0.1"
+ find-up "4.1.0"
+ fork-ts-checker-webpack-plugin "3.1.1"
+ global-modules "2.0.0"
+ globby "8.0.2"
+ gzip-size "5.1.1"
+ immer "1.10.0"
+ inquirer "7.0.4"
+ is-root "2.1.0"
+ loader-utils "1.2.3"
+ open "^7.0.2"
+ pkg-up "3.1.0"
+ react-error-overlay "^6.0.7"
+ recursive-readdir "2.2.2"
+ shell-quote "1.7.2"
+ strip-ansi "6.0.0"
+ text-table "0.2.0"
+
+react-dom@^16.13.1:
+ version "16.13.1"
+ resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f"
+ integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+ prop-types "^15.6.2"
+ scheduler "^0.19.1"
+
+react-error-overlay@^6.0.7:
+ version "6.0.7"
+ resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108"
+ integrity sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA==
+
+react-fast-compare@^2.0.2:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9"
+ integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==
+
+react-helmet@^6.0.0-beta:
+ version "6.0.0-beta"
+ resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.0.0-beta.tgz#1f2ac04521951486e4fce3296d0c88aae8cabd5c"
+ integrity sha512-GnNWsokebTe7fe8MH2I/a2dl4THYWhthLBoMaQSRYqW5XbPo881WAJGi+lqRBjyOFryW6zpQluEkBy70zh+h9w==
+ dependencies:
+ object-assign "^4.1.1"
+ prop-types "^15.5.4"
+ react-fast-compare "^2.0.2"
+ react-side-effect "^1.1.0"
+
+react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1:
+ version "16.9.0"
+ resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb"
+ integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==
+
+react-loadable-ssr-addon@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/react-loadable-ssr-addon/-/react-loadable-ssr-addon-0.2.0.tgz#fbf4ebfa9cfd6eadb3c346f0459e1cee01c9cae8"
+ integrity sha512-gTfPaxWZa5mHKeSOE61RpoLe7hyjcJHgNa5m0ZZGV3OCkWsOKlfYgoBxXzu9ENg/ePR/kFd5H3ncF4K5eyyNTQ==
+
+react-loadable@^5.5.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/react-loadable/-/react-loadable-5.5.0.tgz#582251679d3da86c32aae2c8e689c59f1196d8c4"
+ integrity sha512-C8Aui0ZpMd4KokxRdVAm2bQtI03k2RMRNzOB+IipV3yxFTSVICv7WoUr5L9ALB5BmKO1iHgZtWM8EvYG83otdg==
+ dependencies:
+ prop-types "^15.5.0"
+
+react-router-config@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/react-router-config/-/react-router-config-5.1.1.tgz#0f4263d1a80c6b2dc7b9c1902c9526478194a988"
+ integrity sha512-DuanZjaD8mQp1ppHjgnnUnyOlqYXZVjnov/JzFhjLEwd3Z4dYjMSnqrEzzGThH47vpCOqPPwJM2FtthLeJ8Pbg==
+ dependencies:
+ "@babel/runtime" "^7.1.2"
+
+react-router-dom@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.1.2.tgz#06701b834352f44d37fbb6311f870f84c76b9c18"
+ integrity sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew==
+ dependencies:
+ "@babel/runtime" "^7.1.2"
+ history "^4.9.0"
+ loose-envify "^1.3.1"
+ prop-types "^15.6.2"
+ react-router "5.1.2"
+ tiny-invariant "^1.0.2"
+ tiny-warning "^1.0.0"
+
+react-router@5.1.2, react-router@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.1.2.tgz#6ea51d789cb36a6be1ba5f7c0d48dd9e817d3418"
+ integrity sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A==
+ dependencies:
+ "@babel/runtime" "^7.1.2"
+ history "^4.9.0"
+ hoist-non-react-statics "^3.1.0"
+ loose-envify "^1.3.1"
+ mini-create-react-context "^0.3.0"
+ path-to-regexp "^1.7.0"
+ prop-types "^15.6.2"
+ react-is "^16.6.0"
+ tiny-invariant "^1.0.2"
+ tiny-warning "^1.0.0"
+
+react-side-effect@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.2.0.tgz#0e940c78faba0c73b9b0eba9cd3dda8dfb7e7dae"
+ integrity sha512-v1ht1aHg5k/thv56DRcjw+WtojuuDHFUgGfc+bFHOWsF4ZK6C2V57DO0Or0GPsg6+LSTE0M6Ry/gfzhzSwbc5w==
+ dependencies:
+ shallowequal "^1.0.1"
+
+react-toggle@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/react-toggle/-/react-toggle-4.1.1.tgz#2317f67bf918ea3508a96b09dd383efd9da572af"
+ integrity sha512-+wXlMcSpg8SmnIXauMaZiKpR+r2wp2gMUteroejp2UTSqGTVvZLN+m9EhMzFARBKEw7KpQOwzCyfzeHeAndQGw==
+ dependencies:
+ classnames "^2.2.5"
+
+react@^16.13.1:
+ version "16.13.1"
+ resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e"
+ integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+ prop-types "^15.6.2"
+
+"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
+ integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~2.0.0"
+ safe-buffer "~5.1.1"
+ string_decoder "~1.1.1"
+ util-deprecate "~1.0.1"
+
+readable-stream@^3.0.6, readable-stream@^3.1.1:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc"
+ integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==
+ dependencies:
+ inherits "^2.0.3"
+ string_decoder "^1.1.1"
+ util-deprecate "^1.0.1"
+
+readdirp@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525"
+ integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==
+ dependencies:
+ graceful-fs "^4.1.11"
+ micromatch "^3.1.10"
+ readable-stream "^2.0.2"
+
+readdirp@~3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17"
+ integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==
+ dependencies:
+ picomatch "^2.0.7"
+
+rechoir@^0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
+ integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=
+ dependencies:
+ resolve "^1.1.6"
+
+recursive-readdir@2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f"
+ integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==
+ dependencies:
+ minimatch "3.0.4"
+
+reduce@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/reduce/-/reduce-1.0.2.tgz#0cd680ad3ffe0b060e57a5c68bdfce37168d361b"
+ integrity sha512-xX7Fxke/oHO5IfZSk77lvPa/7bjMh9BuCk4OOoX5XTXrM7s0Z+MkPfSDfz0q7r91BhhGSs8gii/VEN/7zhCPpQ==
+ dependencies:
+ object-keys "^1.1.0"
+
+regenerate-unicode-properties@^8.2.0:
+ version "8.2.0"
+ resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec"
+ integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==
+ dependencies:
+ regenerate "^1.4.0"
+
+regenerate@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
+ integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==
+
+regenerator-runtime@^0.13.2:
+ version "0.13.3"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5"
+ integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==
+
+regenerator-runtime@^0.13.4:
+ version "0.13.5"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697"
+ integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==
+
+regenerator-transform@^0.14.2:
+ version "0.14.4"
+ resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.4.tgz#5266857896518d1616a78a0479337a30ea974cc7"
+ integrity sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==
+ dependencies:
+ "@babel/runtime" "^7.8.4"
+ private "^0.1.8"
+
+regex-not@^1.0.0, regex-not@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
+ integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==
+ dependencies:
+ extend-shallow "^3.0.2"
+ safe-regex "^1.1.0"
+
+regexp.prototype.flags@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c"
+ integrity sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==
+ dependencies:
+ define-properties "^1.1.2"
+
+regexpu-core@^4.7.0:
+ version "4.7.0"
+ resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938"
+ integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==
+ dependencies:
+ regenerate "^1.4.0"
+ regenerate-unicode-properties "^8.2.0"
+ regjsgen "^0.5.1"
+ regjsparser "^0.6.4"
+ unicode-match-property-ecmascript "^1.0.4"
+ unicode-match-property-value-ecmascript "^1.2.0"
+
+regjsgen@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c"
+ integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==
+
+regjsparser@^0.6.4:
+ version "0.6.4"
+ resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272"
+ integrity sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==
+ dependencies:
+ jsesc "~0.5.0"
+
+rehype-parse@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-6.0.2.tgz#aeb3fdd68085f9f796f1d3137ae2b85a98406964"
+ integrity sha512-0S3CpvpTAgGmnz8kiCyFLGuW5yA4OQhyNTm/nwPopZ7+PI11WnGl1TTWTGv/2hPEe/g2jRLlhVVSsoDH8waRug==
+ dependencies:
+ hast-util-from-parse5 "^5.0.0"
+ parse5 "^5.0.0"
+ xtend "^4.0.0"
+
+relateurl@^0.2.7:
+ version "0.2.7"
+ resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
+ integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=
+
+remark-admonitions@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/remark-admonitions/-/remark-admonitions-1.2.1.tgz#87caa1a442aa7b4c0cafa04798ed58a342307870"
+ integrity sha512-Ji6p68VDvD+H1oS95Fdx9Ar5WA2wcDA4kwrrhVU7fGctC6+d3uiMICu7w7/2Xld+lnU7/gi+432+rRbup5S8ow==
+ dependencies:
+ rehype-parse "^6.0.2"
+ unified "^8.4.2"
+ unist-util-visit "^2.0.1"
+
+remark-emoji@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/remark-emoji/-/remark-emoji-2.1.0.tgz#69165d1181b98a54ad5d9ef811003d53d7ebc7db"
+ integrity sha512-lDddGsxXURV01WS9WAiS9rO/cedO1pvr9tahtLhr6qCGFhHG4yZSJW3Ha4Nw9Uk1hLNmUBtPC0+m45Ms+xEitg==
+ dependencies:
+ emoticon "^3.2.0"
+ node-emoji "^1.10.0"
+ unist-util-visit "^2.0.2"
+
+remark-mdx@^1.5.8:
+ version "1.5.8"
+ resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-1.5.8.tgz#81fd9085e56ea534b977d08d6f170899138b3f38"
+ integrity sha512-wtqqsDuO/mU/ucEo/CDp0L8SPdS2oOE6PRsMm+lQ9TLmqgep4MBmyH8bLpoc8Wf7yjNmae/5yBzUN1YUvR/SsQ==
+ dependencies:
+ "@babel/core" "7.8.4"
+ "@babel/helper-plugin-utils" "7.8.3"
+ "@babel/plugin-proposal-object-rest-spread" "7.8.3"
+ "@babel/plugin-syntax-jsx" "7.8.3"
+ "@mdx-js/util" "^1.5.8"
+ is-alphabetical "1.0.4"
+ remark-parse "7.0.2"
+ unified "8.4.2"
+
+remark-parse@7.0.2:
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-7.0.2.tgz#41e7170d9c1d96c3d32cf1109600a9ed50dba7cf"
+ integrity sha512-9+my0lQS80IQkYXsMA8Sg6m9QfXYJBnXjWYN5U+kFc5/n69t+XZVXU/ZBYr3cYH8FheEGf1v87rkFDhJ8bVgMA==
+ dependencies:
+ collapse-white-space "^1.0.2"
+ is-alphabetical "^1.0.0"
+ is-decimal "^1.0.0"
+ is-whitespace-character "^1.0.0"
+ is-word-character "^1.0.0"
+ markdown-escapes "^1.0.0"
+ parse-entities "^1.1.0"
+ repeat-string "^1.5.4"
+ state-toggle "^1.0.0"
+ trim "0.0.1"
+ trim-trailing-lines "^1.0.0"
+ unherit "^1.0.4"
+ unist-util-remove-position "^1.0.0"
+ vfile-location "^2.0.0"
+ xtend "^4.0.1"
+
+remark-squeeze-paragraphs@3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-3.0.4.tgz#9fe50c3bf3b572dd88754cd426ada007c0b8dc5f"
+ integrity sha512-Wmz5Yj9q+W1oryo8BV17JrOXZgUKVcpJ2ApE2pwnoHwhFKSk4Wp2PmFNbmJMgYSqAdFwfkoe+TSYop5Fy8wMgA==
+ dependencies:
+ mdast-squeeze-paragraphs "^3.0.0"
+
+remove-trailing-separator@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
+ integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8=
+
+renderkid@^2.0.1:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.3.tgz#380179c2ff5ae1365c522bf2fcfcff01c5b74149"
+ integrity sha512-z8CLQp7EZBPCwCnncgf9C4XAi3WR0dv+uWu/PjIyhhAb5d6IJ/QZqlHFprHeKT+59//V6BNUsLbvN8+2LarxGA==
+ dependencies:
+ css-select "^1.1.0"
+ dom-converter "^0.2"
+ htmlparser2 "^3.3.0"
+ strip-ansi "^3.0.0"
+ utila "^0.4.0"
+
+repeat-element@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
+ integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==
+
+repeat-string@^1.5.4, repeat-string@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+ integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
+
+replace-ext@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
+ integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=
+
+request@^2.87.0:
+ version "2.88.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
+ integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==
+ dependencies:
+ aws-sign2 "~0.7.0"
+ aws4 "^1.8.0"
+ caseless "~0.12.0"
+ combined-stream "~1.0.6"
+ extend "~3.0.2"
+ forever-agent "~0.6.1"
+ form-data "~2.3.2"
+ har-validator "~5.1.0"
+ http-signature "~1.2.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.19"
+ oauth-sign "~0.9.0"
+ performance-now "^2.1.0"
+ qs "~6.5.2"
+ safe-buffer "^5.1.2"
+ tough-cookie "~2.4.3"
+ tunnel-agent "^0.6.0"
+ uuid "^3.3.2"
+
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+ integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
+
+"require-like@>= 0.1.1":
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/require-like/-/require-like-0.1.2.tgz#ad6f30c13becd797010c468afa775c0c0a6b47fa"
+ integrity sha1-rW8wwTvs15cBDEaK+ndcDAprR/o=
+
+require-main-filename@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
+ integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=
+
+requires-port@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
+ integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=
+
+resolve-cwd@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a"
+ integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=
+ dependencies:
+ resolve-from "^3.0.0"
+
+resolve-from@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
+ integrity sha1-six699nWiBvItuZTM17rywoYh0g=
+
+resolve-from@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
+ integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
+
+resolve-pathname@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd"
+ integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==
+
+resolve-url@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+ integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
+
+resolve@^1.1.6, resolve@^1.3.2:
+ version "1.12.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6"
+ integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==
+ dependencies:
+ path-parse "^1.0.6"
+
+resolve@^1.8.1:
+ version "1.16.1"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.16.1.tgz#49fac5d8bacf1fd53f200fa51247ae736175832c"
+ integrity sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==
+ dependencies:
+ path-parse "^1.0.6"
+
+restore-cursor@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
+ integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
+ dependencies:
+ onetime "^5.1.0"
+ signal-exit "^3.0.2"
+
+ret@~0.1.10:
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+ integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
+
+retry@^0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b"
+ integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=
+
+reusify@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
+ integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
+
+rgb-regex@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1"
+ integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE=
+
+rgba-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3"
+ integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=
+
+rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3, rimraf@^2.7.1:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
+ integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
+ dependencies:
+ glob "^7.1.3"
+
+rimraf@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
+ integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
+ dependencies:
+ glob "^7.1.3"
+
+ripemd160@^2.0.0, ripemd160@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c"
+ integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==
+ dependencies:
+ hash-base "^3.0.0"
+ inherits "^2.0.1"
+
+run-async@^2.2.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
+ integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA=
+ dependencies:
+ is-promise "^2.1.0"
+
+run-parallel@^1.1.9:
+ version "1.1.9"
+ resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679"
+ integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==
+
+run-queue@^1.0.0, run-queue@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47"
+ integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=
+ dependencies:
+ aproba "^1.1.1"
+
+rx@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"
+ integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=
+
+rxjs@^6.5.3:
+ version "6.5.5"
+ resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec"
+ integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==
+ dependencies:
+ tslib "^1.9.0"
+
+safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
+ integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
+
+safe-regex@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
+ integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4=
+ dependencies:
+ ret "~0.1.10"
+
+"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+sax@^1.2.4, sax@~1.2.4:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
+ integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
+
+scheduler@^0.19.1:
+ version "0.19.1"
+ resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196"
+ integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+
+schema-utils@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
+ integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==
+ dependencies:
+ ajv "^6.1.0"
+ ajv-errors "^1.0.0"
+ ajv-keywords "^3.1.0"
+
+schema-utils@^2.0.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.4.0.tgz#44947c4da4d798a3080ec2343249f9d8e4231fd6"
+ integrity sha512-VJEKOvjynJweKWFgxaikuP22zl9JwvmylH/cW1dIKZyp3DS1adBGaYPtZ6CdBSxtfP0LwQY1gNA4rIMJsnammQ==
+ dependencies:
+ ajv "^6.10.2"
+ ajv-keywords "^3.4.1"
+
+schema-utils@^2.6.4, schema-utils@^2.6.5:
+ version "2.6.6"
+ resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.6.tgz#299fe6bd4a3365dc23d99fd446caff8f1d6c330c"
+ integrity sha512-wHutF/WPSbIi9x6ctjGGk2Hvl0VOz5l3EKEuKbjPlB30mKZUzb9A5k9yEXRX3pwyqVLPvpfZZEllaFq/M718hA==
+ dependencies:
+ ajv "^6.12.0"
+ ajv-keywords "^3.4.1"
+
+section-matter@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/section-matter/-/section-matter-1.0.0.tgz#e9041953506780ec01d59f292a19c7b850b84167"
+ integrity sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==
+ dependencies:
+ extend-shallow "^2.0.1"
+ kind-of "^6.0.0"
+
+select-hose@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
+ integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=
+
+select@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d"
+ integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=
+
+selfsigned@^1.10.7:
+ version "1.10.7"
+ resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.7.tgz#da5819fd049d5574f28e88a9bcc6dbc6e6f3906b"
+ integrity sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==
+ dependencies:
+ node-forge "0.9.0"
+
+semver@7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
+ integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==
+
+semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
+ integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
+
+semver@^6.0.0, semver@^6.3.0:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
+ integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
+
+send@0.17.1:
+ version "0.17.1"
+ resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
+ integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==
+ dependencies:
+ debug "2.6.9"
+ depd "~1.1.2"
+ destroy "~1.0.4"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ fresh "0.5.2"
+ http-errors "~1.7.2"
+ mime "1.6.0"
+ ms "2.1.1"
+ on-finished "~2.3.0"
+ range-parser "~1.2.1"
+ statuses "~1.5.0"
+
+serialize-javascript@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
+ integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==
+
+serve-index@^1.9.1:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239"
+ integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=
+ dependencies:
+ accepts "~1.3.4"
+ batch "0.6.1"
+ debug "2.6.9"
+ escape-html "~1.0.3"
+ http-errors "~1.6.2"
+ mime-types "~2.1.17"
+ parseurl "~1.3.2"
+
+serve-static@1.14.1:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
+ integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==
+ dependencies:
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ parseurl "~1.3.3"
+ send "0.17.1"
+
+set-blocking@^2.0.0, set-blocking@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+ integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
+
+set-value@^2.0.0, set-value@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
+ integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.3"
+ split-string "^3.0.1"
+
+setimmediate@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
+ integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=
+
+setprototypeof@1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
+ integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==
+
+setprototypeof@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
+ integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
+
+sha.js@^2.4.0, sha.js@^2.4.8:
+ version "2.4.11"
+ resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7"
+ integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==
+ dependencies:
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+shallowequal@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
+ integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==
+
+shebang-command@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
+ integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
+ dependencies:
+ shebang-regex "^1.0.0"
+
+shebang-command@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
+ integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
+ dependencies:
+ shebang-regex "^3.0.0"
+
+shebang-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
+ integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
+
+shebang-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
+ integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
+
+shell-quote@1.7.2:
+ version "1.7.2"
+ resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
+ integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==
+
+shelljs@^0.8.3:
+ version "0.8.3"
+ resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
+ integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==
+ dependencies:
+ glob "^7.0.0"
+ interpret "^1.0.0"
+ rechoir "^0.6.2"
+
+signal-exit@^3.0.0, signal-exit@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+ integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
+
+simple-swizzle@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
+ integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=
+ dependencies:
+ is-arrayish "^0.3.1"
+
+sitemap@^3.2.2:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-3.2.2.tgz#3f77c358fa97b555c879e457098e39910095c62b"
+ integrity sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg==
+ dependencies:
+ lodash.chunk "^4.2.0"
+ lodash.padstart "^4.6.1"
+ whatwg-url "^7.0.0"
+ xmlbuilder "^13.0.0"
+
+slash@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
+ integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=
+
+slash@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
+ integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
+
+snapdragon-node@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
+ integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==
+ dependencies:
+ define-property "^1.0.0"
+ isobject "^3.0.0"
+ snapdragon-util "^3.0.1"
+
+snapdragon-util@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
+ integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==
+ dependencies:
+ kind-of "^3.2.0"
+
+snapdragon@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
+ integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==
+ dependencies:
+ base "^0.11.1"
+ debug "^2.2.0"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ map-cache "^0.2.2"
+ source-map "^0.5.6"
+ source-map-resolve "^0.5.0"
+ use "^3.1.0"
+
+sockjs-client@1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5"
+ integrity sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==
+ dependencies:
+ debug "^3.2.5"
+ eventsource "^1.0.7"
+ faye-websocket "~0.11.1"
+ inherits "^2.0.3"
+ json3 "^3.3.2"
+ url-parse "^1.4.3"
+
+sockjs@0.3.19:
+ version "0.3.19"
+ resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d"
+ integrity sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==
+ dependencies:
+ faye-websocket "^0.10.0"
+ uuid "^3.0.1"
+
+sort-keys@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
+ integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0=
+ dependencies:
+ is-plain-obj "^1.0.0"
+
+source-list-map@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
+ integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==
+
+source-map-resolve@^0.5.0:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
+ integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==
+ dependencies:
+ atob "^2.1.1"
+ decode-uri-component "^0.2.0"
+ resolve-url "^0.2.1"
+ source-map-url "^0.4.0"
+ urix "^0.1.0"
+
+source-map-support@~0.5.12:
+ version "0.5.13"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
+ integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
+source-map-url@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
+ integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
+
+source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+ integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
+
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+ integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+
+space-separated-tokens@^1.0.0:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.4.tgz#27910835ae00d0adfcdbd0ad7e611fb9544351fa"
+ integrity sha512-UyhMSmeIqZrQn2UdjYpxEkwY9JUrn8pP+7L4f91zRzOQuI8MF1FGLfYU9DKCYeLdo7LXMxwrX5zKFy7eeeVHuA==
+
+spdy-transport@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31"
+ integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==
+ dependencies:
+ debug "^4.1.0"
+ detect-node "^2.0.4"
+ hpack.js "^2.1.6"
+ obuf "^1.1.2"
+ readable-stream "^3.0.6"
+ wbuf "^1.7.3"
+
+spdy@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.1.tgz#6f12ed1c5db7ea4f24ebb8b89ba58c87c08257f2"
+ integrity sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==
+ dependencies:
+ debug "^4.1.0"
+ handle-thing "^2.0.0"
+ http-deceiver "^1.2.7"
+ select-hose "^2.0.0"
+ spdy-transport "^3.0.0"
+
+split-string@^3.0.1, split-string@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
+ integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==
+ dependencies:
+ extend-shallow "^3.0.0"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+ integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
+
+sshpk@^1.7.0:
+ version "1.16.1"
+ resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
+ integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
+ dependencies:
+ asn1 "~0.2.3"
+ assert-plus "^1.0.0"
+ bcrypt-pbkdf "^1.0.0"
+ dashdash "^1.12.0"
+ ecc-jsbn "~0.1.1"
+ getpass "^0.1.1"
+ jsbn "~0.1.0"
+ safer-buffer "^2.0.2"
+ tweetnacl "~0.14.0"
+
+ssri@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
+ integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==
+ dependencies:
+ figgy-pudding "^3.5.1"
+
+ssri@^7.0.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/ssri/-/ssri-7.1.0.tgz#92c241bf6de82365b5c7fb4bd76e975522e1294d"
+ integrity sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==
+ dependencies:
+ figgy-pudding "^3.5.1"
+ minipass "^3.1.1"
+
+stable@^0.1.8:
+ version "0.1.8"
+ resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf"
+ integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==
+
+stack-utils@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8"
+ integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==
+
+state-toggle@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.2.tgz#75e93a61944116b4959d665c8db2d243631d6ddc"
+ integrity sha512-8LpelPGR0qQM4PnfLiplOQNJcIN1/r2Gy0xKB2zKnIW2YzPMt2sR4I/+gtPjhN7Svh9kw+zqEg2SFwpBO9iNiw==
+
+static-extend@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
+ integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=
+ dependencies:
+ define-property "^0.2.5"
+ object-copy "^0.1.0"
+
+"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
+ integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
+
+std-env@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/std-env/-/std-env-2.2.1.tgz#2ffa0fdc9e2263e0004c1211966e960948a40f6b"
+ integrity sha512-IjYQUinA3lg5re/YMlwlfhqNRTzMZMqE+pezevdcTaHceqx8ngEi1alX9nNCk9Sc81fy1fLDeQoaCzeiW1yBOQ==
+ dependencies:
+ ci-info "^1.6.0"
+
+stream-browserify@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b"
+ integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==
+ dependencies:
+ inherits "~2.0.1"
+ readable-stream "^2.0.2"
+
+stream-each@^1.1.0:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae"
+ integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==
+ dependencies:
+ end-of-stream "^1.1.0"
+ stream-shift "^1.0.0"
+
+stream-http@^2.7.2:
+ version "2.8.3"
+ resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc"
+ integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==
+ dependencies:
+ builtin-status-codes "^3.0.0"
+ inherits "^2.0.1"
+ readable-stream "^2.3.6"
+ to-arraybuffer "^1.0.0"
+ xtend "^4.0.0"
+
+stream-shift@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
+ integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=
+
+strict-uri-encode@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
+ integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=
+
+string-width@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
+ integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ strip-ansi "^3.0.0"
+
+"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+ integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
+string-width@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
+ integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
+ dependencies:
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.0"
+
+string.prototype.trimleft@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz#6cc47f0d7eb8d62b0f3701611715a3954591d634"
+ integrity sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==
+ dependencies:
+ define-properties "^1.1.3"
+ function-bind "^1.1.1"
+
+string.prototype.trimright@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz#669d164be9df9b6f7559fa8e89945b168a5a6c58"
+ integrity sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==
+ dependencies:
+ define-properties "^1.1.3"
+ function-bind "^1.1.1"
+
+string_decoder@^1.0.0, string_decoder@^1.1.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
+ integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
+ dependencies:
+ safe-buffer "~5.2.0"
+
+string_decoder@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
+ integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
+ dependencies:
+ safe-buffer "~5.1.0"
+
+stringify-object@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629"
+ integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==
+ dependencies:
+ get-own-enumerable-property-symbols "^3.0.0"
+ is-obj "^1.0.1"
+ is-regexp "^1.0.0"
+
+strip-ansi@6.0.0, strip-ansi@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
+ integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
+ dependencies:
+ ansi-regex "^5.0.0"
+
+strip-ansi@^3.0.0, strip-ansi@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-ansi@^5.1.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
+ integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
+ dependencies:
+ ansi-regex "^4.1.0"
+
+strip-bom-string@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92"
+ integrity sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=
+
+strip-eof@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
+ integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
+
+strip-final-newline@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
+ integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
+
+strip-json-comments@~2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
+ integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
+
+style-to-object@0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.3.0.tgz#b1b790d205991cc783801967214979ee19a76e46"
+ integrity sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==
+ dependencies:
+ inline-style-parser "0.1.1"
+
+style-to-object@^0.2.1:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.2.3.tgz#afcf42bc03846b1e311880c55632a26ad2780bcb"
+ integrity sha512-1d/k4EY2N7jVLOqf2j04dTc37TPOv/hHxZmvpg8Pdh8UYydxeu/C1W1U4vD8alzf5V2Gt7rLsmkr4dxAlDm9ng==
+ dependencies:
+ inline-style-parser "0.1.1"
+
+stylehacks@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5"
+ integrity sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==
+ dependencies:
+ browserslist "^4.0.0"
+ postcss "^7.0.0"
+ postcss-selector-parser "^3.0.0"
+
+supports-color@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+ integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
+
+supports-color@^5.3.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
+ dependencies:
+ has-flag "^3.0.0"
+
+supports-color@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
+ integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==
+ dependencies:
+ has-flag "^3.0.0"
+
+supports-color@^7.0.0, supports-color@^7.1.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1"
+ integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==
+ dependencies:
+ has-flag "^4.0.0"
+
+svgo@^1.0.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.0.tgz#bae51ba95ded9a33a36b7c46ce9c359ae9154313"
+ integrity sha512-MLfUA6O+qauLDbym+mMZgtXCGRfIxyQoeH6IKVcFslyODEe/ElJNwr0FohQ3xG4C6HK6bk3KYPPXwHVJk3V5NQ==
+ dependencies:
+ chalk "^2.4.1"
+ coa "^2.0.2"
+ css-select "^2.0.0"
+ css-select-base-adapter "^0.1.1"
+ css-tree "1.0.0-alpha.33"
+ csso "^3.5.1"
+ js-yaml "^3.13.1"
+ mkdirp "~0.5.1"
+ object.values "^1.1.0"
+ sax "~1.2.4"
+ stable "^0.1.8"
+ unquote "~1.1.1"
+ util.promisify "~1.0.0"
+
+tapable@^1.0.0, tapable@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
+ integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==
+
+tar@^4:
+ version "4.4.13"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
+ integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
+ dependencies:
+ chownr "^1.1.1"
+ fs-minipass "^1.2.5"
+ minipass "^2.8.6"
+ minizlib "^1.2.1"
+ mkdirp "^0.5.0"
+ safe-buffer "^5.1.2"
+ yallist "^3.0.3"
+
+terser-webpack-plugin@^1.4.3:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c"
+ integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==
+ dependencies:
+ cacache "^12.0.2"
+ find-cache-dir "^2.1.0"
+ is-wsl "^1.1.0"
+ schema-utils "^1.0.0"
+ serialize-javascript "^2.1.2"
+ source-map "^0.6.1"
+ terser "^4.1.2"
+ webpack-sources "^1.4.0"
+ worker-farm "^1.7.0"
+
+terser-webpack-plugin@^2.3.5:
+ version "2.3.5"
+ resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz#5ad971acce5c517440ba873ea4f09687de2f4a81"
+ integrity sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w==
+ dependencies:
+ cacache "^13.0.1"
+ find-cache-dir "^3.2.0"
+ jest-worker "^25.1.0"
+ p-limit "^2.2.2"
+ schema-utils "^2.6.4"
+ serialize-javascript "^2.1.2"
+ source-map "^0.6.1"
+ terser "^4.4.3"
+ webpack-sources "^1.4.3"
+
+terser@^4.1.2:
+ version "4.3.3"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.3.tgz#f626c6779cadd60a3018e072fedeceabe4769db1"
+ integrity sha512-Nzr7dpRjSzMEUS+z2UYQBtzE0LDm5k0Yy8RgLRPy85QUo1TjU5lIOBwzS5/FVAMaVyHZ3WTTU2BuQcMn8KXnNQ==
+ dependencies:
+ commander "^2.20.0"
+ source-map "~0.6.1"
+ source-map-support "~0.5.12"
+
+terser@^4.4.3, terser@^4.6.3:
+ version "4.6.11"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f"
+ integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA==
+ dependencies:
+ commander "^2.20.0"
+ source-map "~0.6.1"
+ source-map-support "~0.5.12"
+
+text-table@0.2.0, text-table@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
+ integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
+
+through2@^2.0.0:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"
+ integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==
+ dependencies:
+ readable-stream "~2.3.6"
+ xtend "~4.0.1"
+
+through@^2.3.6, through@~2.3.4:
+ version "2.3.8"
+ resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+ integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
+
+thunky@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.3.tgz#f5df732453407b09191dae73e2a8cc73f381a826"
+ integrity sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==
+
+timers-browserify@^2.0.4:
+ version "2.0.11"
+ resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f"
+ integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==
+ dependencies:
+ setimmediate "^1.0.4"
+
+timsort@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4"
+ integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=
+
+tiny-emitter@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423"
+ integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==
+
+tiny-invariant@^1.0.2:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.0.6.tgz#b3f9b38835e36a41c843a3b0907a5a7b3755de73"
+ integrity sha512-FOyLWWVjG+aC0UqG76V53yAWdXfH8bO6FNmyZOuUrzDzK8DI3/JRY25UD7+g49JWM1LXwymsKERB+DzI0dTEQA==
+
+tiny-warning@^1.0.0, tiny-warning@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"
+ integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==
+
+tmp@^0.0.33:
+ version "0.0.33"
+ resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
+ integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
+ dependencies:
+ os-tmpdir "~1.0.2"
+
+to-arraybuffer@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
+ integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=
+
+to-factory@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/to-factory/-/to-factory-1.0.0.tgz#8738af8bd97120ad1d4047972ada5563bf9479b1"
+ integrity sha1-hzivi9lxIK0dQEeXKtpVY7+UebE=
+
+to-fast-properties@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
+ integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
+
+to-object-path@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
+ integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=
+ dependencies:
+ kind-of "^3.0.2"
+
+to-regex-range@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
+ integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=
+ dependencies:
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+
+to-regex-range@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
+ dependencies:
+ is-number "^7.0.0"
+
+to-regex@^3.0.1, to-regex@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
+ integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==
+ dependencies:
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ regex-not "^1.0.2"
+ safe-regex "^1.1.0"
+
+toidentifier@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
+ integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
+
+tough-cookie@~2.4.3:
+ version "2.4.3"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
+ integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==
+ dependencies:
+ psl "^1.1.24"
+ punycode "^1.4.1"
+
+tr46@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
+ integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=
+ dependencies:
+ punycode "^2.1.0"
+
+trim-lines@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-1.1.2.tgz#c8adbdbdae21bb5c2766240a661f693afe23e59b"
+ integrity sha512-3GOuyNeTqk3FAqc3jOJtw7FTjYl94XBR5aD9QnDbK/T4CA9sW/J0l9RoaRPE9wyPP7NF331qnHnvJFBJ+IDkmQ==
+
+trim-trailing-lines@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz#d2f1e153161152e9f02fabc670fb40bec2ea2e3a"
+ integrity sha512-MUjYItdrqqj2zpcHFTkMa9WAv4JHTI6gnRQGPFLrt5L9a6tRMiDnIqYl8JBvu2d2Tc3lWJKQwlGCp0K8AvCM+Q==
+
+trim@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd"
+ integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0=
+
+trough@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.4.tgz#3b52b1f13924f460c3fbfd0df69b587dbcbc762e"
+ integrity sha512-tdzBRDGWcI1OpPVmChbdSKhvSVurznZ8X36AYURAcl+0o2ldlCY2XPzyXNNxwJwwyIU+rIglTCG4kxtNKBQH7Q==
+
+tryer@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8"
+ integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==
+
+tslib@^1.10.0:
+ version "1.11.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
+ integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==
+
+tslib@^1.9.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
+ integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
+
+tty-browserify@0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
+ integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=
+
+tunnel-agent@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
+ integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
+ dependencies:
+ safe-buffer "^5.0.1"
+
+tweetnacl@^0.14.3, tweetnacl@~0.14.0:
+ version "0.14.5"
+ resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
+ integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
+
+type-fest@^0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
+ integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
+
+type-is@~1.6.17, type-is@~1.6.18:
+ version "1.6.18"
+ resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
+ integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
+ dependencies:
+ media-typer "0.3.0"
+ mime-types "~2.1.24"
+
+typedarray@^0.0.6:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
+ integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
+
+unherit@^1.0.4:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.2.tgz#14f1f397253ee4ec95cec167762e77df83678449"
+ integrity sha512-W3tMnpaMG7ZY6xe/moK04U9fBhi6wEiCYHUW5Mop/wQHf12+79EQGwxYejNdhEz2mkqkBlGwm7pxmgBKMVUj0w==
+ dependencies:
+ inherits "^2.0.1"
+ xtend "^4.0.1"
+
+unicode-canonical-property-names-ecmascript@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
+ integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==
+
+unicode-match-property-ecmascript@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c"
+ integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==
+ dependencies:
+ unicode-canonical-property-names-ecmascript "^1.0.4"
+ unicode-property-aliases-ecmascript "^1.0.4"
+
+unicode-match-property-value-ecmascript@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531"
+ integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==
+
+unicode-property-aliases-ecmascript@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57"
+ integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==
+
+unified@8.4.2, unified@^8.4.2:
+ version "8.4.2"
+ resolved "https://registry.yarnpkg.com/unified/-/unified-8.4.2.tgz#13ad58b4a437faa2751a4a4c6a16f680c500fff1"
+ integrity sha512-JCrmN13jI4+h9UAyKEoGcDZV+i1E7BLFuG7OsaDvTXI5P0qhHX+vZO/kOhz9jn8HGENDKbwSeB0nVOg4gVStGA==
+ dependencies:
+ bail "^1.0.0"
+ extend "^3.0.0"
+ is-plain-obj "^2.0.0"
+ trough "^1.0.0"
+ vfile "^4.0.0"
+
+union-value@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
+ integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==
+ dependencies:
+ arr-union "^3.1.0"
+ get-value "^2.0.6"
+ is-extendable "^0.1.1"
+ set-value "^2.0.1"
+
+uniq@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
+ integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=
+
+uniqs@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"
+ integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI=
+
+unique-filename@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230"
+ integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==
+ dependencies:
+ unique-slug "^2.0.0"
+
+unique-slug@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c"
+ integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==
+ dependencies:
+ imurmurhash "^0.1.4"
+
+unist-builder@2.0.3, unist-builder@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-2.0.3.tgz#77648711b5d86af0942f334397a33c5e91516436"
+ integrity sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==
+
+unist-util-generated@^1.0.0:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.5.tgz#1e903e68467931ebfaea386dae9ea253628acd42"
+ integrity sha512-1TC+NxQa4N9pNdayCYA1EGUOCAO0Le3fVp7Jzns6lnua/mYgwHo0tz5WUAfrdpNch1RZLHc61VZ1SDgrtNXLSw==
+
+unist-util-is@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-3.0.0.tgz#d9e84381c2468e82629e4a5be9d7d05a2dd324cd"
+ integrity sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==
+
+unist-util-is@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-4.0.0.tgz#85672993f0d88a8bffb45137aba003ee8da11a38"
+ integrity sha512-E5JLUKRQlAYiJmN2PVBdSz01R3rUKRSM00X+0DB/yLqxdLu6wZZkRdTIsxDp9X+bkxh8Eq+O2YYRbZvLZtQT1A==
+
+unist-util-position@^3.0.0:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-3.0.3.tgz#fff942b879538b242096c148153826664b1ca373"
+ integrity sha512-28EpCBYFvnMeq9y/4w6pbnFmCUfzlsc41NJui5c51hOFjBA1fejcwc+5W4z2+0ECVbScG3dURS3JTVqwenzqZw==
+
+unist-util-remove-position@^1.0.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.3.tgz#d91aa8b89b30cb38bad2924da11072faa64fd972"
+ integrity sha512-CtszTlOjP2sBGYc2zcKA/CvNdTdEs3ozbiJ63IPBxh8iZg42SCCb8m04f8z2+V1aSk5a7BxbZKEdoDjadmBkWA==
+ dependencies:
+ unist-util-visit "^1.1.0"
+
+unist-util-remove@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/unist-util-remove/-/unist-util-remove-1.0.3.tgz#58ec193dfa84b52d5a055ffbc58e5444eb8031a3"
+ integrity sha512-mB6nCHCQK0pQffUAcCVmKgIWzG/AXs/V8qpS8K72tMPtOSCMSjDeMc5yN+Ye8rB0FhcE+JvW++o1xRNc0R+++g==
+ dependencies:
+ unist-util-is "^3.0.0"
+
+unist-util-stringify-position@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.1.tgz#de2a2bc8d3febfa606652673a91455b6a36fb9f3"
+ integrity sha512-Zqlf6+FRI39Bah8Q6ZnNGrEHUhwJOkHde2MHVk96lLyftfJJckaPslKgzhVcviXj8KcE9UJM9F+a4JEiBUTYgA==
+ dependencies:
+ "@types/unist" "^2.0.2"
+
+unist-util-visit-parents@^2.0.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz#25e43e55312166f3348cae6743588781d112c1e9"
+ integrity sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==
+ dependencies:
+ unist-util-is "^3.0.0"
+
+unist-util-visit-parents@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-3.0.0.tgz#dd4cdcd86d505ec7a81bdc01bc790f9def742bee"
+ integrity sha512-H3K8d81S4V3XVXVwLvrLGk+R5VILryfUotD06/R/rLsTsPLGjkn6gIP8qEEVITcuIySNYj0ocJLsePjm9F/Vcg==
+ dependencies:
+ "@types/unist" "^2.0.3"
+ unist-util-is "^4.0.0"
+
+unist-util-visit@2.0.2, unist-util-visit@^2.0.0, unist-util-visit@^2.0.1, unist-util-visit@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.2.tgz#3843782a517de3d2357b4c193b24af2d9366afb7"
+ integrity sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==
+ dependencies:
+ "@types/unist" "^2.0.0"
+ unist-util-is "^4.0.0"
+ unist-util-visit-parents "^3.0.0"
+
+unist-util-visit@^1.0.0, unist-util-visit@^1.1.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.4.1.tgz#4724aaa8486e6ee6e26d7ff3c8685960d560b1e3"
+ integrity sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==
+ dependencies:
+ unist-util-visit-parents "^2.0.0"
+
+universalify@^0.1.0:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
+ integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
+
+unpipe@1.0.0, unpipe@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
+ integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
+
+unquote@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544"
+ integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=
+
+unset-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
+ integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=
+ dependencies:
+ has-value "^0.3.1"
+ isobject "^3.0.0"
+
+upath@^1.1.1:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894"
+ integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==
+
+uri-js@^4.2.2:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
+ integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
+ dependencies:
+ punycode "^2.1.0"
+
+urix@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+ integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
+
+url-parse@^1.4.3:
+ version "1.4.7"
+ resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278"
+ integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==
+ dependencies:
+ querystringify "^2.1.1"
+ requires-port "^1.0.0"
+
+url@^0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
+ integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=
+ dependencies:
+ punycode "1.3.2"
+ querystring "0.2.0"
+
+use@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
+ integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
+
+util-deprecate@^1.0.1, util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
+
+util.promisify@1.0.0, util.promisify@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
+ integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==
+ dependencies:
+ define-properties "^1.1.2"
+ object.getownpropertydescriptors "^2.0.3"
+
+util@0.10.3:
+ version "0.10.3"
+ resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9"
+ integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk=
+ dependencies:
+ inherits "2.0.1"
+
+util@^0.11.0:
+ version "0.11.1"
+ resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61"
+ integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==
+ dependencies:
+ inherits "2.0.3"
+
+utila@^0.4.0, utila@~0.4:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c"
+ integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=
+
+utils-merge@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
+ integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
+
+uuid@^3.0.1, uuid@^3.3.2:
+ version "3.3.3"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866"
+ integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==
+
+value-equal@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c"
+ integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==
+
+vary@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
+ integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
+
+vendors@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.3.tgz#a6467781abd366217c050f8202e7e50cc9eef8c0"
+ integrity sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==
+
+verror@1.10.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
+ integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
+ dependencies:
+ assert-plus "^1.0.0"
+ core-util-is "1.0.2"
+ extsprintf "^1.2.0"
+
+vfile-location@^2.0.0:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-2.0.5.tgz#c83eb02f8040228a8d2b3f10e485be3e3433e0a2"
+ integrity sha512-Pa1ey0OzYBkLPxPZI3d9E+S4BmvfVwNAAXrrqGbwTVXWaX2p9kM1zZ+n35UtVM06shmWKH4RPRN8KI80qE3wNQ==
+
+vfile-message@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-2.0.1.tgz#951881861c22fc1eb39f873c0b93e336a64e8f6d"
+ integrity sha512-KtasSV+uVU7RWhUn4Lw+wW1Zl/nW8JWx7JCPps10Y9JRRIDeDXf8wfBLoOSsJLyo27DqMyAi54C6Jf/d6Kr2Bw==
+ dependencies:
+ "@types/unist" "^2.0.2"
+ unist-util-stringify-position "^2.0.0"
+
+vfile@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/vfile/-/vfile-4.0.1.tgz#fc3d43a1c71916034216bf65926d5ee3c64ed60c"
+ integrity sha512-lRHFCuC4SQBFr7Uq91oJDJxlnftoTLQ7eKIpMdubhYcVMho4781a8MWXLy3qZrZ0/STD1kRiKc0cQOHm4OkPeA==
+ dependencies:
+ "@types/unist" "^2.0.0"
+ is-buffer "^2.0.0"
+ replace-ext "1.0.0"
+ unist-util-stringify-position "^2.0.0"
+ vfile-message "^2.0.0"
+
+vm-browserify@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019"
+ integrity sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==
+
+wait-file@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/wait-file/-/wait-file-1.0.5.tgz#377f48795f1765046a41bb0671c142ef8e509ae6"
+ integrity sha512-udLpJY/eOxlrMm3+XD1RLuF2oT9B7J7wiyR5/9xrvQymS6YR6trWvVhzOldHrVbLwyiRmLj9fcvsjzpSXeZHkw==
+ dependencies:
+ "@hapi/joi" "^15.1.0"
+ fs-extra "^8.1.0"
+ rx "^4.1.0"
+
+watchpack@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00"
+ integrity sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==
+ dependencies:
+ chokidar "^2.0.2"
+ graceful-fs "^4.1.2"
+ neo-async "^2.5.0"
+
+wbuf@^1.1.0, wbuf@^1.7.3:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df"
+ integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==
+ dependencies:
+ minimalistic-assert "^1.0.0"
+
+web-namespaces@^1.0.0, web-namespaces@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.3.tgz#9bbf5c99ff0908d2da031f1d732492a96571a83f"
+ integrity sha512-r8sAtNmgR0WKOKOxzuSgk09JsHlpKlB+uHi937qypOu3PZ17UxPrierFKDye/uNHjNTTEshu5PId8rojIPj/tA==
+
+webidl-conversions@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
+ integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==
+
+webpack-bundle-analyzer@^3.6.1:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.7.0.tgz#84da434e89442899b884d9ad38e466d0db02a56f"
+ integrity sha512-mETdjZ30a3Yf+NTB/wqTgACK7rAYQl5uxKK0WVTNmF0sM3Uv8s3R58YZMW7Rhu0Lk2Rmuhdj5dcH5Q76zCDVdA==
+ dependencies:
+ acorn "^7.1.1"
+ acorn-walk "^7.1.1"
+ bfj "^6.1.1"
+ chalk "^2.4.1"
+ commander "^2.18.0"
+ ejs "^2.6.1"
+ express "^4.16.3"
+ filesize "^3.6.1"
+ gzip-size "^5.0.0"
+ lodash "^4.17.15"
+ mkdirp "^0.5.1"
+ opener "^1.5.1"
+ ws "^6.0.0"
+
+webpack-dev-middleware@^3.7.2:
+ version "3.7.2"
+ resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3"
+ integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==
+ dependencies:
+ memory-fs "^0.4.1"
+ mime "^2.4.4"
+ mkdirp "^0.5.1"
+ range-parser "^1.2.1"
+ webpack-log "^2.0.0"
+
+webpack-dev-server@^3.10.3:
+ version "3.10.3"
+ resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz#f35945036813e57ef582c2420ef7b470e14d3af0"
+ integrity sha512-e4nWev8YzEVNdOMcNzNeCN947sWJNd43E5XvsJzbAL08kGc2frm1tQ32hTJslRS+H65LCb/AaUCYU7fjHCpDeQ==
+ dependencies:
+ ansi-html "0.0.7"
+ bonjour "^3.5.0"
+ chokidar "^2.1.8"
+ compression "^1.7.4"
+ connect-history-api-fallback "^1.6.0"
+ debug "^4.1.1"
+ del "^4.1.1"
+ express "^4.17.1"
+ html-entities "^1.2.1"
+ http-proxy-middleware "0.19.1"
+ import-local "^2.0.0"
+ internal-ip "^4.3.0"
+ ip "^1.1.5"
+ is-absolute-url "^3.0.3"
+ killable "^1.0.1"
+ loglevel "^1.6.6"
+ opn "^5.5.0"
+ p-retry "^3.0.1"
+ portfinder "^1.0.25"
+ schema-utils "^1.0.0"
+ selfsigned "^1.10.7"
+ semver "^6.3.0"
+ serve-index "^1.9.1"
+ sockjs "0.3.19"
+ sockjs-client "1.4.0"
+ spdy "^4.0.1"
+ strip-ansi "^3.0.1"
+ supports-color "^6.1.0"
+ url "^0.11.0"
+ webpack-dev-middleware "^3.7.2"
+ webpack-log "^2.0.0"
+ ws "^6.2.1"
+ yargs "12.0.5"
+
+webpack-log@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f"
+ integrity sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==
+ dependencies:
+ ansi-colors "^3.0.0"
+ uuid "^3.3.2"
+
+webpack-merge@^4.2.2:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d"
+ integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==
+ dependencies:
+ lodash "^4.17.15"
+
+webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"
+ integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==
+ dependencies:
+ source-list-map "^2.0.0"
+ source-map "~0.6.1"
+
+webpack@^4.41.2:
+ version "4.42.1"
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.42.1.tgz#ae707baf091f5ca3ef9c38b884287cfe8f1983ef"
+ integrity sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg==
+ dependencies:
+ "@webassemblyjs/ast" "1.9.0"
+ "@webassemblyjs/helper-module-context" "1.9.0"
+ "@webassemblyjs/wasm-edit" "1.9.0"
+ "@webassemblyjs/wasm-parser" "1.9.0"
+ acorn "^6.2.1"
+ ajv "^6.10.2"
+ ajv-keywords "^3.4.1"
+ chrome-trace-event "^1.0.2"
+ enhanced-resolve "^4.1.0"
+ eslint-scope "^4.0.3"
+ json-parse-better-errors "^1.0.2"
+ loader-runner "^2.4.0"
+ loader-utils "^1.2.3"
+ memory-fs "^0.4.1"
+ micromatch "^3.1.10"
+ mkdirp "^0.5.3"
+ neo-async "^2.6.1"
+ node-libs-browser "^2.2.1"
+ schema-utils "^1.0.0"
+ tapable "^1.1.3"
+ terser-webpack-plugin "^1.4.3"
+ watchpack "^1.6.0"
+ webpack-sources "^1.4.1"
+
+webpackbar@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/webpackbar/-/webpackbar-4.0.0.tgz#ee7a87f16077505b5720551af413c8ecd5b1f780"
+ integrity sha512-k1qRoSL/3BVuINzngj09nIwreD8wxV4grcuhHTD8VJgUbGcy8lQSPqv+bM00B7F+PffwIsQ8ISd4mIwRbr23eQ==
+ dependencies:
+ ansi-escapes "^4.2.1"
+ chalk "^2.4.2"
+ consola "^2.10.0"
+ figures "^3.0.0"
+ pretty-time "^1.1.0"
+ std-env "^2.2.1"
+ text-table "^0.2.0"
+ wrap-ansi "^6.0.0"
+
+websocket-driver@>=0.5.1:
+ version "0.7.3"
+ resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9"
+ integrity sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==
+ dependencies:
+ http-parser-js ">=0.4.0 <0.4.11"
+ safe-buffer ">=5.1.0"
+ websocket-extensions ">=0.1.1"
+
+websocket-extensions@>=0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
+ integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==
+
+whatwg-url@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd"
+ integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==
+ dependencies:
+ lodash.sortby "^4.7.0"
+ tr46 "^1.0.1"
+ webidl-conversions "^4.0.2"
+
+which-module@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
+ integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
+
+which@^1.2.9, which@^1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
+ integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
+ dependencies:
+ isexe "^2.0.0"
+
+which@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
+ integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
+ dependencies:
+ isexe "^2.0.0"
+
+wide-align@^1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
+ integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
+ dependencies:
+ string-width "^1.0.2 || 2"
+
+worker-farm@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8"
+ integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==
+ dependencies:
+ errno "~0.1.7"
+
+worker-rpc@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/worker-rpc/-/worker-rpc-0.1.1.tgz#cb565bd6d7071a8f16660686051e969ad32f54d5"
+ integrity sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg==
+ dependencies:
+ microevent.ts "~0.1.1"
+
+wrap-ansi@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
+ integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=
+ dependencies:
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+
+wrap-ansi@^6.0.0:
+ version "6.2.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
+ integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
+ dependencies:
+ ansi-styles "^4.0.0"
+ string-width "^4.1.0"
+ strip-ansi "^6.0.0"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+
+ws@^6.0.0, ws@^6.2.1:
+ version "6.2.1"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb"
+ integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==
+ dependencies:
+ async-limiter "~1.0.0"
+
+xml-js@^1.6.11:
+ version "1.6.11"
+ resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9"
+ integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==
+ dependencies:
+ sax "^1.2.4"
+
+xmlbuilder@^13.0.0:
+ version "13.0.2"
+ resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7"
+ integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==
+
+xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
+ integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
+
+"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
+ integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
+
+yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.0.tgz#906cc2100972dc2625ae78f566a2577230a1d6f7"
+ integrity sha512-6gpP93MR+VOOehKbCPchro3wFZNSNmek8A2kbkOAZLIZAYx1KP/zAqwO0sOHi3xJEb+UBz8NaYt/17UNit1Q9w==
+
+yallist@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
+ integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
+
+yargs-parser@^11.1.1:
+ version "11.1.1"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4"
+ integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==
+ dependencies:
+ camelcase "^5.0.0"
+ decamelize "^1.2.0"
+
+yargs@12.0.5:
+ version "12.0.5"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13"
+ integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==
+ dependencies:
+ cliui "^4.0.0"
+ decamelize "^1.2.0"
+ find-up "^3.0.0"
+ get-caller-file "^1.0.1"
+ os-locale "^3.0.0"
+ require-directory "^2.1.1"
+ require-main-filename "^1.0.1"
+ set-blocking "^2.0.0"
+ string-width "^2.0.0"
+ which-module "^2.0.0"
+ y18n "^3.2.1 || ^4.0.0"
+ yargs-parser "^11.1.1"
+
+zepto@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/zepto/-/zepto-1.2.0.tgz#e127bd9e66fd846be5eab48c1394882f7c0e4f98"
+ integrity sha1-4Se9nmb9hGvl6rSME5SIL3wOT5g=
+
+zwitch@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-1.0.4.tgz#93b1b993b13c8926753a41afaf8f27bbfac6be8b"
+ integrity sha512-YO803/X+13GNaZB7fVopjvHH0uWQKgJkgKnU1YCjxShjKGVuN9PPHHW8g+uFDpkHpSTNi3rCMKMewIcbC1BAYg==
diff --git a/dune-project b/dune-project
index 12bae938..3b3fb563 100755
--- a/dune-project
+++ b/dune-project
@@ -1,4 +1,4 @@
-(lang dune 1.6)
+(lang dune 1.11)
(name "graphql_ppx")
diff --git a/esy.json b/esy.json
index 3bb777ac..85c9fd1d 100644
--- a/esy.json
+++ b/esy.json
@@ -11,17 +11,19 @@
"@opam/yojson": "*",
"@opam/ocaml-migrate-parsetree": ">=1.6.0",
"@opam/ppx_tools_versioned": "5.2.3",
- "@opam/reason": "3.5.2",
+ "@opam/reason": ">=3.6.0",
"@opam/menhir": "*"
},
"devDependencies": {
"@opam/ocamlformat": "*",
"@opam/alcotest": "*",
- "ocaml": "~4.9.0",
- "refmterr": "*"
+ "ocaml": "~4.8.0",
+ "refmterr": "*",
+ "@opam/ocaml-lsp-server": "ocaml/ocaml-lsp:ocaml-lsp-server.opam#a83bd09"
},
"esy": {
"build": [["refmterr", "dune", "build", "-p", "#{self.name}"]],
+ "buildDev": [["refmterr", "dune", "build"]],
"buildsInSource": "_build"
}
}
diff --git a/esy.lock/index.json b/esy.lock/index.json
index 5eb780bb..114284ee 100644
--- a/esy.lock/index.json
+++ b/esy.lock/index.json
@@ -1,59 +1,60 @@
{
- "checksum": "a72e67416ed2a8deced8cf6106ffced0",
- "root": "graphql_ppx@link-dev:./esy.json",
+ "checksum": "85cbe3e537259d1de5ce4893492707b5",
+ "root": "graphql-ppx@link-dev:./esy.json",
"node": {
- "refmterr@3.3.0@d41d8cd9": {
- "id": "refmterr@3.3.0@d41d8cd9",
+ "refmterr@3.3.2@d41d8cd9": {
+ "id": "refmterr@3.3.2@d41d8cd9",
"name": "refmterr",
- "version": "3.3.0",
+ "version": "3.3.2",
"source": {
"type": "install",
"source": [
- "archive:https://registry.npmjs.org/refmterr/-/refmterr-3.3.0.tgz#sha1:45adde80205093c201b491b3c37dd7740c9b036b"
+ "archive:https://registry.npmjs.org/refmterr/-/refmterr-3.3.2.tgz#sha1:0536990e8a9f69684bdaa1e441904da6722fbb5a"
]
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@reason-native/pastel@0.3.0@d41d8cd9",
+ "ocaml@4.8.1000@d41d8cd9", "@reason-native/pastel@0.3.0@d41d8cd9",
"@reason-native/console@0.1.0@d41d8cd9",
- "@opam/re@opam:1.9.0@d4d5e13d", "@opam/dune@opam:2.3.0@3dc35de7",
- "@opam/atdgen@opam:2.0.0@46af0360",
- "@esy-ocaml/reason@3.5.2@d41d8cd9"
+ "@opam/re@opam:1.9.0@d4d5e13d", "@opam/dune@opam:2.5.0@aef1678b",
+ "@opam/atdgen@opam:2.2.1@d73fda11",
+ "@esy-ocaml/reason@3.6.0@d41d8cd9"
],
"devDependencies": []
},
- "ocaml@4.9.0@d41d8cd9": {
- "id": "ocaml@4.9.0@d41d8cd9",
+ "ocaml@4.8.1000@d41d8cd9": {
+ "id": "ocaml@4.8.1000@d41d8cd9",
"name": "ocaml",
- "version": "4.9.0",
+ "version": "4.8.1000",
"source": {
"type": "install",
"source": [
- "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.9.0.tgz#sha1:96d91599d28c6721ea5804f357268da247963683"
+ "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.8.1000.tgz#sha1:abc435b5d4ddea2acba8b2df7efb81e2d1690db1"
]
},
"overrides": [],
"dependencies": [],
"devDependencies": []
},
- "graphql_ppx@link-dev:./esy.json": {
- "id": "graphql_ppx@link-dev:./esy.json",
- "name": "graphql_ppx",
+ "graphql-ppx@link-dev:./esy.json": {
+ "id": "graphql-ppx@link-dev:./esy.json",
+ "name": "graphql-ppx",
"version": "link-dev:./esy.json",
"source": { "type": "link-dev", "path": ".", "manifest": "esy.json" },
"overrides": [],
"dependencies": [
- "@opam/yojson@opam:1.7.0@7056d985", "@opam/result@opam:1.4@dc720aef",
- "@opam/reason@opam:3.5.2@f689c2cb",
+ "@opam/yojson@opam:1.7.0@7056d985", "@opam/result@opam:1.5@6b753c82",
+ "@opam/reason@opam:3.6.0@2da53ff9",
"@opam/ppx_tools_versioned@opam:5.2.3@4994ec80",
- "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7",
- "@opam/menhir@opam:20200211@90483d81",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47",
+ "@opam/menhir@opam:20200612@8d55744c",
+ "@opam/dune@opam:2.5.0@aef1678b"
],
"devDependencies": [
- "refmterr@3.3.0@d41d8cd9", "ocaml@4.9.0@d41d8cd9",
- "@opam/ocamlformat@opam:0.13.0@216ba5f8",
- "@opam/alcotest@opam:1.0.1@412cd081"
+ "refmterr@3.3.2@d41d8cd9", "ocaml@4.8.1000@d41d8cd9",
+ "@opam/ocamlformat@opam:0.14.2@d742ffd5",
+ "@opam/ocaml-lsp-server@github:ocaml/ocaml-lsp:ocaml-lsp-server.opam#a83bd09@d41d8cd9",
+ "@opam/alcotest@opam:1.1.0@dc9260c7"
]
},
"@reason-native/pastel@0.3.0@d41d8cd9": {
@@ -68,8 +69,8 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/re@opam:1.9.0@d4d5e13d",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/reason@3.5.2@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/re@opam:1.9.0@d4d5e13d",
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/reason@3.6.0@d41d8cd9"
],
"devDependencies": []
},
@@ -85,8 +86,8 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
- "@esy-ocaml/reason@3.5.2@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
+ "@esy-ocaml/reason@3.6.0@d41d8cd9"
],
"devDependencies": []
},
@@ -108,14 +109,14 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4",
- "@opam/dune@opam:2.3.0@3dc35de7", "@opam/cppo@opam:1.6.6@f4f83858",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4",
+ "@opam/dune@opam:2.5.0@aef1678b", "@opam/cppo@opam:1.6.6@f4f83858",
"@opam/biniou@opam:1.2.1@d7570399",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4",
- "@opam/dune@opam:2.3.0@3dc35de7", "@opam/biniou@opam:1.2.1@d7570399"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4",
+ "@opam/dune@opam:2.5.0@aef1678b", "@opam/biniou@opam:1.2.1@d7570399"
]
},
"@opam/uutf@opam:1.0.2@4440868f": {
@@ -136,7 +137,7 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uchar@opam:0.0.2@c8218eea",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uchar@opam:0.0.2@c8218eea",
"@opam/topkg@opam:1.0.1@a42c631e",
"@opam/ocamlfind@opam:1.8.1@ff07b0f9",
"@opam/ocamlbuild@opam:0.14.0@6ac75d03",
@@ -144,38 +145,36 @@
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uchar@opam:0.0.2@c8218eea"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uchar@opam:0.0.2@c8218eea"
]
},
- "@opam/uuseg@opam:12.0.0@bf82c4c7": {
- "id": "@opam/uuseg@opam:12.0.0@bf82c4c7",
+ "@opam/uuseg@opam:13.0.0@f60712a7": {
+ "id": "@opam/uuseg@opam:13.0.0@f60712a7",
"name": "@opam/uuseg",
- "version": "opam:12.0.0",
+ "version": "opam:13.0.0",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/1d/1d4487ddf5154e3477e55021b978d58a#md5:1d4487ddf5154e3477e55021b978d58a",
- "archive:https://erratique.ch/software/uuseg/releases/uuseg-12.0.0.tbz#md5:1d4487ddf5154e3477e55021b978d58a"
+ "archive:https://opam.ocaml.org/cache/md5/a0/a07a97fff61da604614ea8da0547ef6a#md5:a07a97fff61da604614ea8da0547ef6a",
+ "archive:https://erratique.ch/software/uuseg/releases/uuseg-13.0.0.tbz#md5:a07a97fff61da604614ea8da0547ef6a"
],
"opam": {
"name": "uuseg",
- "version": "12.0.0",
- "path": "esy.lock/opam/uuseg.12.0.0"
+ "version": "13.0.0",
+ "path": "esy.lock/opam/uuseg.13.0.0"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
- "@opam/uucp@opam:12.0.0@b7d4c3df", "@opam/uchar@opam:0.0.2@c8218eea",
- "@opam/topkg@opam:1.0.1@a42c631e",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
+ "@opam/uucp@opam:13.0.0@e9b515e0", "@opam/topkg@opam:1.0.1@a42c631e",
"@opam/ocamlfind@opam:1.8.1@ff07b0f9",
"@opam/ocamlbuild@opam:0.14.0@6ac75d03",
"@opam/cmdliner@opam:1.0.4@93208aac",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uucp@opam:12.0.0@b7d4c3df",
- "@opam/uchar@opam:0.0.2@c8218eea"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uucp@opam:13.0.0@e9b515e0"
]
},
"@opam/uuidm@opam:0.9.7@bf725775": {
@@ -196,42 +195,40 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/topkg@opam:1.0.1@a42c631e",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/topkg@opam:1.0.1@a42c631e",
"@opam/ocamlfind@opam:1.8.1@ff07b0f9",
"@opam/ocamlbuild@opam:0.14.0@6ac75d03",
"@opam/cmdliner@opam:1.0.4@93208aac",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
- "devDependencies": [ "ocaml@4.9.0@d41d8cd9" ]
+ "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ]
},
- "@opam/uucp@opam:12.0.0@b7d4c3df": {
- "id": "@opam/uucp@opam:12.0.0@b7d4c3df",
+ "@opam/uucp@opam:13.0.0@e9b515e0": {
+ "id": "@opam/uucp@opam:13.0.0@e9b515e0",
"name": "@opam/uucp",
- "version": "opam:12.0.0",
+ "version": "opam:13.0.0",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/cf/cf210ed43375b7f882c0540874e2cb81#md5:cf210ed43375b7f882c0540874e2cb81",
- "archive:https://erratique.ch/software/uucp/releases/uucp-12.0.0.tbz#md5:cf210ed43375b7f882c0540874e2cb81"
+ "archive:https://opam.ocaml.org/cache/md5/07/07e706249ddb2d02f0fa298804d3c739#md5:07e706249ddb2d02f0fa298804d3c739",
+ "archive:https://erratique.ch/software/uucp/releases/uucp-13.0.0.tbz#md5:07e706249ddb2d02f0fa298804d3c739"
],
"opam": {
"name": "uucp",
- "version": "12.0.0",
- "path": "esy.lock/opam/uucp.12.0.0"
+ "version": "13.0.0",
+ "path": "esy.lock/opam/uucp.13.0.0"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
- "@opam/uchar@opam:0.0.2@c8218eea", "@opam/topkg@opam:1.0.1@a42c631e",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
+ "@opam/topkg@opam:1.0.1@a42c631e",
"@opam/ocamlfind@opam:1.8.1@ff07b0f9",
"@opam/ocamlbuild@opam:0.14.0@6ac75d03",
"@opam/cmdliner@opam:1.0.4@93208aac",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
- "devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uchar@opam:0.0.2@c8218eea"
- ]
+ "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ]
},
"@opam/uchar@opam:0.0.2@c8218eea": {
"id": "@opam/uchar@opam:0.0.2@c8218eea",
@@ -251,37 +248,37 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/ocamlbuild@opam:0.14.0@6ac75d03",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/ocamlbuild@opam:0.14.0@6ac75d03",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
- "devDependencies": [ "ocaml@4.9.0@d41d8cd9" ]
+ "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ]
},
- "@opam/tyxml@opam:4.3.0@c1da25f1": {
- "id": "@opam/tyxml@opam:4.3.0@c1da25f1",
+ "@opam/tyxml@opam:4.4.0@1dca5713": {
+ "id": "@opam/tyxml@opam:4.4.0@1dca5713",
"name": "@opam/tyxml",
- "version": "opam:4.3.0",
+ "version": "opam:4.4.0",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/fd/fd834a567f813bf447cab5f4c3a723e2#md5:fd834a567f813bf447cab5f4c3a723e2",
- "archive:https://github.com/ocsigen/tyxml/releases/download/4.3.0/tyxml-4.3.0.tbz#md5:fd834a567f813bf447cab5f4c3a723e2"
+ "archive:https://opam.ocaml.org/cache/sha256/51/516394dd4a5c31726997c51d66aa31cacb91e3c46d4e16c7699130e204042530#sha256:516394dd4a5c31726997c51d66aa31cacb91e3c46d4e16c7699130e204042530",
+ "archive:https://github.com/ocsigen/tyxml/releases/download/4.4.0/tyxml-4.4.0.tbz#sha256:516394dd4a5c31726997c51d66aa31cacb91e3c46d4e16c7699130e204042530"
],
"opam": {
"name": "tyxml",
- "version": "4.3.0",
- "path": "esy.lock/opam/tyxml.4.3.0"
+ "version": "4.4.0",
+ "path": "esy.lock/opam/tyxml.4.4.0"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
"@opam/seq@opam:base@d8d7de1d", "@opam/re@opam:1.9.0@d4d5e13d",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
"@opam/seq@opam:base@d8d7de1d", "@opam/re@opam:1.9.0@d4d5e13d",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "@opam/dune@opam:2.5.0@aef1678b"
]
},
"@opam/topkg@opam:1.0.1@a42c631e": {
@@ -302,12 +299,12 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9",
"@opam/ocamlbuild@opam:0.14.0@6ac75d03",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/ocamlbuild@opam:0.14.0@6ac75d03"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/ocamlbuild@opam:0.14.0@6ac75d03"
]
},
"@opam/stdlib-shims@opam:0.1.0@d957c903": {
@@ -328,11 +325,11 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
]
},
"@opam/stdio@opam:v0.13.0@eb59d879": {
@@ -353,12 +350,12 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@opam/base@opam:v0.13.1@7d937ed0",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@opam/base@opam:v0.13.1@7d937ed0"
]
},
@@ -380,11 +377,11 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
]
},
"@opam/seq@opam:base@d8d7de1d": {
@@ -402,66 +399,67 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
- "devDependencies": [ "ocaml@4.9.0@d41d8cd9" ]
+ "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ]
},
- "@opam/result@opam:1.4@dc720aef": {
- "id": "@opam/result@opam:1.4@dc720aef",
+ "@opam/result@opam:1.5@6b753c82": {
+ "id": "@opam/result@opam:1.5@6b753c82",
"name": "@opam/result",
- "version": "opam:1.4",
+ "version": "opam:1.5",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/d3/d3162dbc501a2af65c8c71e0866541da#md5:d3162dbc501a2af65c8c71e0866541da",
- "archive:https://github.com/janestreet/result/archive/1.4.tar.gz#md5:d3162dbc501a2af65c8c71e0866541da"
+ "archive:https://opam.ocaml.org/cache/md5/1b/1b82dec78849680b49ae9a8a365b831b#md5:1b82dec78849680b49ae9a8a365b831b",
+ "archive:https://github.com/janestreet/result/releases/download/1.5/result-1.5.tbz#md5:1b82dec78849680b49ae9a8a365b831b"
],
"opam": {
"name": "result",
- "version": "1.4",
- "path": "esy.lock/opam/result.1.4"
+ "version": "1.5",
+ "path": "esy.lock/opam/result.1.5"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/reason@opam:3.5.2@f689c2cb": {
- "id": "@opam/reason@opam:3.5.2@f689c2cb",
+ "@opam/reason@opam:3.6.0@2da53ff9": {
+ "id": "@opam/reason@opam:3.6.0@2da53ff9",
"name": "@opam/reason",
- "version": "opam:3.5.2",
+ "version": "opam:3.6.0",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/66/66c54296009e0f6cbc8e93aa01105cbb#md5:66c54296009e0f6cbc8e93aa01105cbb",
- "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz#md5:66c54296009e0f6cbc8e93aa01105cbb"
+ "archive:https://opam.ocaml.org/cache/md5/d4/d4d729804bc509bca0ac6223e06f7314#md5:d4d729804bc509bca0ac6223e06f7314",
+ "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.6.0.tgz#md5:d4d729804bc509bca0ac6223e06f7314"
],
"opam": {
"name": "reason",
- "version": "3.5.2",
- "path": "esy.lock/opam/reason.3.5.2"
+ "version": "3.6.0",
+ "path": "esy.lock/opam/reason.3.6.0"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/result@opam:1.4@dc720aef",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/result@opam:1.5@6b753c82",
"@opam/ocamlfind@opam:1.8.1@ff07b0f9",
- "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7",
- "@opam/merlin-extend@opam:0.5@a5dd7d4b",
- "@opam/menhir@opam:20200211@90483d81",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47",
+ "@opam/merlin-extend@opam:0.5@675b1611",
+ "@opam/menhir@opam:20200612@8d55744c",
+ "@opam/fix@opam:20200131@0ecd2f01", "@opam/dune@opam:2.5.0@aef1678b",
+ "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/result@opam:1.4@dc720aef",
- "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7",
- "@opam/merlin-extend@opam:0.5@a5dd7d4b",
- "@opam/menhir@opam:20200211@90483d81",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/result@opam:1.5@6b753c82",
+ "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47",
+ "@opam/merlin-extend@opam:0.5@675b1611",
+ "@opam/menhir@opam:20200612@8d55744c",
+ "@opam/fix@opam:20200131@0ecd2f01", "@opam/dune@opam:2.5.0@aef1678b"
]
},
"@opam/re@opam:1.9.0@d4d5e13d": {
@@ -482,12 +480,38 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/seq@opam:base@d8d7de1d",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/seq@opam:base@d8d7de1d",
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/seq@opam:base@d8d7de1d",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/seq@opam:base@d8d7de1d",
+ "@opam/dune@opam:2.5.0@aef1678b"
+ ]
+ },
+ "@opam/ppx_yojson_conv_lib@opam:v0.14.0@116b53d6": {
+ "id": "@opam/ppx_yojson_conv_lib@opam:v0.14.0@116b53d6",
+ "name": "@opam/ppx_yojson_conv_lib",
+ "version": "opam:v0.14.0",
+ "source": {
+ "type": "install",
+ "source": [
+ "archive:https://opam.ocaml.org/cache/md5/e2/e23c5593a7211ad4fb09e26e9a74698a#md5:e23c5593a7211ad4fb09e26e9a74698a",
+ "archive:https://ocaml.janestreet.com/ocaml-core/v0.14/files/ppx_yojson_conv_lib-v0.14.0.tar.gz#md5:e23c5593a7211ad4fb09e26e9a74698a"
+ ],
+ "opam": {
+ "name": "ppx_yojson_conv_lib",
+ "version": "v0.14.0",
+ "path": "esy.lock/opam/ppx_yojson_conv_lib.v0.14.0"
+ }
+ },
+ "overrides": [],
+ "dependencies": [
+ "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ ],
+ "devDependencies": [
+ "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
+ "@opam/dune@opam:2.5.0@aef1678b"
]
},
"@opam/ppx_tools_versioned@opam:5.2.3@4994ec80": {
@@ -508,14 +532,14 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9",
- "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9",
+ "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47",
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9",
- "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9",
+ "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47",
+ "@opam/dune@opam:2.5.0@aef1678b"
]
},
"@opam/ppx_derivers@opam:1.2.1@ecf0aa45": {
@@ -536,82 +560,86 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/odoc@opam:1.5.0@35218f5f": {
- "id": "@opam/odoc@opam:1.5.0@35218f5f",
+ "@opam/odoc@opam:1.5.1@dae60787": {
+ "id": "@opam/odoc@opam:1.5.1@dae60787",
"name": "@opam/odoc",
- "version": "opam:1.5.0",
+ "version": "opam:1.5.1",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/sha256/85/857759be968070bfda208add3ae2c2bc87826ca2bfc39cebab1cc1e13db7a140#sha256:857759be968070bfda208add3ae2c2bc87826ca2bfc39cebab1cc1e13db7a140",
- "archive:https://github.com/ocaml/odoc/releases/download/1.5.0/odoc-1.5.0.tbz#sha256:857759be968070bfda208add3ae2c2bc87826ca2bfc39cebab1cc1e13db7a140"
+ "archive:https://opam.ocaml.org/cache/sha256/ea/ea14721344e2aab6b63f2884782d37e94a1ed8ab91147a1c08a29710d99d354f#sha256:ea14721344e2aab6b63f2884782d37e94a1ed8ab91147a1c08a29710d99d354f",
+ "archive:https://github.com/ocaml/odoc/releases/download/1.5.1/odoc-1.5.1.tbz#sha256:ea14721344e2aab6b63f2884782d37e94a1ed8ab91147a1c08a29710d99d354f"
],
"opam": {
"name": "odoc",
- "version": "1.5.0",
- "path": "esy.lock/opam/odoc.1.5.0"
+ "version": "1.5.1",
+ "path": "esy.lock/opam/odoc.1.5.1"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/tyxml@opam:4.3.0@c1da25f1",
- "@opam/result@opam:1.4@dc720aef", "@opam/fpath@opam:0.7.2@45477b93",
- "@opam/dune@opam:2.3.0@3dc35de7", "@opam/cppo@opam:1.6.6@f4f83858",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/tyxml@opam:4.4.0@1dca5713",
+ "@opam/result@opam:1.5@6b753c82", "@opam/fpath@opam:0.7.2@45477b93",
+ "@opam/dune@opam:2.5.0@aef1678b", "@opam/cppo@opam:1.6.6@f4f83858",
"@opam/cmdliner@opam:1.0.4@93208aac",
"@opam/astring@opam:0.8.3@4e5e17d5",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/tyxml@opam:4.3.0@c1da25f1",
- "@opam/result@opam:1.4@dc720aef", "@opam/fpath@opam:0.7.2@45477b93",
- "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/tyxml@opam:4.4.0@1dca5713",
+ "@opam/result@opam:1.5@6b753c82", "@opam/fpath@opam:0.7.2@45477b93",
+ "@opam/dune@opam:2.5.0@aef1678b",
"@opam/cmdliner@opam:1.0.4@93208aac",
"@opam/astring@opam:0.8.3@4e5e17d5"
]
},
- "@opam/ocamlformat@opam:0.13.0@216ba5f8": {
- "id": "@opam/ocamlformat@opam:0.13.0@216ba5f8",
+ "@opam/ocamlformat@opam:0.14.2@d742ffd5": {
+ "id": "@opam/ocamlformat@opam:0.14.2@d742ffd5",
"name": "@opam/ocamlformat",
- "version": "opam:0.13.0",
+ "version": "opam:0.14.2",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/sha256/b8/b84b694ef7c957bc05f938c98c687da77645cddab1c5ec6ae270f6113175224e#sha256:b84b694ef7c957bc05f938c98c687da77645cddab1c5ec6ae270f6113175224e",
- "archive:https://github.com/ocaml-ppx/ocamlformat/releases/download/0.13.0/ocamlformat-0.13.0-2.tbz#sha256:b84b694ef7c957bc05f938c98c687da77645cddab1c5ec6ae270f6113175224e"
+ "archive:https://opam.ocaml.org/cache/sha256/5f/5f9f7ac312a8f62315e25536f87601efc7788114a4a1eacc0507acf474f8f09a#sha256:5f9f7ac312a8f62315e25536f87601efc7788114a4a1eacc0507acf474f8f09a",
+ "archive:https://github.com/ocaml-ppx/ocamlformat/releases/download/0.14.2/ocamlformat-0.14.2.tbz#sha256:5f9f7ac312a8f62315e25536f87601efc7788114a4a1eacc0507acf474f8f09a"
],
"opam": {
"name": "ocamlformat",
- "version": "0.13.0",
- "path": "esy.lock/opam/ocamlformat.0.13.0"
+ "version": "0.14.2",
+ "path": "esy.lock/opam/ocamlformat.0.14.2"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
- "@opam/uuseg@opam:12.0.0@bf82c4c7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
+ "@opam/uuseg@opam:13.0.0@f60712a7",
"@opam/stdio@opam:v0.13.0@eb59d879", "@opam/re@opam:1.9.0@d4d5e13d",
- "@opam/odoc@opam:1.5.0@35218f5f",
- "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7",
- "@opam/fpath@opam:0.7.2@45477b93", "@opam/dune@opam:2.3.0@3dc35de7",
+ "@opam/odoc@opam:1.5.1@dae60787",
+ "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47",
+ "@opam/menhir@opam:20200612@8d55744c",
+ "@opam/fpath@opam:0.7.2@45477b93",
+ "@opam/fix@opam:20200131@0ecd2f01", "@opam/dune@opam:2.5.0@aef1678b",
"@opam/cmdliner@opam:1.0.4@93208aac",
"@opam/base-unix@opam:base@87d0b2eb",
"@opam/base@opam:v0.13.1@7d937ed0",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
- "@opam/uuseg@opam:12.0.0@bf82c4c7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uutf@opam:1.0.2@4440868f",
+ "@opam/uuseg@opam:13.0.0@f60712a7",
"@opam/stdio@opam:v0.13.0@eb59d879", "@opam/re@opam:1.9.0@d4d5e13d",
- "@opam/odoc@opam:1.5.0@35218f5f",
- "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7",
- "@opam/fpath@opam:0.7.2@45477b93", "@opam/dune@opam:2.3.0@3dc35de7",
+ "@opam/odoc@opam:1.5.1@dae60787",
+ "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47",
+ "@opam/menhir@opam:20200612@8d55744c",
+ "@opam/fpath@opam:0.7.2@45477b93",
+ "@opam/fix@opam:20200131@0ecd2f01", "@opam/dune@opam:2.5.0@aef1678b",
"@opam/cmdliner@opam:1.0.4@93208aac",
"@opam/base-unix@opam:base@87d0b2eb",
"@opam/base@opam:v0.13.1@7d937ed0"
@@ -641,10 +669,10 @@
}
],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/conf-m4@opam:1@3b2b148a",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/conf-m4@opam:1@3b2b148a",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
- "devDependencies": [ "ocaml@4.9.0@d41d8cd9" ]
+ "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ]
},
"@opam/ocamlbuild@opam:0.14.0@6ac75d03": {
"id": "@opam/ocamlbuild@opam:0.14.0@6ac75d03",
@@ -669,40 +697,69 @@
}
],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
- "devDependencies": [ "ocaml@4.9.0@d41d8cd9" ]
+ "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ]
},
- "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7": {
- "id": "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7",
+ "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47": {
+ "id": "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47",
"name": "@opam/ocaml-migrate-parsetree",
- "version": "opam:1.6.0",
+ "version": "opam:1.7.3",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/sha256/9b/9b018e7d25114ce17fc0b82b7cd7c927b84ebb6b043aa987fa7731c2484de33f#sha256:9b018e7d25114ce17fc0b82b7cd7c927b84ebb6b043aa987fa7731c2484de33f",
- "archive:https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.6.0/ocaml-migrate-parsetree-v1.6.0.tbz#sha256:9b018e7d25114ce17fc0b82b7cd7c927b84ebb6b043aa987fa7731c2484de33f"
+ "archive:https://opam.ocaml.org/cache/sha256/6d/6d85717bcf476b87f290714872ed4fbde0233dc899c3158a27f439d70224fb55#sha256:6d85717bcf476b87f290714872ed4fbde0233dc899c3158a27f439d70224fb55",
+ "archive:https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.7.3/ocaml-migrate-parsetree-v1.7.3.tbz#sha256:6d85717bcf476b87f290714872ed4fbde0233dc899c3158a27f439d70224fb55"
],
"opam": {
"name": "ocaml-migrate-parsetree",
- "version": "1.6.0",
- "path": "esy.lock/opam/ocaml-migrate-parsetree.1.6.0"
+ "version": "1.7.3",
+ "path": "esy.lock/opam/ocaml-migrate-parsetree.1.7.3"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/result@opam:1.4@dc720aef",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/result@opam:1.5@6b753c82",
"@opam/ppx_derivers@opam:1.2.1@ecf0aa45",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/result@opam:1.4@dc720aef",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/result@opam:1.5@6b753c82",
"@opam/ppx_derivers@opam:1.2.1@ecf0aa45",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/merlin-extend@opam:0.5@a5dd7d4b": {
- "id": "@opam/merlin-extend@opam:0.5@a5dd7d4b",
+ "@opam/ocaml-lsp-server@github:ocaml/ocaml-lsp:ocaml-lsp-server.opam#a83bd09@d41d8cd9": {
+ "id":
+ "@opam/ocaml-lsp-server@github:ocaml/ocaml-lsp:ocaml-lsp-server.opam#a83bd09@d41d8cd9",
+ "name": "@opam/ocaml-lsp-server",
+ "version": "github:ocaml/ocaml-lsp:ocaml-lsp-server.opam#a83bd09",
+ "source": {
+ "type": "install",
+ "source": [ "github:ocaml/ocaml-lsp:ocaml-lsp-server.opam#a83bd09" ]
+ },
+ "overrides": [],
+ "dependencies": [
+ "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
+ "@opam/stdlib-shims@opam:0.1.0@d957c903",
+ "@opam/ppx_yojson_conv_lib@opam:v0.14.0@116b53d6",
+ "@opam/ocamlfind@opam:1.8.1@ff07b0f9",
+ "@opam/menhir@opam:20200612@8d55744c",
+ "@opam/dune-build-info@opam:2.5.1@921e5578",
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ ],
+ "devDependencies": [
+ "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
+ "@opam/stdlib-shims@opam:0.1.0@d957c903",
+ "@opam/ppx_yojson_conv_lib@opam:v0.14.0@116b53d6",
+ "@opam/ocamlfind@opam:1.8.1@ff07b0f9",
+ "@opam/menhir@opam:20200612@8d55744c",
+ "@opam/dune-build-info@opam:2.5.1@921e5578",
+ "@opam/dune@opam:2.5.0@aef1678b"
+ ]
+ },
+ "@opam/merlin-extend@opam:0.5@675b1611": {
+ "id": "@opam/merlin-extend@opam:0.5@675b1611",
"name": "@opam/merlin-extend",
"version": "opam:0.5",
"source": {
@@ -719,113 +776,91 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@opam/cppo@opam:1.6.6@f4f83858", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/menhirSdk@opam:20200211@1b43927c": {
- "id": "@opam/menhirSdk@opam:20200211@1b43927c",
+ "@opam/menhirSdk@opam:20200612@7fa3ce5b": {
+ "id": "@opam/menhirSdk@opam:20200612@7fa3ce5b",
"name": "@opam/menhirSdk",
- "version": "opam:20200211",
+ "version": "opam:20200612",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/01/01577e5f15380c35bdaa8fd818204560#md5:01577e5f15380c35bdaa8fd818204560",
- "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20200211/archive.tar.gz#md5:01577e5f15380c35bdaa8fd818204560"
+ "archive:https://opam.ocaml.org/cache/md5/eb/eb1c13439a00195ee01e4a2e83b3e991#md5:eb1c13439a00195ee01e4a2e83b3e991",
+ "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20200612/archive.tar.gz#md5:eb1c13439a00195ee01e4a2e83b3e991"
],
"opam": {
"name": "menhirSdk",
- "version": "20200211",
- "path": "esy.lock/opam/menhirSdk.20200211"
+ "version": "20200612",
+ "path": "esy.lock/opam/menhirSdk.20200612"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/menhirLib@opam:20200211@99279102": {
- "id": "@opam/menhirLib@opam:20200211@99279102",
+ "@opam/menhirLib@opam:20200612@a92e9802": {
+ "id": "@opam/menhirLib@opam:20200612@a92e9802",
"name": "@opam/menhirLib",
- "version": "opam:20200211",
+ "version": "opam:20200612",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/01/01577e5f15380c35bdaa8fd818204560#md5:01577e5f15380c35bdaa8fd818204560",
- "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20200211/archive.tar.gz#md5:01577e5f15380c35bdaa8fd818204560"
+ "archive:https://opam.ocaml.org/cache/md5/eb/eb1c13439a00195ee01e4a2e83b3e991#md5:eb1c13439a00195ee01e4a2e83b3e991",
+ "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20200612/archive.tar.gz#md5:eb1c13439a00195ee01e4a2e83b3e991"
],
"opam": {
"name": "menhirLib",
- "version": "20200211",
- "path": "esy.lock/opam/menhirLib.20200211"
+ "version": "20200612",
+ "path": "esy.lock/opam/menhirLib.20200612"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/menhir@opam:20200211@90483d81": {
- "id": "@opam/menhir@opam:20200211@90483d81",
+ "@opam/menhir@opam:20200612@8d55744c": {
+ "id": "@opam/menhir@opam:20200612@8d55744c",
"name": "@opam/menhir",
- "version": "opam:20200211",
+ "version": "opam:20200612",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/01/01577e5f15380c35bdaa8fd818204560#md5:01577e5f15380c35bdaa8fd818204560",
- "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20200211/archive.tar.gz#md5:01577e5f15380c35bdaa8fd818204560"
+ "archive:https://opam.ocaml.org/cache/md5/eb/eb1c13439a00195ee01e4a2e83b3e991#md5:eb1c13439a00195ee01e4a2e83b3e991",
+ "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20200612/archive.tar.gz#md5:eb1c13439a00195ee01e4a2e83b3e991"
],
"opam": {
"name": "menhir",
- "version": "20200211",
- "path": "esy.lock/opam/menhir.20200211"
+ "version": "20200612",
+ "path": "esy.lock/opam/menhir.20200612"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/menhirSdk@opam:20200211@1b43927c",
- "@opam/menhirLib@opam:20200211@99279102",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/menhirSdk@opam:20200612@7fa3ce5b",
+ "@opam/menhirLib@opam:20200612@a92e9802",
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/menhirSdk@opam:20200211@1b43927c",
- "@opam/menhirLib@opam:20200211@99279102",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/menhirSdk@opam:20200612@7fa3ce5b",
+ "@opam/menhirLib@opam:20200612@a92e9802",
+ "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2": {
- "id": "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2",
- "name": "@opam/jbuilder",
- "version": "opam:1.0+beta20.2",
- "source": {
- "type": "install",
- "source": [
- "archive:https://opam.ocaml.org/cache/md5/fb/fbe8c3b1facb206cac3fb8932b5dd5d9#md5:fbe8c3b1facb206cac3fb8932b5dd5d9",
- "archive:https://github.com/ocaml/dune/releases/download/1.0%2Bbeta20.2/jbuilder-1.0+beta20.2.tbz#md5:fbe8c3b1facb206cac3fb8932b5dd5d9"
- ],
- "opam": {
- "name": "jbuilder",
- "version": "1.0+beta20.2",
- "path": "esy.lock/opam/jbuilder.1.0+beta20.2"
- }
- },
- "overrides": [],
- "dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9"
- ],
- "devDependencies": [ "ocaml@4.9.0@d41d8cd9" ]
- },
"@opam/fpath@opam:0.7.2@45477b93": {
"id": "@opam/fpath@opam:0.7.2@45477b93",
"name": "@opam/fpath",
@@ -844,15 +879,15 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/topkg@opam:1.0.1@a42c631e",
- "@opam/result@opam:1.4@dc720aef",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/topkg@opam:1.0.1@a42c631e",
+ "@opam/result@opam:1.5@6b753c82",
"@opam/ocamlfind@opam:1.8.1@ff07b0f9",
"@opam/ocamlbuild@opam:0.14.0@6ac75d03",
"@opam/astring@opam:0.8.3@4e5e17d5",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/result@opam:1.4@dc720aef",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/result@opam:1.5@6b753c82",
"@opam/astring@opam:0.8.3@4e5e17d5"
]
},
@@ -874,7 +909,7 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/topkg@opam:1.0.1@a42c631e",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/topkg@opam:1.0.1@a42c631e",
"@opam/stdlib-shims@opam:0.1.0@d957c903",
"@opam/seq@opam:base@d8d7de1d",
"@opam/ocamlfind@opam:1.8.1@ff07b0f9",
@@ -884,10 +919,35 @@
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/stdlib-shims@opam:0.1.0@d957c903",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/stdlib-shims@opam:0.1.0@d957c903",
"@opam/seq@opam:base@d8d7de1d"
]
},
+ "@opam/fix@opam:20200131@0ecd2f01": {
+ "id": "@opam/fix@opam:20200131@0ecd2f01",
+ "name": "@opam/fix",
+ "version": "opam:20200131",
+ "source": {
+ "type": "install",
+ "source": [
+ "archive:https://opam.ocaml.org/cache/md5/99/991ff031666c662eaab638d2e0f4ac1d#md5:991ff031666c662eaab638d2e0f4ac1d",
+ "archive:https://gitlab.inria.fr/fpottier/fix/repository/20200131/archive.tar.gz#md5:991ff031666c662eaab638d2e0f4ac1d"
+ ],
+ "opam": {
+ "name": "fix",
+ "version": "20200131",
+ "path": "esy.lock/opam/fix.20200131"
+ }
+ },
+ "overrides": [],
+ "dependencies": [
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
+ "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ ],
+ "devDependencies": [
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
+ ]
+ },
"@opam/easy-format@opam:1.3.2@0484b3c4": {
"id": "@opam/easy-format@opam:1.3.2@0484b3c4",
"name": "@opam/easy-format",
@@ -906,88 +966,110 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/dune-private-libs@opam:2.3.0@0e3e8465": {
- "id": "@opam/dune-private-libs@opam:2.3.0@0e3e8465",
+ "@opam/dune-private-libs@opam:2.5.1@60c1661f": {
+ "id": "@opam/dune-private-libs@opam:2.5.1@60c1661f",
"name": "@opam/dune-private-libs",
- "version": "opam:2.3.0",
+ "version": "opam:2.5.1",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/sha256/14/14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff#sha256:14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff",
- "archive:https://github.com/ocaml/dune/releases/download/2.3.0/dune-2.3.0.tbz#sha256:14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff"
+ "archive:https://opam.ocaml.org/cache/sha256/8f/8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b#sha256:8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b",
+ "archive:https://github.com/ocaml/dune/releases/download/2.5.1/dune-2.5.1.tbz#sha256:8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b"
],
"opam": {
"name": "dune-private-libs",
- "version": "2.3.0",
- "path": "esy.lock/opam/dune-private-libs.2.3.0"
+ "version": "2.5.1",
+ "path": "esy.lock/opam/dune-private-libs.2.5.1"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/dune-configurator@opam:2.3.0@cf20be6b": {
- "id": "@opam/dune-configurator@opam:2.3.0@cf20be6b",
+ "@opam/dune-configurator@opam:2.5.1@aeb9d8d5": {
+ "id": "@opam/dune-configurator@opam:2.5.1@aeb9d8d5",
"name": "@opam/dune-configurator",
- "version": "opam:2.3.0",
+ "version": "opam:2.5.1",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/sha256/14/14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff#sha256:14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff",
- "archive:https://github.com/ocaml/dune/releases/download/2.3.0/dune-2.3.0.tbz#sha256:14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff"
+ "archive:https://opam.ocaml.org/cache/sha256/8f/8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b#sha256:8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b",
+ "archive:https://github.com/ocaml/dune/releases/download/2.5.1/dune-2.5.1.tbz#sha256:8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b"
],
"opam": {
"name": "dune-configurator",
- "version": "2.3.0",
- "path": "esy.lock/opam/dune-configurator.2.3.0"
+ "version": "2.5.1",
+ "path": "esy.lock/opam/dune-configurator.2.5.1"
}
},
"overrides": [],
"dependencies": [
- "@opam/dune-private-libs@opam:2.3.0@0e3e8465",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "@opam/dune-private-libs@opam:2.5.1@60c1661f",
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "@opam/dune-private-libs@opam:2.3.0@0e3e8465",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "@opam/dune-private-libs@opam:2.5.1@60c1661f",
+ "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/dune@opam:2.3.0@3dc35de7": {
- "id": "@opam/dune@opam:2.3.0@3dc35de7",
+ "@opam/dune-build-info@opam:2.5.1@921e5578": {
+ "id": "@opam/dune-build-info@opam:2.5.1@921e5578",
+ "name": "@opam/dune-build-info",
+ "version": "opam:2.5.1",
+ "source": {
+ "type": "install",
+ "source": [
+ "archive:https://opam.ocaml.org/cache/sha256/8f/8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b#sha256:8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b",
+ "archive:https://github.com/ocaml/dune/releases/download/2.5.1/dune-2.5.1.tbz#sha256:8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b"
+ ],
+ "opam": {
+ "name": "dune-build-info",
+ "version": "2.5.1",
+ "path": "esy.lock/opam/dune-build-info.2.5.1"
+ }
+ },
+ "overrides": [],
+ "dependencies": [
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ ],
+ "devDependencies": [ "@opam/dune@opam:2.5.0@aef1678b" ]
+ },
+ "@opam/dune@opam:2.5.0@aef1678b": {
+ "id": "@opam/dune@opam:2.5.0@aef1678b",
"name": "@opam/dune",
- "version": "opam:2.3.0",
+ "version": "opam:2.5.0",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/sha256/14/14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff#sha256:14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff",
- "archive:https://github.com/ocaml/dune/releases/download/2.3.0/dune-2.3.0.tbz#sha256:14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff"
+ "archive:https://opam.ocaml.org/cache/sha256/9c/9cc1661b9b173dd183867edcf8ee28a9ce79079a7d00316b719bdcba1d78d7da#sha256:9cc1661b9b173dd183867edcf8ee28a9ce79079a7d00316b719bdcba1d78d7da",
+ "archive:https://github.com/ocaml/dune/releases/download/2.5.0/dune-2.5.0.tbz#sha256:9cc1661b9b173dd183867edcf8ee28a9ce79079a7d00316b719bdcba1d78d7da"
],
"opam": {
"name": "dune",
- "version": "2.3.0",
- "path": "esy.lock/opam/dune.2.3.0"
+ "version": "2.5.0",
+ "path": "esy.lock/opam/dune.2.5.0"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb",
"@opam/base-threads@opam:base@36803084",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb",
"@opam/base-threads@opam:base@36803084"
]
},
@@ -1009,12 +1091,12 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@opam/base-unix@opam:base@87d0b2eb",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/dune@opam:2.3.0@3dc35de7",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.5.0@aef1678b",
"@opam/base-unix@opam:base@87d0b2eb"
]
},
@@ -1053,9 +1135,9 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
- "devDependencies": [ "ocaml@4.9.0@d41d8cd9" ]
+ "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ]
},
"@opam/biniou@opam:1.2.1@d7570399": {
"id": "@opam/biniou@opam:1.2.1@d7570399",
@@ -1075,12 +1157,12 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4",
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4",
+ "@opam/dune@opam:2.5.0@aef1678b"
]
},
"@opam/base-unix@opam:base@87d0b2eb": {
@@ -1132,11 +1214,11 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9"
]
},
"@opam/base@opam:v0.13.1@7d937ed0": {
@@ -1157,103 +1239,103 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/sexplib0@opam:v0.13.0@3f54c2be",
- "@opam/dune-configurator@opam:2.3.0@cf20be6b",
- "@opam/dune@opam:2.3.0@3dc35de7", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/sexplib0@opam:v0.13.0@3f54c2be",
+ "@opam/dune-configurator@opam:2.5.1@aeb9d8d5",
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/sexplib0@opam:v0.13.0@3f54c2be",
- "@opam/dune-configurator@opam:2.3.0@cf20be6b",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/sexplib0@opam:v0.13.0@3f54c2be",
+ "@opam/dune-configurator@opam:2.5.1@aeb9d8d5",
+ "@opam/dune@opam:2.5.0@aef1678b"
]
},
- "@opam/atdgen-runtime@opam:2.0.0@60f6faab": {
- "id": "@opam/atdgen-runtime@opam:2.0.0@60f6faab",
+ "@opam/atdgen-runtime@opam:2.2.1@6a3a6395": {
+ "id": "@opam/atdgen-runtime@opam:2.2.1@6a3a6395",
"name": "@opam/atdgen-runtime",
- "version": "opam:2.0.0",
+ "version": "opam:2.2.1",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/14/14e47609397c524ea0eae7c3f14f7ccf#md5:14e47609397c524ea0eae7c3f14f7ccf",
- "archive:https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz#md5:14e47609397c524ea0eae7c3f14f7ccf"
+ "archive:https://opam.ocaml.org/cache/sha256/db/db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e#sha256:db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e",
+ "archive:https://github.com/ahrefs/atd/releases/download/2.2.1/atd-2.2.1.tbz#sha256:db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e"
],
"opam": {
"name": "atdgen-runtime",
- "version": "2.0.0",
- "path": "esy.lock/opam/atdgen-runtime.2.0.0"
+ "version": "2.2.1",
+ "path": "esy.lock/opam/atdgen-runtime.2.2.1"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
- "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
+ "@opam/re@opam:1.9.0@d4d5e13d", "@opam/dune@opam:2.5.0@aef1678b",
"@opam/biniou@opam:1.2.1@d7570399",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
- "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
+ "@opam/re@opam:1.9.0@d4d5e13d", "@opam/dune@opam:2.5.0@aef1678b",
"@opam/biniou@opam:1.2.1@d7570399"
]
},
- "@opam/atdgen@opam:2.0.0@46af0360": {
- "id": "@opam/atdgen@opam:2.0.0@46af0360",
+ "@opam/atdgen@opam:2.2.1@d73fda11": {
+ "id": "@opam/atdgen@opam:2.2.1@d73fda11",
"name": "@opam/atdgen",
- "version": "opam:2.0.0",
+ "version": "opam:2.2.1",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/14/14e47609397c524ea0eae7c3f14f7ccf#md5:14e47609397c524ea0eae7c3f14f7ccf",
- "archive:https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz#md5:14e47609397c524ea0eae7c3f14f7ccf"
+ "archive:https://opam.ocaml.org/cache/sha256/db/db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e#sha256:db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e",
+ "archive:https://github.com/ahrefs/atd/releases/download/2.2.1/atd-2.2.1.tbz#sha256:db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e"
],
"opam": {
"name": "atdgen",
- "version": "2.0.0",
- "path": "esy.lock/opam/atdgen.2.0.0"
+ "version": "2.2.1",
+ "path": "esy.lock/opam/atdgen.2.2.1"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
- "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2",
- "@opam/biniou@opam:1.2.1@d7570399",
- "@opam/atdgen-runtime@opam:2.0.0@60f6faab",
- "@opam/atd@opam:2.0.0@e0ddd12f", "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
+ "@opam/dune@opam:2.5.0@aef1678b", "@opam/biniou@opam:1.2.1@d7570399",
+ "@opam/atdgen-runtime@opam:2.2.1@6a3a6395",
+ "@opam/atd@opam:2.2.1@071ab6bd", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
- "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2",
- "@opam/biniou@opam:1.2.1@d7570399",
- "@opam/atdgen-runtime@opam:2.0.0@60f6faab",
- "@opam/atd@opam:2.0.0@e0ddd12f"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985",
+ "@opam/dune@opam:2.5.0@aef1678b", "@opam/biniou@opam:1.2.1@d7570399",
+ "@opam/atdgen-runtime@opam:2.2.1@6a3a6395",
+ "@opam/atd@opam:2.2.1@071ab6bd"
]
},
- "@opam/atd@opam:2.0.0@e0ddd12f": {
- "id": "@opam/atd@opam:2.0.0@e0ddd12f",
+ "@opam/atd@opam:2.2.1@071ab6bd": {
+ "id": "@opam/atd@opam:2.2.1@071ab6bd",
"name": "@opam/atd",
- "version": "opam:2.0.0",
+ "version": "opam:2.2.1",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/md5/14/14e47609397c524ea0eae7c3f14f7ccf#md5:14e47609397c524ea0eae7c3f14f7ccf",
- "archive:https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz#md5:14e47609397c524ea0eae7c3f14f7ccf"
+ "archive:https://opam.ocaml.org/cache/sha256/db/db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e#sha256:db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e",
+ "archive:https://github.com/ahrefs/atd/releases/download/2.2.1/atd-2.2.1.tbz#sha256:db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e"
],
"opam": {
"name": "atd",
- "version": "2.0.0",
- "path": "esy.lock/opam/atd.2.0.0"
+ "version": "2.2.1",
+ "path": "esy.lock/opam/atd.2.2.1"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/menhir@opam:20200211@90483d81",
- "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/re@opam:1.9.0@d4d5e13d",
+ "@opam/menhir@opam:20200612@8d55744c",
"@opam/easy-format@opam:1.3.2@0484b3c4",
- "@esy-ocaml/substs@0.0.1@d41d8cd9"
+ "@opam/dune@opam:2.5.0@aef1678b", "@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2",
- "@opam/easy-format@opam:1.3.2@0484b3c4"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/re@opam:1.9.0@d4d5e13d",
+ "@opam/menhir@opam:20200612@8d55744c",
+ "@opam/easy-format@opam:1.3.2@0484b3c4",
+ "@opam/dune@opam:2.5.0@aef1678b"
]
},
"@opam/astring@opam:0.8.3@4e5e17d5": {
@@ -1274,47 +1356,47 @@
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/topkg@opam:1.0.1@a42c631e",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/topkg@opam:1.0.1@a42c631e",
"@opam/ocamlfind@opam:1.8.1@ff07b0f9",
"@opam/ocamlbuild@opam:0.14.0@6ac75d03",
"@opam/base-bytes@opam:base@19d0c2ff",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/base-bytes@opam:base@19d0c2ff"
+ "ocaml@4.8.1000@d41d8cd9", "@opam/base-bytes@opam:base@19d0c2ff"
]
},
- "@opam/alcotest@opam:1.0.1@412cd081": {
- "id": "@opam/alcotest@opam:1.0.1@412cd081",
+ "@opam/alcotest@opam:1.1.0@dc9260c7": {
+ "id": "@opam/alcotest@opam:1.1.0@dc9260c7",
"name": "@opam/alcotest",
- "version": "opam:1.0.1",
+ "version": "opam:1.1.0",
"source": {
"type": "install",
"source": [
- "archive:https://opam.ocaml.org/cache/sha256/0c/0c8748838a89df6dee4850aa7ef5e46c573265a9bf1589dec255bd8156a793f6#sha256:0c8748838a89df6dee4850aa7ef5e46c573265a9bf1589dec255bd8156a793f6",
- "archive:https://github.com/mirage/alcotest/releases/download/1.0.1/alcotest-1.0.1.tbz#sha256:0c8748838a89df6dee4850aa7ef5e46c573265a9bf1589dec255bd8156a793f6"
+ "archive:https://opam.ocaml.org/cache/sha256/21/212827a49abf4008581c0da53e7ec78a9d639b415380dcb1fdeeb23f3ff083e2#sha256:212827a49abf4008581c0da53e7ec78a9d639b415380dcb1fdeeb23f3ff083e2",
+ "archive:https://github.com/mirage/alcotest/releases/download/1.1.0/alcotest-lwt-1.1.0.tbz#sha256:212827a49abf4008581c0da53e7ec78a9d639b415380dcb1fdeeb23f3ff083e2"
],
"opam": {
"name": "alcotest",
- "version": "1.0.1",
- "path": "esy.lock/opam/alcotest.1.0.1"
+ "version": "1.1.0",
+ "path": "esy.lock/opam/alcotest.1.1.0"
}
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uuidm@opam:0.9.7@bf725775",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uuidm@opam:0.9.7@bf725775",
"@opam/stdlib-shims@opam:0.1.0@d957c903",
"@opam/re@opam:1.9.0@d4d5e13d", "@opam/fmt@opam:0.8.8@01c3a23c",
- "@opam/dune@opam:2.3.0@3dc35de7",
+ "@opam/dune@opam:2.5.0@aef1678b",
"@opam/cmdliner@opam:1.0.4@93208aac",
"@opam/astring@opam:0.8.3@4e5e17d5",
"@esy-ocaml/substs@0.0.1@d41d8cd9"
],
"devDependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/uuidm@opam:0.9.7@bf725775",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/uuidm@opam:0.9.7@bf725775",
"@opam/stdlib-shims@opam:0.1.0@d957c903",
"@opam/re@opam:1.9.0@d4d5e13d", "@opam/fmt@opam:0.8.8@01c3a23c",
- "@opam/dune@opam:2.3.0@3dc35de7",
+ "@opam/dune@opam:2.5.0@aef1678b",
"@opam/cmdliner@opam:1.0.4@93208aac",
"@opam/astring@opam:0.8.3@4e5e17d5"
]
@@ -1333,24 +1415,24 @@
"dependencies": [],
"devDependencies": []
},
- "@esy-ocaml/reason@3.5.2@d41d8cd9": {
- "id": "@esy-ocaml/reason@3.5.2@d41d8cd9",
+ "@esy-ocaml/reason@3.6.0@d41d8cd9": {
+ "id": "@esy-ocaml/reason@3.6.0@d41d8cd9",
"name": "@esy-ocaml/reason",
- "version": "3.5.2",
+ "version": "3.6.0",
"source": {
"type": "install",
"source": [
- "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz#sha1:ac48b63fd66fbbc1d77ab6a2b7e3a1ba21a8f40b"
+ "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.6.0.tgz#sha1:ae98f3335e9e03ff0e01376830a14cd1246b5278"
]
},
"overrides": [],
"dependencies": [
- "ocaml@4.9.0@d41d8cd9", "@opam/result@opam:1.4@dc720aef",
+ "ocaml@4.8.1000@d41d8cd9", "@opam/result@opam:1.5@6b753c82",
"@opam/ocamlfind@opam:1.8.1@ff07b0f9",
- "@opam/ocaml-migrate-parsetree@opam:1.6.0@da2643e7",
- "@opam/merlin-extend@opam:0.5@a5dd7d4b",
- "@opam/menhir@opam:20200211@90483d81",
- "@opam/dune@opam:2.3.0@3dc35de7"
+ "@opam/ocaml-migrate-parsetree@opam:1.7.3@dbcf3b47",
+ "@opam/merlin-extend@opam:0.5@675b1611",
+ "@opam/menhir@opam:20200612@8d55744c",
+ "@opam/fix@opam:20200131@0ecd2f01", "@opam/dune@opam:2.5.0@aef1678b"
],
"devDependencies": []
}
diff --git a/esy.lock/opam/alcotest.1.0.1/opam b/esy.lock/opam/alcotest.1.0.1/opam
deleted file mode 100644
index cf487042..00000000
--- a/esy.lock/opam/alcotest.1.0.1/opam
+++ /dev/null
@@ -1,47 +0,0 @@
-opam-version: "2.0"
-maintainer: "thomas@gazagnaire.org"
-authors: "Thomas Gazagnaire"
-homepage: "https://github.com/mirage/alcotest/"
-dev-repo: "git+https://github.com/mirage/alcotest.git"
-bug-reports: "https://github.com/mirage/alcotest/issues/"
-license: "ISC"
-doc: "https://mirage.github.io/alcotest/"
-
-build: [
- ["dune" "subst"] {pinned}
- ["dune" "build" "-p" name "-j" jobs]
- ["dune" "runtest" "-p" name "-j" jobs] {with-test}
-]
-
-depends: [
- "dune" {>= "1.11"}
- "ocaml" {>= "4.03.0"}
- "fmt" {>= "0.8.6"}
- "astring"
- "cmdliner"
- "uuidm"
- "re"
- "stdlib-shims"
-]
-
-synopsis: "Alcotest is a lightweight and colourful test framework"
-
-description: """
-Alcotest exposes simple interface to perform unit tests. It exposes
-a simple TESTABLE module type, a check function to assert test
-predicates and a run function to perform a list of unit -> unit
-test callbacks.
-
-Alcotest provides a quiet and colorful output where only faulty runs
-are fully displayed at the end of the run (with the full logs ready to
-inspect), with a simple (yet expressive) query language to select the
-tests to run.
-"""
-url {
- src:
- "https://github.com/mirage/alcotest/releases/download/1.0.1/alcotest-1.0.1.tbz"
- checksum: [
- "sha256=0c8748838a89df6dee4850aa7ef5e46c573265a9bf1589dec255bd8156a793f6"
- "sha512=f5f52dea5bb143e7001b8d0ac6131f8851389b080f46b9ad1ccacb95cc31a38143dd7122ccba59bb190abe559dbf81f33cc4dc3401ed95772d59be75fa566f19"
- ]
-}
diff --git a/esy.lock/opam/alcotest.1.1.0/opam b/esy.lock/opam/alcotest.1.1.0/opam
new file mode 100644
index 00000000..9d4350c7
--- /dev/null
+++ b/esy.lock/opam/alcotest.1.1.0/opam
@@ -0,0 +1,53 @@
+opam-version: "2.0"
+synopsis: "Alcotest is a lightweight and colourful test framework"
+description: """
+Alcotest exposes simple interface to perform unit tests. It exposes
+a simple TESTABLE module type, a check function to assert test
+predicates and a run function to perform a list of unit -> unit
+test callbacks.
+
+Alcotest provides a quiet and colorful output where only faulty runs
+are fully displayed at the end of the run (with the full logs ready to
+inspect), with a simple (yet expressive) query language to select the
+tests to run.
+"""
+maintainer: ["thomas@gazagnaire.org"]
+authors: ["Thomas Gazagnaire"]
+license: "ISC"
+homepage: "https://github.com/mirage/alcotest"
+doc: "https://mirage.github.io/alcotest"
+bug-reports: "https://github.com/mirage/alcotest/issues"
+depends: [
+ "dune" {>= "2.0"}
+ "ocaml" {>= "4.03.0"}
+ "fmt" {>= "0.8.6"}
+ "astring"
+ "cmdliner"
+ "uuidm"
+ "re"
+ "stdlib-shims"
+ "odoc" {with-doc}
+]
+build: [
+ ["dune" "subst"] {pinned}
+ [
+ "dune"
+ "build"
+ "-p"
+ name
+ "-j"
+ jobs
+ "@install"
+ "@runtest" {with-test}
+ "@doc" {with-doc}
+ ]
+]
+dev-repo: "git+https://github.com/mirage/alcotest.git"
+url {
+ src:
+ "https://github.com/mirage/alcotest/releases/download/1.1.0/alcotest-lwt-1.1.0.tbz"
+ checksum: [
+ "sha256=212827a49abf4008581c0da53e7ec78a9d639b415380dcb1fdeeb23f3ff083e2"
+ "sha512=c47d04b3c7100af703b470b93ff9fe9fe22790415370b6d5972736f46a5c83901717d67caf0c4115d01020d3078dc7f3063838578174921cab352546dad00148"
+ ]
+}
diff --git a/esy.lock/opam/atd.2.0.0/opam b/esy.lock/opam/atd.2.0.0/opam
deleted file mode 100644
index 2808354c..00000000
--- a/esy.lock/opam/atd.2.0.0/opam
+++ /dev/null
@@ -1,34 +0,0 @@
-opam-version: "2.0"
-maintainer: "martin@mjambon.com"
-authors: ["Martin Jambon"]
-
-homepage: "https://github.com/mjambon/atd"
-bug-reports: "https://github.com/mjambon/atd/issues"
-dev-repo: "git://github.com/mjambon/atd.git"
-
-build: [
- ["jbuilder" "subst" "-p" name] {pinned}
- ["jbuilder" "build" "-p" name "-j" jobs]
-]
-
-# Restore when https://github.com/mjambon/atd/issues/121 is resolved.
-# build-test: [
-# ["jbuilder" "runtest" "-p" name]
-# ]
-
-depends: [
- "ocaml" {>= "4.03.0"}
- "jbuilder"
- "menhir" {build}
- "easy-format"
-]
-synopsis: "Parser for the ATD data format description language"
-description: """
-ATD is the OCaml library providing a parser for the ATD language and
-various utilities. ATD stands for Adjustable Type Definitions in
-reference to its main property of supporting annotations that allow a
-good fit with a variety of data formats."""
-url {
- src: "https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz"
- checksum: "md5=14e47609397c524ea0eae7c3f14f7ccf"
-}
diff --git a/esy.lock/opam/atd.2.2.1/opam b/esy.lock/opam/atd.2.2.1/opam
new file mode 100644
index 00000000..66462201
--- /dev/null
+++ b/esy.lock/opam/atd.2.2.1/opam
@@ -0,0 +1,55 @@
+opam-version: "2.0"
+synopsis: "Parser for the ATD data format description language"
+description: """
+ATD is the OCaml library providing a parser for the ATD language and various
+utilities. ATD stands for Adjustable Type Definitions in reference to its main
+property of supporting annotations that allow a good fit with a variety of data
+formats. """
+maintainer: ["Rudi Grinberg "]
+authors: [
+ "Martin Jambon "
+ "David Sheets "
+ "Rudi Grinberg "
+ "Ivan Jager "
+ "Jeff Meister "
+ "Carmelo Piccione "
+ "Raman Varabets "
+ "Mathieu Baudet "
+ "Rauan Mayemir "
+ "Louis Roché "
+ "Brendan Long "
+ "Christophe Troestler "
+ "Vincent Bernardoff "
+ "haoyang "
+]
+license: "MIT"
+homepage: "https://github.com/ahrefs/atd"
+bug-reports: "https://github.com/ahrefs/atd/issues"
+depends: [
+ "ocaml" {>= "4.02"}
+ "dune" {>= "2.0"}
+ "menhir"
+ "easy-format"
+ "re"
+]
+dev-repo: "git+https://github.com/ahrefs/atd.git"
+build: [
+ ["dune" "subst"] {pinned}
+ [
+ "dune"
+ "build"
+ "-p"
+ name
+ "-j"
+ jobs
+ "@install"
+ "@doc" {with-doc}
+ ]
+]
+url {
+ src: "https://github.com/ahrefs/atd/releases/download/2.2.1/atd-2.2.1.tbz"
+ checksum: [
+ "sha256=db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e"
+ "sha512=0c7f1985cc4d87ddd541bb2f7085b72f81aaef69468653319a4a52e6cd6c9318511229784a12cdb413ae500e7a5b8195759e0d8d49946a9b00f62e8dda07e8a2"
+ ]
+}
diff --git a/esy.lock/opam/atdgen-runtime.2.0.0/opam b/esy.lock/opam/atdgen-runtime.2.0.0/opam
deleted file mode 100644
index 7236d930..00000000
--- a/esy.lock/opam/atdgen-runtime.2.0.0/opam
+++ /dev/null
@@ -1,29 +0,0 @@
-opam-version: "2.0"
-maintainer: "martin@mjambon.com"
-authors: ["Martin Jambon"]
-
-homepage: "https://github.com/mjambon/atd"
-bug-reports: "https://github.com/mjambon/atd/issues"
-dev-repo: "git://github.com/mjambon/atd.git"
-
-build: [
- ["jbuilder" "subst" "-p" name] {pinned}
- ["jbuilder" "build" "-p" name "-j" jobs]
-]
-
-# Restore when https://github.com/mjambon/atd/issues/121 is resolved.
-# build-test: [
-# ["jbuilder" "runtest" "-p" name]
-# ]
-
-depends: [
- "ocaml" {>= "4.02.3"}
- "jbuilder"
- "biniou" {>= "1.0.6"}
- "yojson" {>= "1.2.1"}
-]
-synopsis: "Runtime library for code generated by atdgen."
-url {
- src: "https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz"
- checksum: "md5=14e47609397c524ea0eae7c3f14f7ccf"
-}
diff --git a/esy.lock/opam/atdgen-runtime.2.2.1/opam b/esy.lock/opam/atdgen-runtime.2.2.1/opam
new file mode 100644
index 00000000..54678984
--- /dev/null
+++ b/esy.lock/opam/atdgen-runtime.2.2.1/opam
@@ -0,0 +1,53 @@
+opam-version: "2.0"
+synopsis: "Runtime library for code generated by atdgen"
+description: """
+This package should be used only in conjunction with the stdgen code
+generator"""
+maintainer: ["Rudi Grinberg "]
+authors: [
+ "Martin Jambon "
+ "David Sheets "
+ "Rudi Grinberg "
+ "Ivan Jager "
+ "Jeff Meister "
+ "Carmelo Piccione "
+ "Raman Varabets "
+ "Mathieu Baudet "
+ "Rauan Mayemir "
+ "Louis Roché "
+ "Brendan Long "
+ "Christophe Troestler "
+ "Vincent Bernardoff "
+ "haoyang "
+]
+license: "MIT"
+homepage: "https://github.com/ahrefs/atd"
+bug-reports: "https://github.com/ahrefs/atd/issues"
+depends: [
+ "ocaml" {>= "4.02"}
+ "dune" {>= "2.0"}
+ "yojson" {>= "1.7.0"}
+ "biniou" {>= "1.0.6"}
+ "re"
+]
+dev-repo: "git+https://github.com/ahrefs/atd.git"
+build: [
+ ["dune" "subst"] {pinned}
+ [
+ "dune"
+ "build"
+ "-p"
+ name
+ "-j"
+ jobs
+ "@install"
+ "@doc" {with-doc}
+ ]
+]
+url {
+ src: "https://github.com/ahrefs/atd/releases/download/2.2.1/atd-2.2.1.tbz"
+ checksum: [
+ "sha256=db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e"
+ "sha512=0c7f1985cc4d87ddd541bb2f7085b72f81aaef69468653319a4a52e6cd6c9318511229784a12cdb413ae500e7a5b8195759e0d8d49946a9b00f62e8dda07e8a2"
+ ]
+}
diff --git a/esy.lock/opam/atdgen.2.0.0/opam b/esy.lock/opam/atdgen.2.0.0/opam
deleted file mode 100644
index d71d304e..00000000
--- a/esy.lock/opam/atdgen.2.0.0/opam
+++ /dev/null
@@ -1,44 +0,0 @@
-opam-version: "2.0"
-maintainer: "martin@mjambon.com"
-authors: ["Martin Jambon"]
-
-homepage: "https://github.com/mjambon/atd"
-bug-reports: "https://github.com/mjambon/atd/issues"
-dev-repo: "git://github.com/mjambon/atd.git"
-
-build: [
- ["jbuilder" "subst" "-p" name] {pinned}
- ["jbuilder" "build" "-p" name "-j" jobs]
-]
-
-# Restore when https://github.com/mjambon/atd/issues/121 is resolved.
-# build-test: [
-# ["jbuilder" "runtest" "-p" name]
-# ]
-
-depends: [
- "ocaml" {>= "4.03.0"}
- "jbuilder"
- "atd" {>= "2.0.0"}
- "atdgen-runtime" {>= "2.0.0"}
- "biniou" {>= "1.0.6"}
- "yojson" {>= "1.2.1"}
-]
-synopsis:
- "Generates efficient JSON serializers, deserializers and validators"
-description: """
-Atdgen is a command-line program that takes as input type definitions in the
-ATD syntax and produces OCaml code suitable for data serialization and
-deserialization.
-
-Two data formats are currently supported, these are biniou and JSON.
-Atdgen-biniou and Atdgen-json will refer to Atdgen used in one context or the
-other.
-
-Atdgen was designed with efficiency and durability in mind. Software authors
-are encouraged to use Atdgen directly and to write tools that may reuse part of
-Atdgen’s source code."""
-url {
- src: "https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz"
- checksum: "md5=14e47609397c524ea0eae7c3f14f7ccf"
-}
diff --git a/esy.lock/opam/atdgen.2.2.1/opam b/esy.lock/opam/atdgen.2.2.1/opam
new file mode 100644
index 00000000..8831a69a
--- /dev/null
+++ b/esy.lock/opam/atdgen.2.2.1/opam
@@ -0,0 +1,63 @@
+opam-version: "2.0"
+synopsis:
+ "Generates efficient JSON serializers, deserializers and validators"
+description: """
+Atdgen is a command-line program that takes as input type definitions in the ATD
+syntax and produces OCaml code suitable for data serialization and
+deserialization.
+Two data formats are currently supported, these are biniou and JSON.
+Atdgen-biniou and Atdgen-json will refer to Atdgen used in one context or the
+other.
+Atdgen was designed with efficiency and durability in mind. Software authors are
+encouraged to use Atdgen directly and to write tools that may reuse part of
+Atdgen’s source code."""
+maintainer: ["Rudi Grinberg "]
+authors: [
+ "Martin Jambon "
+ "David Sheets "
+ "Rudi Grinberg "
+ "Ivan Jager "
+ "Jeff Meister "
+ "Carmelo Piccione "
+ "Raman Varabets "
+ "Mathieu Baudet "
+ "Rauan Mayemir "
+ "Louis Roché "
+ "Brendan Long "
+ "Christophe Troestler "
+ "Vincent Bernardoff "
+ "haoyang "
+]
+license: "MIT"
+homepage: "https://github.com/ahrefs/atd"
+bug-reports: "https://github.com/ahrefs/atd/issues"
+depends: [
+ "ocaml" {>= "4.02"}
+ "dune" {>= "2.0"}
+ "atd" {>= "2.0.0"}
+ "atdgen-runtime" {>= "2.0.0"}
+ "atdgen-codec-runtime" {with-test}
+ "biniou" {>= "1.0.6"}
+ "yojson" {>= "1.7.0"}
+]
+dev-repo: "git+https://github.com/ahrefs/atd.git"
+build: [
+ ["dune" "subst"] {pinned}
+ [
+ "dune"
+ "build"
+ "-p"
+ name
+ "-j"
+ jobs
+ "@install"
+ "@doc" {with-doc}
+ ]
+]
+url {
+ src: "https://github.com/ahrefs/atd/releases/download/2.2.1/atd-2.2.1.tbz"
+ checksum: [
+ "sha256=db6b4c1a6293b214a7b7a3da435e681abd1b16b55d5aa246b93d26736d3a559e"
+ "sha512=0c7f1985cc4d87ddd541bb2f7085b72f81aaef69468653319a4a52e6cd6c9318511229784a12cdb413ae500e7a5b8195759e0d8d49946a9b00f62e8dda07e8a2"
+ ]
+}
diff --git a/esy.lock/opam/dune-build-info.2.5.1/opam b/esy.lock/opam/dune-build-info.2.5.1/opam
new file mode 100644
index 00000000..c833ebbb
--- /dev/null
+++ b/esy.lock/opam/dune-build-info.2.5.1/opam
@@ -0,0 +1,40 @@
+opam-version: "2.0"
+synopsis: "Embed build informations inside executable"
+description: """
+The build-info library allows to access information about how the
+executable was built, such as the version of the project at which it
+was built or the list of statically linked libraries with their
+versions. It supports reporting the version from the version control
+system during development to get an precise reference of when the
+executable was built.
+"""
+maintainer: ["Jane Street Group, LLC "]
+authors: ["Jane Street Group, LLC "]
+license: "MIT"
+homepage: "https://github.com/ocaml/dune"
+doc: "https://dune.readthedocs.io/"
+bug-reports: "https://github.com/ocaml/dune/issues"
+depends: [
+ "dune" {>= "2.3"}
+]
+dev-repo: "git+https://github.com/ocaml/dune.git"
+build: [
+ ["dune" "subst"] {pinned}
+ [
+ "dune"
+ "build"
+ "-p"
+ name
+ "-j"
+ jobs
+ "@install"
+ "@doc" {with-doc}
+ ]
+]
+url {
+ src: "https://github.com/ocaml/dune/releases/download/2.5.1/dune-2.5.1.tbz"
+ checksum: [
+ "sha256=8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b"
+ "sha512=f209f12ced10c1abf8782bdb0143f4cec77795f7174d2cc75130afb1e01550b01f2f77b9e3ec4888efdad83d2f9878d179b39126f824f4e522f3ef4da34bf27e"
+ ]
+}
diff --git a/esy.lock/opam/dune-configurator.2.3.0/opam b/esy.lock/opam/dune-configurator.2.5.1/opam
similarity index 77%
rename from esy.lock/opam/dune-configurator.2.3.0/opam
rename to esy.lock/opam/dune-configurator.2.5.1/opam
index b403ac56..52e00de4 100644
--- a/esy.lock/opam/dune-configurator.2.3.0/opam
+++ b/esy.lock/opam/dune-configurator.2.5.1/opam
@@ -35,9 +35,9 @@ build: [
]
]
url {
- src: "https://github.com/ocaml/dune/releases/download/2.3.0/dune-2.3.0.tbz"
+ src: "https://github.com/ocaml/dune/releases/download/2.5.1/dune-2.5.1.tbz"
checksum: [
- "sha256=14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff"
- "sha512=6db9eed508e59b832a80b24c62e1de4d8bcf2bff2ef75eb3a396dbe9f899f351875027b0a7d7156ac1a7f6eb7bdfdcb09a933cb4f81d5ca3174c8f74356aeda9"
+ "sha256=8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b"
+ "sha512=f209f12ced10c1abf8782bdb0143f4cec77795f7174d2cc75130afb1e01550b01f2f77b9e3ec4888efdad83d2f9878d179b39126f824f4e522f3ef4da34bf27e"
]
}
diff --git a/esy.lock/opam/dune-private-libs.2.3.0/opam b/esy.lock/opam/dune-private-libs.2.5.1/opam
similarity index 74%
rename from esy.lock/opam/dune-private-libs.2.3.0/opam
rename to esy.lock/opam/dune-private-libs.2.5.1/opam
index 64e596c9..074ce9ad 100644
--- a/esy.lock/opam/dune-private-libs.2.3.0/opam
+++ b/esy.lock/opam/dune-private-libs.2.5.1/opam
@@ -34,9 +34,9 @@ build: [
]
]
url {
- src: "https://github.com/ocaml/dune/releases/download/2.3.0/dune-2.3.0.tbz"
+ src: "https://github.com/ocaml/dune/releases/download/2.5.1/dune-2.5.1.tbz"
checksum: [
- "sha256=14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff"
- "sha512=6db9eed508e59b832a80b24c62e1de4d8bcf2bff2ef75eb3a396dbe9f899f351875027b0a7d7156ac1a7f6eb7bdfdcb09a933cb4f81d5ca3174c8f74356aeda9"
+ "sha256=8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b"
+ "sha512=f209f12ced10c1abf8782bdb0143f4cec77795f7174d2cc75130afb1e01550b01f2f77b9e3ec4888efdad83d2f9878d179b39126f824f4e522f3ef4da34bf27e"
]
}
diff --git a/esy.lock/opam/dune.2.3.0/opam b/esy.lock/opam/dune.2.5.0/opam
similarity index 85%
rename from esy.lock/opam/dune.2.3.0/opam
rename to esy.lock/opam/dune.2.5.0/opam
index 3566b7ff..7441e4dd 100644
--- a/esy.lock/opam/dune.2.3.0/opam
+++ b/esy.lock/opam/dune.2.5.0/opam
@@ -46,9 +46,9 @@ depends: [
"base-threads"
]
url {
- src: "https://github.com/ocaml/dune/releases/download/2.3.0/dune-2.3.0.tbz"
+ src: "https://github.com/ocaml/dune/releases/download/2.5.0/dune-2.5.0.tbz"
checksum: [
- "sha256=14a4321e38e8f6508f0d522649c6c580efd5e87805a370a66cc8aafcc46d5cff"
- "sha512=6db9eed508e59b832a80b24c62e1de4d8bcf2bff2ef75eb3a396dbe9f899f351875027b0a7d7156ac1a7f6eb7bdfdcb09a933cb4f81d5ca3174c8f74356aeda9"
+ "sha256=9cc1661b9b173dd183867edcf8ee28a9ce79079a7d00316b719bdcba1d78d7da"
+ "sha512=fa29986243b73caa6ca01acbc55cfba5e454e069e737f53c32bee5abc7e3c4679fecdec232d34af63954287bebf0fb1cabe4a95c56147f457d82d1a72dd44223"
]
}
diff --git a/esy.lock/opam/fix.20200131/opam b/esy.lock/opam/fix.20200131/opam
new file mode 100644
index 00000000..4babcba8
--- /dev/null
+++ b/esy.lock/opam/fix.20200131/opam
@@ -0,0 +1,24 @@
+opam-version: "2.0"
+maintainer: "francois.pottier@inria.fr"
+authors: [
+ "François Pottier "
+]
+homepage: "https://gitlab.inria.fr/fpottier/fix"
+dev-repo: "git+https://gitlab.inria.fr/fpottier/fix.git"
+bug-reports: "francois.pottier@inria.fr"
+build: [
+ ["dune" "build" "-p" name "-j" jobs]
+]
+depends: [
+ "ocaml" { >= "4.03" }
+ "dune" { >= "1.3" }
+]
+synopsis: "Facilities for memoization and fixed points"
+url {
+ src:
+ "https://gitlab.inria.fr/fpottier/fix/repository/20200131/archive.tar.gz"
+ checksum: [
+ "md5=991ff031666c662eaab638d2e0f4ac1d"
+ "sha512=01c45a1d90b02ec0939e968b185a6a373ac6117e2287b9a26d3db9d71e9569d086cea50da60710fcab5c2ed9d3b4c72b76839c0651e436f1fb39c77dc7c04b5e"
+ ]
+}
diff --git a/esy.lock/opam/jbuilder.1.0+beta20.2/opam b/esy.lock/opam/jbuilder.1.0+beta20.2/opam
deleted file mode 100644
index 2e411c9e..00000000
--- a/esy.lock/opam/jbuilder.1.0+beta20.2/opam
+++ /dev/null
@@ -1,39 +0,0 @@
-opam-version: "2.0"
-maintainer: "opensource@janestreet.com"
-authors: ["Jane Street Group, LLC "]
-homepage: "https://github.com/ocaml/dune"
-bug-reports: "https://github.com/ocaml/dune/issues"
-dev-repo: "git+https://github.com/ocaml/dune.git"
-license: "Apache-2.0"
-build: [
- ["ocaml" "configure.ml" "--libdir" lib]
- ["ocaml" "bootstrap.ml"]
- ["./boot.exe" "--subst"] {pinned}
- ["./boot.exe" "-j" jobs]
-]
-synopsis: "Fast, portable and opinionated build system"
-description: """
-jbuilder is a build system that was designed to simplify the release
-of Jane Street packages. It reads metadata from "jbuild" files
-following a very simple s-expression syntax.
-
-jbuilder is fast, it has very low-overhead and support parallel builds
-on all platforms. It has no system dependencies, all you need to build
-jbuilder and packages using jbuilder is OCaml. You don't need or make
-or bash as long as the packages themselves don't use bash explicitely.
-
-jbuilder supports multi-package development by simply dropping multiple
-repositories into the same directory.
-
-It also supports multi-context builds, such as building against
-several opam roots/switches simultaneously. This helps maintaining
-packages across several versions of OCaml and gives cross-compilation
-for free."""
-depends: [
- "ocaml" {>= "4.02.3"}
-]
-url {
- src:
- "https://github.com/ocaml/dune/releases/download/1.0%2Bbeta20.2/jbuilder-1.0+beta20.2.tbz"
- checksum: "md5=fbe8c3b1facb206cac3fb8932b5dd5d9"
-}
diff --git a/esy.lock/opam/menhir.20200211/opam b/esy.lock/opam/menhir.20200612/opam
similarity index 66%
rename from esy.lock/opam/menhir.20200211/opam
rename to esy.lock/opam/menhir.20200612/opam
index f1f18fcf..cf569781 100644
--- a/esy.lock/opam/menhir.20200211/opam
+++ b/esy.lock/opam/menhir.20200612/opam
@@ -12,16 +12,16 @@ build: [
]
depends: [
"ocaml" {>= "4.02.3"}
- "dune" {>= "2.2.0"}
+ "dune" { >= "2.2.0"}
"menhirLib" {= version}
"menhirSdk" {= version}
]
synopsis: "An LR(1) parser generator"
url {
src:
- "https://gitlab.inria.fr/fpottier/menhir/repository/20200211/archive.tar.gz"
+ "https://gitlab.inria.fr/fpottier/menhir/repository/20200612/archive.tar.gz"
checksum: [
- "md5=01577e5f15380c35bdaa8fd818204560"
- "sha512=a686c4b047d5236c425afcd7f179964191268ff448b8d18510579d742a7256855049bc4fe568bb8f1b0d6cbfb758d95cd05e621e3410b75245bb799d623725d6"
+ "md5=eb1c13439a00195ee01e4a2e83b3e991"
+ "sha512=c94ddc2b2d8b9f5d05d8493a3ccd4a32e4512c3bd19ac8948905eb64bb6f2fd9e236344d2baf3d2ebae379d08d5169c99aa5e721c65926127e22ea283eba6167"
]
}
diff --git a/esy.lock/opam/menhirLib.20200211/opam b/esy.lock/opam/menhirLib.20200612/opam
similarity index 59%
rename from esy.lock/opam/menhirLib.20200211/opam
rename to esy.lock/opam/menhirLib.20200612/opam
index 28d3e426..1054f156 100644
--- a/esy.lock/opam/menhirLib.20200211/opam
+++ b/esy.lock/opam/menhirLib.20200612/opam
@@ -11,15 +11,18 @@ build: [
["dune" "build" "-p" name "-j" jobs]
]
depends: [
- "ocaml" {>= "4.02.3"}
- "dune" {>= "2.0.0"}
+ "ocaml" { >= "4.02.3" }
+ "dune" { >= "2.0.0" }
+]
+conflicts: [
+ "menhir" { != version }
]
synopsis: "Runtime support library for parsers generated by Menhir"
url {
src:
- "https://gitlab.inria.fr/fpottier/menhir/repository/20200211/archive.tar.gz"
+ "https://gitlab.inria.fr/fpottier/menhir/repository/20200612/archive.tar.gz"
checksum: [
- "md5=01577e5f15380c35bdaa8fd818204560"
- "sha512=a686c4b047d5236c425afcd7f179964191268ff448b8d18510579d742a7256855049bc4fe568bb8f1b0d6cbfb758d95cd05e621e3410b75245bb799d623725d6"
+ "md5=eb1c13439a00195ee01e4a2e83b3e991"
+ "sha512=c94ddc2b2d8b9f5d05d8493a3ccd4a32e4512c3bd19ac8948905eb64bb6f2fd9e236344d2baf3d2ebae379d08d5169c99aa5e721c65926127e22ea283eba6167"
]
}
diff --git a/esy.lock/opam/menhirSdk.20200211/opam b/esy.lock/opam/menhirSdk.20200612/opam
similarity index 59%
rename from esy.lock/opam/menhirSdk.20200211/opam
rename to esy.lock/opam/menhirSdk.20200612/opam
index 524045ea..5db8741f 100644
--- a/esy.lock/opam/menhirSdk.20200211/opam
+++ b/esy.lock/opam/menhirSdk.20200612/opam
@@ -11,15 +11,18 @@ build: [
["dune" "build" "-p" name "-j" jobs]
]
depends: [
- "ocaml" {>= "4.02.3"}
- "dune" {>= "2.0.0"}
+ "ocaml" { >= "4.02.3" }
+ "dune" { >= "2.0.0" }
+]
+conflicts: [
+ "menhir" { != version }
]
synopsis: "Compile-time library for auxiliary tools related to Menhir"
url {
src:
- "https://gitlab.inria.fr/fpottier/menhir/repository/20200211/archive.tar.gz"
+ "https://gitlab.inria.fr/fpottier/menhir/repository/20200612/archive.tar.gz"
checksum: [
- "md5=01577e5f15380c35bdaa8fd818204560"
- "sha512=a686c4b047d5236c425afcd7f179964191268ff448b8d18510579d742a7256855049bc4fe568bb8f1b0d6cbfb758d95cd05e621e3410b75245bb799d623725d6"
+ "md5=eb1c13439a00195ee01e4a2e83b3e991"
+ "sha512=c94ddc2b2d8b9f5d05d8493a3ccd4a32e4512c3bd19ac8948905eb64bb6f2fd9e236344d2baf3d2ebae379d08d5169c99aa5e721c65926127e22ea283eba6167"
]
}
diff --git a/esy.lock/opam/merlin-extend.0.5/opam b/esy.lock/opam/merlin-extend.0.5/opam
index a3ae0d30..fc37e670 100644
--- a/esy.lock/opam/merlin-extend.0.5/opam
+++ b/esy.lock/opam/merlin-extend.0.5/opam
@@ -12,7 +12,7 @@ build: [
depends: [
"dune" {>= "1.0"}
"cppo" {build}
- "ocaml" {>= "4.02.3"}
+ "ocaml" {>= "4.02.3" & < "4.11"}
]
synopsis: "A protocol to provide custom frontend to Merlin"
description: """
diff --git a/esy.lock/opam/ocaml-migrate-parsetree.1.6.0/opam b/esy.lock/opam/ocaml-migrate-parsetree.1.7.3/opam
similarity index 77%
rename from esy.lock/opam/ocaml-migrate-parsetree.1.6.0/opam
rename to esy.lock/opam/ocaml-migrate-parsetree.1.7.3/opam
index 2437975a..09ef0da3 100644
--- a/esy.lock/opam/ocaml-migrate-parsetree.1.6.0/opam
+++ b/esy.lock/opam/ocaml-migrate-parsetree.1.7.3/opam
@@ -17,7 +17,7 @@ depends: [
"result"
"ppx_derivers"
"dune" {>= "1.9.0"}
- "ocaml" {>= "4.02.3"}
+ "ocaml" {>= "4.02.3" & < "4.12"}
]
synopsis: "Convert OCaml parsetrees between different versions"
description: """
@@ -29,9 +29,9 @@ rewriters independent of a compiler version.
"""
url {
src:
- "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.6.0/ocaml-migrate-parsetree-v1.6.0.tbz"
+ "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.7.3/ocaml-migrate-parsetree-v1.7.3.tbz"
checksum: [
- "sha256=9b018e7d25114ce17fc0b82b7cd7c927b84ebb6b043aa987fa7731c2484de33f"
- "sha512=e03a5fe44ecf43683c764a7285a65bfa80639c09badf422661723bc3483d6d799c47c1ead34c2caa289a37e1b4b46d809c8cc56537d5c76e6004849d2d8a305f"
+ "sha256=6d85717bcf476b87f290714872ed4fbde0233dc899c3158a27f439d70224fb55"
+ "sha512=fe9c74a244d160d973d8ca62e356edad4c872fc46471ddc668f854456d3979576895d446d49da2aee61c65b441b72c573225b0b254ab2eac4a0fb4debdbce9d4"
]
}
diff --git a/esy.lock/opam/ocamlformat.0.13.0/opam b/esy.lock/opam/ocamlformat.0.14.2/opam
similarity index 67%
rename from esy.lock/opam/ocamlformat.0.13.0/opam
rename to esy.lock/opam/ocamlformat.0.14.2/opam
index 34ba4181..443df3b9 100644
--- a/esy.lock/opam/ocamlformat.0.13.0/opam
+++ b/esy.lock/opam/ocamlformat.0.14.2/opam
@@ -4,14 +4,6 @@ authors: "Josh Berdine "
homepage: "https://github.com/ocaml-ppx/ocamlformat"
bug-reports: "https://github.com/ocaml-ppx/ocamlformat/issues"
dev-repo: "git+https://github.com/ocaml-ppx/ocamlformat.git"
-url {
- src:
- "https://github.com/ocaml-ppx/ocamlformat/releases/download/0.13.0/ocamlformat-0.13.0-2.tbz"
- checksum: [
- "sha256=b84b694ef7c957bc05f938c98c687da77645cddab1c5ec6ae270f6113175224e"
- "sha512=88d0c4c1746c08f3bd34a0d1e1e34dda1496d1d96f613e2523923ce7d9e9e31b0e5cc7ab7f6634d04ea6354aa777972a248b9c7bc4f817b4ad357277e4da781e"
- ]
-}
license: "MIT"
build: [
["ocaml" "tools/gen_version.mlt" "lib/Version.ml" version] {pinned}
@@ -19,21 +11,30 @@ build: [
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]
depends: [
- "ocaml" {>= "4.06"}
- "ocaml" {with-test & >= "4.08"}
+ "ocaml" {>= "4.06" & < "4.11"}
"alcotest" {with-test}
- "base" {>= "v0.11.0"}
+ "base" {>= "v0.11.0" & < "v0.14"}
"base-unix"
"cmdliner"
- "dune" {>= "1.11.1"}
+ "dune" {>= "2.2.0"}
+ "fix"
"fpath"
- "ocaml-migrate-parsetree" {>= "1.3.1"}
+ "menhir"
+ "ocaml-migrate-parsetree" {>= "1.5.0"}
"ocp-indent" {with-test}
"odoc" {>= "1.4.2"}
"re"
- "stdio"
+ "stdio" {< "v0.14"}
"uuseg" {>= "10.0.0"}
"uutf" {>= "1.0.1"}
]
synopsis: "Auto-formatter for OCaml code"
description: "OCamlFormat is a tool to automatically format OCaml code in a uniform style."
+url {
+ src:
+ "https://github.com/ocaml-ppx/ocamlformat/releases/download/0.14.2/ocamlformat-0.14.2.tbz"
+ checksum: [
+ "sha256=5f9f7ac312a8f62315e25536f87601efc7788114a4a1eacc0507acf474f8f09a"
+ "sha512=9f526031c2225b2d3d21c1f241517b9fb87752570645df587bace7afaa5e0e60922f873843343349a2f8f80d1d3e061ce23ee5199fa61a709b877c328a6f7729"
+ ]
+}
diff --git a/esy.lock/opam/odoc.1.5.0/opam b/esy.lock/opam/odoc.1.5.1/opam
similarity index 73%
rename from esy.lock/opam/odoc.1.5.0/opam
rename to esy.lock/opam/odoc.1.5.1/opam
index 99f9336f..d216fb2f 100644
--- a/esy.lock/opam/odoc.1.5.0/opam
+++ b/esy.lock/opam/odoc.1.5.1/opam
@@ -12,7 +12,7 @@ authors: [
"Anton Bachin "
"Jon Ludlam "
]
-maintainer: "Anton Bachin "
+maintainer: "Jon Ludlam "
dev-repo: "git+https://github.com/ocaml/odoc.git"
synopsis: "OCaml documentation generator"
@@ -44,9 +44,9 @@ build: [
["dune" "build" "-p" name "-j" jobs]
]
url {
- src: "https://github.com/ocaml/odoc/releases/download/1.5.0/odoc-1.5.0.tbz"
+ src: "https://github.com/ocaml/odoc/releases/download/1.5.1/odoc-1.5.1.tbz"
checksum: [
- "sha256=857759be968070bfda208add3ae2c2bc87826ca2bfc39cebab1cc1e13db7a140"
- "sha512=9573230f6ebd7f95d44a5e34f6de68f6b1b530cc7987402f84532e339498dde702082517066c4db428a334510af625db8055ecd03d91b57dd599fd5b3ac53f49"
+ "sha256=ea14721344e2aab6b63f2884782d37e94a1ed8ab91147a1c08a29710d99d354f"
+ "sha512=b2d12277d61e1e52354128d459d2ad49bea24a4d46db89790769c2843c4b00beaee3ea7d0215211079174c0bd893de6bf52dcbb71e46622728be7491d91058b2"
]
}
diff --git a/esy.lock/opam/ppx_yojson_conv_lib.v0.14.0/opam b/esy.lock/opam/ppx_yojson_conv_lib.v0.14.0/opam
new file mode 100644
index 00000000..3887c8f6
--- /dev/null
+++ b/esy.lock/opam/ppx_yojson_conv_lib.v0.14.0/opam
@@ -0,0 +1,24 @@
+opam-version: "2.0"
+maintainer: "opensource@janestreet.com"
+authors: ["Jane Street Group, LLC "]
+homepage: "https://github.com/janestreet/ppx_yojson_conv_lib"
+bug-reports: "https://github.com/janestreet/ppx_yojson_conv_lib/issues"
+dev-repo: "git+https://github.com/janestreet/ppx_yojson_conv_lib.git"
+doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_yojson_conv_lib/index.html"
+license: "MIT"
+build: [
+ ["dune" "build" "-p" name "-j" jobs]
+]
+depends: [
+ "ocaml" {>= "4.02.3"}
+ "dune" {>= "2.0.0"}
+ "yojson" {>= "1.7.0"}
+]
+synopsis: "Runtime lib for ppx_yojson_conv"
+description: "
+Part of the Jane Street's PPX rewriters collection.
+"
+url {
+ src: "https://ocaml.janestreet.com/ocaml-core/v0.14/files/ppx_yojson_conv_lib-v0.14.0.tar.gz"
+ checksum: "md5=e23c5593a7211ad4fb09e26e9a74698a"
+}
diff --git a/esy.lock/opam/reason.3.5.2/opam b/esy.lock/opam/reason.3.6.0/opam
similarity index 89%
rename from esy.lock/opam/reason.3.5.2/opam
rename to esy.lock/opam/reason.3.6.0/opam
index beddb779..8ef36186 100644
--- a/esy.lock/opam/reason.3.5.2/opam
+++ b/esy.lock/opam/reason.3.6.0/opam
@@ -12,11 +12,12 @@ build: [
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]
depends: [
- "ocaml" {>= "4.02" & < "4.10"}
+ "ocaml" {>= "4.03" & < "4.11"}
"dune" {>= "1.4"}
"ocamlfind" {build}
"menhir" {>= "20170418"}
"merlin-extend" {>= "0.4"}
+ "fix"
"result"
"ocaml-migrate-parsetree"
]
@@ -26,6 +27,6 @@ Reason gives OCaml a new syntax that is remniscient of languages like
JavaScript. It's also the umbrella project for a set of tools for the OCaml &
JavaScript ecosystem."""
url {
- src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz"
- checksum: "md5=66c54296009e0f6cbc8e93aa01105cbb"
+ src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.6.0.tgz"
+ checksum: "md5=d4d729804bc509bca0ac6223e06f7314"
}
diff --git a/esy.lock/opam/result.1.4/opam b/esy.lock/opam/result.1.5/opam
similarity index 83%
rename from esy.lock/opam/result.1.4/opam
rename to esy.lock/opam/result.1.5/opam
index b44aeead..671af042 100644
--- a/esy.lock/opam/result.1.4/opam
+++ b/esy.lock/opam/result.1.5/opam
@@ -17,6 +17,6 @@ while staying compatible with older version of OCaml should use the
Result module defined in this library."""
url {
src:
- "https://github.com/janestreet/result/archive/1.4.tar.gz"
- checksum: "md5=d3162dbc501a2af65c8c71e0866541da"
+ "https://github.com/janestreet/result/releases/download/1.5/result-1.5.tbz"
+ checksum: "md5=1b82dec78849680b49ae9a8a365b831b"
}
diff --git a/esy.lock/opam/tyxml.4.3.0/opam b/esy.lock/opam/tyxml.4.4.0/opam
similarity index 76%
rename from esy.lock/opam/tyxml.4.3.0/opam
rename to esy.lock/opam/tyxml.4.4.0/opam
index 93872f8b..51532b53 100644
--- a/esy.lock/opam/tyxml.4.3.0/opam
+++ b/esy.lock/opam/tyxml.4.4.0/opam
@@ -4,7 +4,7 @@ homepage: "https://github.com/ocsigen/tyxml/"
bug-reports: "https://github.com/ocsigen/tyxml/issues"
doc: "https://ocsigen.org/tyxml/manual/"
dev-repo: "git+https://github.com/ocsigen/tyxml.git"
-license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
+license: "LGPL-2.1 with OCaml linking exception"
build: [
["dune" "subst"] {pinned}
@@ -14,12 +14,11 @@ build: [
depends: [
"ocaml" {>= "4.02"}
- "re" {>= "1.5.0"}
- ("ocaml" {>= "4.07"} | "re" {>= "1.8.0"})
"dune"
"alcotest" {with-test}
"seq"
"uutf" {>= "1.0.0"}
+ "re" {>= "1.5.0"}
]
synopsis:"TyXML is a library for building correct HTML and SVG documents"
@@ -40,6 +39,9 @@ let to_ocaml = Html.(a ~a:[a_href "ocaml.org"] [txt "OCaml!"])
authors: "The ocsigen team"
url {
src:
- "https://github.com/ocsigen/tyxml/releases/download/4.3.0/tyxml-4.3.0.tbz"
- checksum: "md5=fd834a567f813bf447cab5f4c3a723e2"
+ "https://github.com/ocsigen/tyxml/releases/download/4.4.0/tyxml-4.4.0.tbz"
+ checksum: [
+ "sha256=516394dd4a5c31726997c51d66aa31cacb91e3c46d4e16c7699130e204042530"
+ "sha512=d5f2187f8410524cec7a14b28e8950837070eb0b6571b015dd06076c2841eb7ccaffa86d5d2307eaf1950ee62f9fb926477dac01c870d9c1a2f525853cb44d0c"
+ ]
}
diff --git a/esy.lock/opam/uucp.12.0.0/opam b/esy.lock/opam/uucp.13.0.0/opam
similarity index 83%
rename from esy.lock/opam/uucp.12.0.0/opam
rename to esy.lock/opam/uucp.13.0.0/opam
index 18bf0a84..525d082b 100644
--- a/esy.lock/opam/uucp.12.0.0/opam
+++ b/esy.lock/opam/uucp.13.0.0/opam
@@ -1,9 +1,6 @@
opam-version: "2.0"
maintainer: "Daniel Bünzli "
-authors: [
- "Daniel Bünzli "
- "David Kaloper Meršinjak "
-]
+authors: [ "The uucp programmers" ]
homepage: "https://erratique.ch/software/uucp"
doc: "https://erratique.ch/software/uucp/doc/Uucp"
dev-repo: "git+https://erratique.ch/repos/uucp.git"
@@ -11,11 +8,10 @@ bug-reports: "https://github.com/dbuenzli/uucp/issues"
tags: [ "unicode" "text" "character" "org:erratique" ]
license: "ISC"
depends: [
- "ocaml" {>= "4.01.0"}
+ "ocaml" {>= "4.03.0"}
"ocamlfind" {build}
"ocamlbuild" {build}
"topkg" {build}
- "uchar"
"uucd" {with-test} # dev really
"uunf" {with-test}
"uutf" {with-test}
@@ -30,6 +26,7 @@ build: [[
"--with-uunf" "%{uunf:installed}%"
"--with-cmdliner" "%{cmdliner:installed}%"
]]
+
synopsis: """Unicode character properties for OCaml"""
description: """\
@@ -42,6 +39,6 @@ dependencies. It is distributed under the ISC license.
[1]: http://www.unicode.org/reports/tr44/
"""
url {
-archive: "https://erratique.ch/software/uucp/releases/uucp-12.0.0.tbz"
-checksum: "cf210ed43375b7f882c0540874e2cb81"
+archive: "https://erratique.ch/software/uucp/releases/uucp-13.0.0.tbz"
+checksum: "07e706249ddb2d02f0fa298804d3c739"
}
diff --git a/esy.lock/opam/uuseg.12.0.0/opam b/esy.lock/opam/uuseg.13.0.0/opam
similarity index 85%
rename from esy.lock/opam/uuseg.12.0.0/opam
rename to esy.lock/opam/uuseg.13.0.0/opam
index 57dbdc65..3cef8bc5 100644
--- a/esy.lock/opam/uuseg.12.0.0/opam
+++ b/esy.lock/opam/uuseg.13.0.0/opam
@@ -1,18 +1,17 @@
opam-version: "2.0"
maintainer: "Daniel Bünzli "
-authors: ["Daniel Bünzli "]
+authors: ["The uuseg programmers"]
homepage: "https://erratique.ch/software/uuseg"
doc: "https://erratique.ch/software/uuseg"
dev-repo: "git+https://erratique.ch/repos/uuseg.git"
bug-reports: "https://github.com/dbuenzli/uuseg/issues"
tags: [ "segmentation" "text" "unicode" "org:erratique" ]
license: "ISC"
-depends: [ "ocaml" {>= "4.01.0"}
+depends: [ "ocaml" {>= "4.03.0"}
"ocamlfind" {build}
"ocamlbuild" {build}
"topkg" {build}
- "uchar"
- "uucp" {>= "12.0.0" & < "13.0.0"} ]
+ "uucp" {>= "13.0.0" & < "14.0.0"} ]
depopts: [ "uutf"
"cmdliner"
"uutf" {with-test}
@@ -45,6 +44,6 @@ OCaml UTF-X encoded strings. It is distributed under the ISC license.
[2]: http://www.unicode.org/reports/tr14/
"""
url {
-archive: "https://erratique.ch/software/uuseg/releases/uuseg-12.0.0.tbz"
-checksum: "1d4487ddf5154e3477e55021b978d58a"
+archive: "https://erratique.ch/software/uuseg/releases/uuseg-13.0.0.tbz"
+checksum: "a07a97fff61da604614ea8da0547ef6a"
}
diff --git a/graphql_schema.json b/graphql_schema.json
index aa8bc6b7..e566b4f8 100644
--- a/graphql_schema.json
+++ b/graphql_schema.json
@@ -315,6 +315,335 @@
"isDeprecated": false,
"deprecationReason": null
},
+ {
+ "name": "customFields",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "customFieldsResult",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "deprecatedFields",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "deprecatedFieldsResult",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "defaultObjectValueOnScalar",
+ "description": null,
+ "args": [
+ {
+ "name": "filter",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "JsonScalar",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "arg",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "EmbeddedInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "invalidDefaultValues",
+ "description": null,
+ "args": [
+ {
+ "name": "custom",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "CustomScalar",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "obj",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "EmbeddedInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "string",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "int",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "float",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "bool",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "invalidArgValues",
+ "description": null,
+ "args": [
+ {
+ "name": "stringRequired",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "string",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "custom",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "CustomScalar",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "obj",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "EmbeddedInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "list",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "invalidObjectValues",
+ "description": null,
+ "args": [
+ {
+ "name": "nonRec",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "NonrecursiveInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "rec",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "RecursiveInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "invalidObjectValuesLst",
+ "description": null,
+ "args": [
+ {
+ "name": "embeddedList",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "EmbeddedInputReq",
+ "ofType": null
+ }
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
{
"name": "dogOrHuman",
"description": null,
@@ -517,7 +846,7 @@
{
"kind": "SCALAR",
"name": "Int",
- "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
+ "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ",
"fields": null,
"inputFields": null,
"interfaces": null,
@@ -527,7 +856,7 @@
{
"kind": "SCALAR",
"name": "Float",
- "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
+ "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ",
"fields": null,
"inputFields": null,
"interfaces": null,
@@ -638,6 +967,33 @@
},
"isDeprecated": false,
"deprecationReason": null
+ },
+ {
+ "name": "listWithArg",
+ "description": null,
+ "args": [
+ {
+ "name": "arg1",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
}
],
"inputFields": null,
@@ -939,73 +1295,272 @@
"defaultValue": null
}
],
- "interfaces": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "SampleField",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": [
+ {
+ "name": "FIRST",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SECOND",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "THIRD",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "NonrecursiveInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "nonNullableField",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "nullableArray",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "field",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "enum",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "SampleField",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "embeddedInput",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "EmbeddedInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "custom",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "CustomScalar",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "EmbeddedInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "field",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "CustomScalar",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "CustomScalarObject",
+ "description": null,
+ "fields": [
+ {
+ "name": "nullable",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "CustomScalar",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "nonNullable",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "CustomScalar",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{
- "kind": "ENUM",
- "name": "SampleField",
+ "kind": "OBJECT",
+ "name": "customFieldsResult",
"description": null,
- "fields": null,
- "inputFields": null,
- "interfaces": null,
- "enumValues": [
+ "fields": [
{
- "name": "FIRST",
+ "name": "currentTime",
"description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "DateTime",
+ "ofType": null
+ }
+ },
"isDeprecated": false,
"deprecationReason": null
},
{
- "name": "SECOND",
+ "name": "favoriteColor",
"description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Color",
+ "ofType": null
+ }
+ },
"isDeprecated": false,
"deprecationReason": null
},
{
- "name": "THIRD",
- "description": null,
- "isDeprecated": false,
- "deprecationReason": null
- }
- ],
- "possibleTypes": null
- },
- {
- "kind": "INPUT_OBJECT",
- "name": "NonrecursiveInput",
- "description": null,
- "fields": null,
- "inputFields": [
- {
- "name": "field",
+ "name": "futureTime",
"description": null,
+ "args": [],
"type": {
"kind": "SCALAR",
- "name": "String",
+ "name": "DateTime",
"ofType": null
},
- "defaultValue": null
+ "isDeprecated": false,
+ "deprecationReason": null
},
{
- "name": "enum",
+ "name": "nullableColor",
"description": null,
+ "args": [],
"type": {
- "kind": "ENUM",
- "name": "SampleField",
+ "kind": "SCALAR",
+ "name": "Color",
"ofType": null
},
- "defaultValue": null
+ "isDeprecated": false,
+ "deprecationReason": null
}
],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "DateTime",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
- "name": "CustomScalar",
+ "name": "Color",
"description": null,
"fields": null,
"inputFields": null,
@@ -1015,23 +1570,23 @@
},
{
"kind": "OBJECT",
- "name": "CustomScalarObject",
+ "name": "deprecatedFieldsResult",
"description": null,
"fields": [
{
- "name": "nullable",
+ "name": "field1",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
- "name": "CustomScalar",
+ "name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
- "name": "nonNullable",
+ "name": "field2",
"description": null,
"args": [],
"type": {
@@ -1039,12 +1594,28 @@
"name": null,
"ofType": {
"kind": "SCALAR",
- "name": "CustomScalar",
+ "name": "Int",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
+ },
+ {
+ "name": "deprecatedField",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use something else instead"
}
],
"inputFields": null,
@@ -1052,6 +1623,41 @@
"enumValues": null,
"possibleTypes": null
},
+ {
+ "kind": "SCALAR",
+ "name": "JsonScalar",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "EmbeddedInputReq",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "field",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
{
"kind": "UNION",
"name": "DogOrHuman",
@@ -1203,6 +1809,22 @@
"isDeprecated": false,
"deprecationReason": null
},
+ {
+ "name": "mutationForVariant",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "VariantTestResult",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
{
"name": "optionalInputArgs",
"description": null,
@@ -1377,6 +1999,85 @@
"enumValues": null,
"possibleTypes": null
},
+ {
+ "kind": "OBJECT",
+ "name": "VariantTestResult",
+ "description": null,
+ "fields": [
+ {
+ "name": "baseType",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "baseTypeList",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "dog",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Dog",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "human",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Human",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "dogOrHuman",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "UNION",
+ "name": "DogOrHuman",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
{
"kind": "OBJECT",
"name": "Subscription",
@@ -2068,6 +2769,54 @@
},
"isDeprecated": false,
"deprecationReason": null
+ },
+ {
+ "name": "onOperation",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`."
+ },
+ {
+ "name": "onFragment",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`."
+ },
+ {
+ "name": "onField",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`."
}
],
"inputFields": null,
@@ -2125,12 +2874,6 @@
"isDeprecated": false,
"deprecationReason": null
},
- {
- "name": "VARIABLE_DEFINITION",
- "description": "Location adjacent to a variable definition.",
- "isDeprecated": false,
- "deprecationReason": null
- },
{
"name": "SCHEMA",
"description": "Location adjacent to a schema definition.",
@@ -2456,7 +3199,11 @@
{
"name": "skip",
"description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
- "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"],
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
"args": [
{
"name": "if",
@@ -2477,7 +3224,11 @@
{
"name": "include",
"description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
- "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"],
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
"args": [
{
"name": "if",
@@ -2498,11 +3249,14 @@
{
"name": "deprecated",
"description": "Marks an element of a GraphQL schema as no longer supported.",
- "locations": ["FIELD_DEFINITION", "ENUM_VALUE"],
+ "locations": [
+ "FIELD_DEFINITION",
+ "ENUM_VALUE"
+ ],
"args": [
{
"name": "reason",
- "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax (as specified by [CommonMark](https://commonmark.org/).",
+ "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",
"type": {
"kind": "SCALAR",
"name": "String",
@@ -2515,4 +3269,4 @@
]
}
}
-}
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index db0db760..69faab8f 100755
--- a/package.json
+++ b/package.json
@@ -1,14 +1,21 @@
{
- "name": "@baransu/graphql_ppx_re",
- "version": "0.6.6",
- "description": "GraphQL PPX rewriter for Bucklescript/ReasonML",
- "repository": "https://github.com/reasonml-community/graphql_ppx",
+ "name": "@reasonml-community/graphql-ppx",
+ "version": "1.0.0-beta.11",
+ "description": "graphql-ppx rewriter for Bucklescript/ReasonML",
+ "repository": "https://github.com/reasonml-community/graphql-ppx",
"author": "Tomasz Cichocinski ",
+ "contributors": [
+ "Tomasz Cichocinski ",
+ "Jaap Frölich "
+ ],
"license": "MIT",
"scripts": {
"postinstall": "node ./copyPlatformBinaryInPlace.js"
},
"publishConfig": {
"access": "public"
+ },
+ "dependencies": {
+ "bs-platform": "^7.3.2"
}
}
diff --git a/schema.graphql b/schema.graphql
index 7f316bf2..f94b4d3c 100644
--- a/schema.graphql
+++ b/schema.graphql
@@ -46,6 +46,28 @@ type Query {
argOptional: CustomScalar
argRequired: CustomScalar!
): CustomScalarObject!
+ customFields: customFieldsResult!
+ deprecatedFields: deprecatedFieldsResult!
+ defaultObjectValueOnScalar(filter: JsonScalar!, arg: EmbeddedInput!): String!
+ invalidDefaultValues(
+ custom: CustomScalar
+ obj: EmbeddedInput
+ id: ID
+ string: String
+ int: Int
+ float: Float
+ bool: Boolean
+ ): String!
+ invalidArgValues(
+ stringRequired: String!
+ string: String
+ custom: CustomScalar
+ obj: EmbeddedInput
+ id: ID
+ list: [String]
+ ): String!
+ invalidObjectValues(nonRec: NonrecursiveInput!, rec: RecursiveInput!): String!
+ invalidObjectValuesLst(embeddedList: [EmbeddedInputReq]!): String!
dogOrHuman: DogOrHuman!
@@ -54,6 +76,7 @@ type Query {
type Mutation {
mutationWithError: MutationWithErrorResult!
+ mutationForVariant: VariantTestResult!
optionalInputArgs(
required: String!
optional: String
@@ -103,6 +126,7 @@ type Lists {
nullableOfNonNullable: [String!]
nonNullableOfNullable: [String]!
nonNullableOfNonNullable: [String!]!
+ listWithArg(arg1: String): [String]
}
input VariousScalarsInput {
@@ -125,9 +149,21 @@ input ListsInput {
nonNullableOfNonNullable: [String!]!
}
+input EmbeddedInput {
+ field: String
+}
+
+input EmbeddedInputReq {
+ field: String!
+}
+
input NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
field: String
enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
}
input RecursiveInput {
@@ -163,3 +199,28 @@ type CustomScalarObject {
nullable: CustomScalar
nonNullable: CustomScalar!
}
+
+type VariantTestResult {
+ baseType: String
+ baseTypeList: [String!]
+ dog: Dog
+ human: Human
+ dogOrHuman: DogOrHuman
+}
+
+scalar DateTime
+scalar Color
+scalar JsonScalar
+
+type customFieldsResult {
+ currentTime: DateTime!
+ favoriteColor: Color!
+ futureTime: DateTime
+ nullableColor: Color
+}
+
+type deprecatedFieldsResult {
+ field1: String
+ field2: Int!
+ deprecatedField: String! @deprecated(reason: "Use something else instead")
+}
diff --git a/src/base/ast_serializer_apollo.re b/src/base/ast_serializer_apollo.re
index b598288f..7c84f160 100644
--- a/src/base/ast_serializer_apollo.re
+++ b/src/base/ast_serializer_apollo.re
@@ -58,7 +58,7 @@ let rec ser_value =
| {item: Iv_float(f), _} =>
`Assoc([
("kind", `String("FloatValue")),
- ("value", `String(string_of_float(f))),
+ ("value", `String(Printf.sprintf("%.16g", f))),
])
| {item: Iv_string(s), _} =>
`Assoc([("kind", `String("StringValue")), ("value", `String(s))])
diff --git a/src/base/ast_transforms.re b/src/base/ast_transforms.re
new file mode 100644
index 00000000..89b6e91d
--- /dev/null
+++ b/src/base/ast_transforms.re
@@ -0,0 +1,264 @@
+type t = (Schema.t, Graphql_ast.document) => Graphql_ast.document;
+type parent =
+ | Definition(Graphql_ast.definition)
+ | Selection(Graphql_ast.selection);
+
+let get_parent_span =
+ fun
+ | Selection(Graphql_ast.Field({span})) => span
+ | Selection(Graphql_ast.InlineFragment({span})) => span
+ | Selection(Graphql_ast.FragmentSpread({span})) => span
+ | Definition(Graphql_ast.Operation({span})) => span
+ | Definition(Graphql_ast.Fragment({span})) => span;
+
+// get's the type of a field name
+let rec safe_get_field_type = (schema, ty: Schema.type_meta, name) => {
+ let ty_fields =
+ switch (ty) {
+ | Interface({im_fields, _}) => im_fields
+ | Object({om_fields, _}) => om_fields
+ | _ => []
+ };
+ Schema.(
+ List.find_opt(fm => fm.Schema.fm_name == name, ty_fields)
+ |> Option.map(field => field.fm_field_type)
+ |> Option.map(Graphql_printer.type_ref_name)
+ |> Option.flat_map(Schema.lookup_type(schema))
+ );
+}
+and _unsafe_get_field_type = (schema, ty: Schema.type_meta, name) => {
+ safe_get_field_type(schema, ty, name) |> Option.unsafe_unwrap;
+};
+
+let traverse_selection_set = (schema, ty, selection_set, fn) => {
+ Graphql_ast.(
+ selection_set
+ |> List.map(
+ fun
+ | Graphql_ast.InlineFragment(
+ {
+ item: {
+ if_type_condition: Some(type_condition),
+ if_selection_set: selection,
+ },
+ } as field,
+ ) as parent => {
+ let field_ty = Schema.lookup_type(schema, type_condition.item);
+ switch (field_ty) {
+ | None => parent
+ | Some(field_ty) =>
+ let selection_set =
+ fn(Selection(parent), schema, field_ty, selection.item);
+ Graphql_ast.InlineFragment({
+ ...field,
+ item: {
+ ...field.item,
+ if_selection_set: {
+ ...selection,
+ item: selection_set,
+ },
+ },
+ });
+ };
+ }
+ | Graphql_ast.Field(
+ {item: {fd_selection_set: Some(selection)}} as field,
+ ) as parent => {
+ let field_ty =
+ safe_get_field_type(schema, ty, field.item.fd_name.item);
+ switch (field_ty) {
+ | None => parent
+ | Some(field_ty) =>
+ let selection_set =
+ fn(Selection(parent), schema, field_ty, selection.item);
+
+ Graphql_ast.Field({
+ ...field,
+ item: {
+ ...field.item,
+ fd_selection_set:
+ Some({...selection, item: selection_set}),
+ },
+ });
+ };
+ }
+ | other => other,
+ )
+ );
+};
+
+let rec do_add_typename_to_selection_set = (parent, schema, ty, selection_set) => {
+ let add_typename =
+ switch (ty, selection_set) {
+ | (_, []) => false
+ // do not add typename to a single fragment spread. It will be added in the
+ // fragment anyway, and it will prevent the result to be a single record of
+ // the type of the fragment
+ | (_, [Graphql_ast.FragmentSpread(_)]) => false
+ // do not inject `__typename` in interfaces and unions, the printer does that
+ // already behind the scenes
+ | (Schema.Interface(_), _selection_set) => false
+ | (Schema.Union(_), _selection_set) => false
+ | (Schema.Object({om_name}), _selection_set) =>
+ // do not inject __typename in top-level types
+ Schema.(
+ switch (schema) {
+ | {meta: {sm_subscription_type: Some(name)}} when name == om_name =>
+ false
+ | {meta: {sm_mutation_type: Some(name)}} when name == om_name =>
+ false
+ | {meta: {sm_query_type: name}} when name == om_name => false
+ | _ =>
+ switch (parent) {
+ // we cannot add typename when using @bsvariant
+ | Selection(
+ Graphql_ast.Field({item: {fd_directives: directives}}),
+ ) =>
+ !(
+ directives
+ |> List.exists((d: Source_pos.spanning(Graphql_ast.directive)) =>
+ d.item.d_name.item == "bsVariant"
+ )
+ )
+ | _ => true
+ }
+ }
+ )
+ | (_, _selection_set) => false
+ };
+ let selection_set =
+ traverse_selection_set(
+ schema,
+ ty,
+ selection_set,
+ do_add_typename_to_selection_set,
+ );
+
+ let already_has_typename =
+ selection_set
+ |> List.exists(
+ fun
+ | Graphql_ast.Field({item: {fd_name: {item: "__typename"}}}) =>
+ true
+ | _ => false,
+ );
+
+ let parent_span = get_parent_span(parent);
+ if (add_typename && !already_has_typename) {
+ [
+ Graphql_ast.Field({
+ span: parent_span,
+ item: {
+ fd_alias: None,
+ fd_name: {
+ span: (
+ {Source_pos.index: (-1), line: (-1), col: (-1)},
+ {Source_pos.index: (-1), line: (-1), col: (-1)},
+ ),
+ item: "__typename",
+ },
+ fd_arguments: None,
+ fd_directives: [],
+ fd_selection_set: None,
+ },
+ }),
+ ...selection_set,
+ ];
+ } else {
+ selection_set;
+ };
+};
+
+let rec do_remove_typename_from_union = (_parent, schema, ty, selection_set) => {
+ let selection_set =
+ switch (ty) {
+ | Schema.Interface(_)
+ | Schema.Union(_) =>
+ Graphql_ast.(
+ selection_set
+ |> List.fold_left(
+ acc =>
+ fun
+ | Field({item: {fd_name: {item: "__typename"}}}) => acc
+ | other => [other, ...acc],
+ [],
+ )
+ |> List.rev
+ )
+ | _ => selection_set
+ };
+ traverse_selection_set(
+ schema,
+ ty,
+ selection_set,
+ do_remove_typename_from_union,
+ );
+};
+
+let traverse_document_selections = (fn, schema: Schema.t, definitions) => {
+ Graphql_ast.(
+ definitions
+ |> List.map(def => {
+ switch (def) {
+ | Operation({item: op, span}) as parent =>
+ let ty_name =
+ switch (op.o_type) {
+ | Query => schema.meta.sm_query_type
+ | Mutation => Option.unsafe_unwrap(schema.meta.sm_mutation_type)
+ | Subscription =>
+ Option.unsafe_unwrap(schema.meta.sm_subscription_type)
+ };
+ let ty = Schema.lookup_type(schema, ty_name);
+ switch (ty) {
+ | None => parent
+ | Some(ty) =>
+ Operation({
+ span,
+ item: {
+ ...op,
+ o_selection_set: {
+ item:
+ fn(
+ Definition(parent),
+ schema,
+ ty,
+ op.o_selection_set.item,
+ ),
+ span: op.o_selection_set.span,
+ },
+ },
+ })
+ };
+
+ | Fragment({item: f, span}) as parent =>
+ let ty_name = f.fg_type_condition.item;
+ let ty = Schema.lookup_type(schema, ty_name);
+ switch (ty) {
+ | Some(ty) =>
+ Fragment({
+ item: {
+ ...f,
+ fg_selection_set: {
+ item:
+ fn(
+ Definition(parent),
+ schema,
+ ty,
+ f.fg_selection_set.item,
+ ),
+ span: f.fg_selection_set.span,
+ },
+ },
+ span,
+ })
+ | None => parent
+ };
+ }
+ })
+ );
+};
+
+let add_typename_to_selection_set =
+ traverse_document_selections(do_add_typename_to_selection_set);
+let remove_typename_from_union =
+ traverse_document_selections(do_remove_typename_from_union);
diff --git a/src/base/ast_transforms.rei b/src/base/ast_transforms.rei
new file mode 100644
index 00000000..7965dde4
--- /dev/null
+++ b/src/base/ast_transforms.rei
@@ -0,0 +1,26 @@
+/**
+ * An AST transform will take the schema and a document, and transform the AST
+ * of the document returning the same document type
+ *
+ * With these transforms we can slightly change the GraphQL operation or
+ * fragment compared to what the user supplies. This is helpful for instance
+ * to add fields that clients will add implicitly, or to preprocess the document
+ * to conform to some of the conventions of graphql-ppx.
+ */
+type t = (Schema.t, Graphql_ast.document) => Graphql_ast.document;
+
+/**
+ * This is a GraphQL AST transform that will add the __typename to all selection
+ * sets. This is necessary for Apollo, as this is an implicit field.
+ * If we don't include this when using Apollo, the __typename information is
+ * lost when we parse values and then serialize back to the js-values again
+ */
+let add_typename_to_selection_set: t;
+
+/**
+ * This is a GraphQL AST transform that removes the `__typename` field from
+ * unions. The PPX will add this in the printer stage, so it is always there.
+ * The PPX will not allow any scalar fields on a union except for the inline
+ * fragments, so we make sure to remove it before doing any further processing.
+ */
+let remove_typename_from_union: t;
diff --git a/src/base/dirty_checker.re b/src/base/dirty_checker.re
index 1ea87432..2450dadd 100644
--- a/src/base/dirty_checker.re
+++ b/src/base/dirty_checker.re
@@ -44,9 +44,9 @@ let dirty_update = (hash, checker) => {
switch (checker.dirty_callback(checker.src)) {
| () =>
write_hash(hash, checker.hash_path);
- Log.must_log("[update ok]");
+ Log.log("[update ok]");
| exception (Dirty_update_failure(msg)) =>
- Log.must_log("[update error] " ++ msg)
+ Log.error_log("[update error] " ++ msg)
};
};
diff --git a/src/base/dune b/src/base/dune
index 51cb64a5..5d8bfb84 100644
--- a/src/base/dune
+++ b/src/base/dune
@@ -2,6 +2,8 @@
(name graphql_ppx_base)
(public_name graphql_ppx.base)
(libraries unix result yojson)
+ (flags
+ (:standard -w -9))
(preprocess
(pps ppx_tools_versioned.metaquot_408)))
diff --git a/src/base/extract_type_definitions.re b/src/base/extract_type_definitions.re
new file mode 100644
index 00000000..d80d9454
--- /dev/null
+++ b/src/base/extract_type_definitions.re
@@ -0,0 +1,390 @@
+open Result_structure;
+open Graphql_ppx_base__;
+open Generator_utils;
+open Schema;
+open Source_pos;
+type path = list(string);
+
+// extract the typeref
+type extracted_type =
+ | Type(Schema.type_meta)
+ | TypeNotFound(string)
+ | Nullable(extracted_type)
+ | List(extracted_type);
+
+type object_field =
+ | Field({
+ type_: Result_structure.t,
+ loc_key: Source_pos.ast_location,
+ loc: Source_pos.ast_location,
+ path,
+ arguments: Graphql_ast.arguments,
+ })
+ | Fragment({
+ module_name: string,
+ key: string,
+ loc_key: Source_pos.ast_location,
+ type_name: option(string),
+ })
+and type_def =
+ | Object({
+ loc: Source_pos.ast_location,
+ variant_parent: bool,
+ force_record: bool,
+ path,
+ fields: list(object_field),
+ })
+ | VariantSelection({
+ loc: Source_pos.ast_location,
+ path,
+ fields: list((Result_structure.name, Result_structure.t)),
+ })
+ | VariantUnion({
+ loc: Source_pos.ast_location,
+ path,
+ fields: list((Result_structure.name, Result_structure.t)),
+ omit_future_value: bool,
+ })
+ | VariantInterface({
+ loc: Source_pos.ast_location,
+ path,
+ base: (string, Result_structure.t),
+ fields: list((string, Result_structure.t)),
+ })
+ | Enum({
+ loc: Source_pos.ast_location,
+ path,
+ fields: list(string),
+ omit_future_value: bool,
+ });
+
+type input_object_field =
+ | InputField({
+ type_: extracted_type,
+ name: string,
+ loc: Source_pos.ast_location,
+ loc_type: option(Source_pos.ast_location),
+ });
+
+type arg_type_def =
+ | NoVariables
+ | InputObject({
+ name: option(string),
+ fields: list(input_object_field),
+ loc: Source_pos.ast_location,
+ is_recursive: bool,
+ });
+
+let has_required_variables = (arg_types: list(arg_type_def)) => {
+ List.fold_left(
+ has_required =>
+ fun
+ | NoVariables => has_required
+ | InputObject({name: Some(_)}) => has_required
+ | InputObject({name: None, fields}) =>
+ List.fold_left(
+ has_required =>
+ fun
+ | InputField({type_: Nullable(_)}) => has_required
+ | InputField({type_: _}) => true,
+ has_required,
+ fields,
+ ),
+ false,
+ arg_types,
+ );
+};
+
+let generate_type_name = (~prefix="t") =>
+ fun
+ | [] => prefix
+ | path => {
+ path
+ |> List.rev
+ |> List.fold_left((acc, item) => acc ++ "_" ++ item, prefix);
+ };
+
+// function that generate types. It will output a nested list type descriptions
+// later this result can be flattened and converted to an ast of combined type
+// definitions
+let rec extract = (~variant=false, ~path, ~raw) =>
+ fun
+ | Res_nullable(_loc, inner) => extract(~path, ~raw, inner)
+ | Res_array(_loc, inner) => extract(~path, ~raw, inner)
+ | Res_object(loc, _name, fields, type_name) as result_structure
+ | Res_record(loc, _name, fields, type_name) as result_structure =>
+ switch (result_structure, type_name, raw) {
+ | (_, Some(_type_name), false) => create_children(path, raw, fields)
+ | (Res_record(_, _, _, _), _, false) =>
+ create_object(path, raw, fields, true, loc, variant)
+ | (_, _, _) => create_object(path, raw, fields, false, loc, variant)
+ }
+ | Res_poly_variant_union(loc, _name, fragments, _, omit_future_value) => [
+ VariantUnion({path, fields: fragments, loc, omit_future_value}),
+ ...extract_fragments(
+ fragments
+ |> List.map((({item: name}: Result_structure.name, t)) =>
+ (name, t)
+ ),
+ path,
+ raw,
+ ),
+ ]
+ | Res_poly_variant_selection_set(loc, _name, fragments) => [
+ VariantSelection({path, fields: fragments, loc}),
+ ...extract_fragments(
+ fragments
+ |> List.map((({item: name}: Result_structure.name, t)) =>
+ (name, t)
+ ),
+ path,
+ raw,
+ ),
+ ]
+ | Res_poly_variant_interface(loc, _name, base, fragments) => [
+ VariantInterface({path, fields: fragments, base, loc}),
+ ...extract_fragments(fragments, path, raw),
+ ]
+ | Res_custom_decoder(_loc, _ident, inner) => extract(~path, ~raw, inner)
+ | Res_solo_fragment_spread(_loc, _name, _) => []
+ | Res_error(_loc, _message) => []
+ | Res_id(_loc) => []
+ | Res_string(_loc) => []
+ | Res_int(_loc) => []
+ | Res_float(_loc) => []
+ | Res_boolean(_loc) => []
+ | Res_raw_scalar(_) => []
+ | Res_poly_enum(loc, enum_meta, omit_future_value) => [
+ Enum({
+ path,
+ fields: enum_meta.em_values |> List.map(({evm_name, _}) => evm_name),
+ loc,
+ omit_future_value,
+ }),
+ ]
+and _fragment_names = f => f |> List.map(((name, _)) => name)
+and extract_fragments = (fragments, path, raw) => {
+ fragments
+ |> List.fold_left(
+ (acc, (name, inner)) =>
+ List.append(
+ extract(~variant=true, ~path=[name, ...path], ~raw, inner),
+ acc,
+ ),
+ [],
+ );
+}
+and create_children = (path, raw, fields) => {
+ fields
+ |> List.fold_left(
+ acc =>
+ fun
+ | Fr_named_field({name, type_}) =>
+ List.append(extract(~path=[name, ...path], ~raw, type_), acc)
+ | Fr_fragment_spread(_key, _loc, _name, _, _arguments) => acc,
+ [],
+ );
+}
+and create_object = (path, raw, fields, force_record, loc, variant_parent) => {
+ [
+ Object({
+ variant_parent,
+ loc,
+ force_record,
+ path,
+ fields:
+ fields
+ |> List.map(
+ fun
+ | Fr_named_field({name, loc, loc_key, type_, arguments}) => {
+ Field({
+ loc,
+ loc_key,
+ path: [name, ...path],
+ type_,
+ arguments,
+ });
+ }
+ | Fr_fragment_spread(key, loc_key, name, type_name, _arguments) =>
+ Fragment({module_name: name, key, loc_key, type_name}),
+ ),
+ }),
+ ...create_children(path, raw, fields),
+ ];
+};
+
+let _raise_inconsistent_schema = (type_name, loc) =>
+ raise_error_with_loc(
+ loc,
+ "Inconsistent schema, type named " ++ type_name ++ " cannot be found",
+ );
+
+let fetch_type = (schema, type_ref) => {
+ let type_name = innermost_name(type_ref);
+ (type_name, lookup_type(schema, type_name));
+};
+
+let rec convert_type_ref = schema =>
+ fun
+ | Named(type_name) =>
+ Nullable(
+ switch (lookup_type(schema, type_name)) {
+ | None => TypeNotFound(type_name)
+ | Some(type_) => Type(type_)
+ },
+ )
+ | NonNull(Named(type_name)) =>
+ switch (lookup_type(schema, type_name)) {
+ | None => TypeNotFound(type_name)
+ | Some(type_) => Type(type_)
+ }
+ | List(type_ref) => Nullable(List(convert_type_ref(schema, type_ref)))
+ | NonNull(List(type_ref)) => List(convert_type_ref(schema, type_ref))
+ // fold multiple non_nulls
+ | NonNull(NonNull(inner)) => convert_type_ref(schema, NonNull(inner));
+
+let generate_input_field_types =
+ (
+ _input_obj_name,
+ schema: Schema.t,
+ fields:
+ list(
+ (
+ string,
+ Schema.type_ref,
+ Source_pos.ast_location,
+ option(Source_pos.ast_location),
+ ),
+ ),
+ ) => {
+ fields
+ |> List.fold_left(
+ (acc, (name, type_ref, loc, loc_type)) => {
+ [
+ InputField({
+ name,
+ type_: convert_type_ref(schema, type_ref),
+ loc,
+ loc_type,
+ }),
+ ...acc,
+ ]
+ },
+ [],
+ )
+ |> List.rev;
+};
+
+let rec get_inner_type = (type_: extracted_type) => {
+ switch (type_) {
+ | Type(_) => Some(type_)
+ | Nullable(inner) => get_inner_type(inner)
+ | List(inner) => get_inner_type(inner)
+ | TypeNotFound(_) => None
+ };
+};
+
+let get_input_object_name = (InputField({type_, _})) => {
+ let type_ = get_inner_type(type_);
+ switch (type_) {
+ | Some(Type(InputObject({iom_name, _}))) => Some(iom_name)
+ | _ => None
+ };
+};
+
+let get_input_object_names = (fields: list(input_object_field)) => {
+ fields
+ |> List.map(get_input_object_name)
+ |> List.fold_left(
+ acc =>
+ fun
+ | Some(name) => [name, ...acc]
+ | _ => acc,
+ [],
+ );
+};
+
+let rec extract_input_object =
+ (
+ schema: Schema.t,
+ finalized_input_objects,
+ (
+ name: option(string),
+ fields: list((string, Schema.type_ref, loc, option(loc))),
+ loc,
+ ),
+ ) => {
+ let gen_fields = generate_input_field_types(name, schema, fields);
+
+ let is_recursive =
+ switch (name) {
+ | None => false
+ | Some(name) =>
+ gen_fields |> get_input_object_names |> List.exists(f => f == name)
+ };
+
+ [
+ InputObject({name, fields: gen_fields, loc, is_recursive}),
+ ...fields
+ |> List.fold_left(
+ (acc, (_name, type_ref, loc, _)) => {
+ let (_type_name, type_) = fetch_type(schema, type_ref);
+ switch (type_) {
+ | Some(Schema.InputObject({iom_name, iom_input_fields, _})) =>
+ let already_created_earlier =
+ finalized_input_objects |> List.exists(f => f == iom_name);
+ let already_created_in_same_list =
+ acc
+ |> List.exists(
+ fun
+ | InputObject({name}) => name == Some(iom_name)
+ | NoVariables => false,
+ );
+
+ if (already_created_earlier || already_created_in_same_list) {
+ // we already generated this input object
+ acc;
+ } else {
+ let fields =
+ iom_input_fields
+ |> List.map(field =>
+ (field.am_name, field.am_arg_type, loc, None)
+ );
+
+ let result =
+ extract_input_object(
+ schema,
+ [iom_name, ...finalized_input_objects],
+ (Some(iom_name), fields, loc),
+ );
+
+ List.append(acc, result);
+ };
+ | _ => acc
+ };
+ },
+ [],
+ ),
+ ];
+};
+
+let extract_args = (config, args): list(arg_type_def) =>
+ switch (args) {
+ | Some({item, span}) =>
+ (
+ None,
+ item
+ |> List.map(
+ (({item: name, span}, {Graphql_ast.vd_type: variable_type, _})) =>
+ (
+ name,
+ Type_utils.to_schema_type_ref(variable_type.item),
+ config.map_loc(span),
+ Some(config.map_loc(variable_type.span)),
+ )
+ ),
+ config.map_loc(span),
+ )
+ |> extract_input_object(config.schema, [])
+ | _ => [NoVariables]
+ };
diff --git a/src/base/extract_type_definitions.rei b/src/base/extract_type_definitions.rei
new file mode 100644
index 00000000..1651f3b2
--- /dev/null
+++ b/src/base/extract_type_definitions.rei
@@ -0,0 +1,85 @@
+type path = list(string);
+
+type extracted_type =
+ | Type(Schema.type_meta)
+ | TypeNotFound(string)
+ | Nullable(extracted_type)
+ | List(extracted_type);
+
+type object_field =
+ | Field({
+ type_: Result_structure.t,
+ loc_key: Source_pos.ast_location,
+ loc: Source_pos.ast_location,
+ path,
+ arguments: Graphql_ast.arguments,
+ })
+ | Fragment({
+ module_name: string,
+ key: string,
+ loc_key: Source_pos.ast_location,
+ type_name: option(string),
+ })
+and type_def =
+ | Object({
+ loc: Source_pos.ast_location,
+ variant_parent: bool,
+ force_record: bool,
+ path,
+ fields: list(object_field),
+ })
+ | VariantSelection({
+ loc: Source_pos.ast_location,
+ path,
+ fields: list((Result_structure.name, Result_structure.t)),
+ })
+ | VariantUnion({
+ loc: Source_pos.ast_location,
+ path,
+ fields: list((Result_structure.name, Result_structure.t)),
+ omit_future_value: bool,
+ })
+ | VariantInterface({
+ loc: Source_pos.ast_location,
+ path,
+ base: (string, Result_structure.t),
+ fields: list((string, Result_structure.t)),
+ })
+ | Enum({
+ loc: Source_pos.ast_location,
+ path,
+ fields: list(string),
+ omit_future_value: bool,
+ });
+
+type input_object_field =
+ | InputField({
+ type_: extracted_type,
+ name: string,
+ loc: Source_pos.ast_location,
+ loc_type: option(Source_pos.ast_location),
+ });
+
+type arg_type_def =
+ | NoVariables
+ | InputObject({
+ name: option(string),
+ fields: list(input_object_field),
+ loc: Source_pos.ast_location,
+ is_recursive: bool,
+ });
+
+let extract:
+ (~variant: bool=?, ~path: path, ~raw: bool, Result_structure.t) =>
+ list(type_def);
+let generate_type_name: (~prefix: string=?, path) => string;
+let extract_args:
+ (
+ Generator_utils.output_config,
+ option(Source_pos.spanning(Graphql_ast.variable_definitions))
+ ) =>
+ list(arg_type_def);
+
+let get_inner_type: extracted_type => option(extracted_type);
+
+let has_required_variables: list(arg_type_def) => bool;
diff --git a/src/base/generator_utils.re b/src/base/generator_utils.re
index 9cc911d7..10a299c7 100644
--- a/src/base/generator_utils.re
+++ b/src/base/generator_utils.re
@@ -19,8 +19,14 @@ type output_config = {
((Source_pos.source_position, Source_pos.source_position)) =>
Source_pos.ast_location,
delimiter: option(string),
- schema: Schema.schema,
+ schema: Schema.t,
full_document: Graphql_ast.document,
+ template_tag: (option(string), option(string), option(string)),
+ records: bool,
+ inline: bool,
+ legacy: bool,
+ future_added_value: bool,
+ extend: option(string),
};
let filter_map = (f, l) => {
@@ -32,5 +38,6 @@ let filter_map = (f, l) => {
| None => loop(acc, tail)
| Some(v) => loop([v, ...acc], tail)
};
+
loop([], l);
};
diff --git a/src/base/graphql_ast.re b/src/base/graphql_ast.re
index fcd9ee90..d49bf6e9 100644
--- a/src/base/graphql_ast.re
+++ b/src/base/graphql_ast.re
@@ -24,7 +24,8 @@ type variable_definition = {
type variable_definitions = list((spanning(string), variable_definition));
-type arguments = list((spanning(string), spanning(input_value)));
+type argument = (spanning(string), spanning(input_value));
+type arguments = list(argument);
type directive = {
d_name: spanning(string),
diff --git a/src/base/graphql_lexer.re b/src/base/graphql_lexer.re
index d123c96d..3eccb7e3 100644
--- a/src/base/graphql_lexer.re
+++ b/src/base/graphql_lexer.re
@@ -34,7 +34,7 @@ let string_of_token = t =>
switch (t) {
| Name(s) => s
| Int(i) => string_of_int(i)
- | Float(f) => string_of_float(f)
+ | Float(f) => Printf.sprintf("%.16g", f)
| String(s) => "\"" ++ s ++ "\""
| Exclamation_mark => "!"
| Dollar => "$"
diff --git a/src/base/graphql_ppx_base.re b/src/base/graphql_ppx_base.re
index 271afeb9..11803ea8 100644
--- a/src/base/graphql_ppx_base.re
+++ b/src/base/graphql_ppx_base.re
@@ -10,6 +10,7 @@ module Result_structure = Result_structure;
module Source_pos = Source_pos;
module Validations = Validations;
module Schema = Schema;
+module Schema_printer = Schema_printer;
module Compat = Compat;
module Graphql_ast = Graphql_ast;
module Type_utils = Type_utils;
@@ -17,3 +18,5 @@ module Option = Option;
module Traversal_utils = Traversal_utils;
module Graphql_printer = Graphql_printer;
module Ast_serializer_apollo = Ast_serializer_apollo;
+module Extract_type_definitions = Extract_type_definitions;
+module Ast_transforms = Ast_transforms;
diff --git a/src/base/graphql_printer.re b/src/base/graphql_printer.re
index dd1af4ff..ee6f0e42 100644
--- a/src/base/graphql_printer.re
+++ b/src/base/graphql_printer.re
@@ -4,7 +4,7 @@ open Source_pos;
open Schema;
/*
- We rely on graphql_ppx.ml having created the result decoder before running
+ We rely on graphql_ppx.re having created the result decoder before running
the functions in this file. The result decoder produces proper and located
error messages for missing or invalid types, which means that we can - for
simplicity's sake - skip any kind of error handling here.
@@ -14,7 +14,6 @@ open Schema;
*/
type t =
- | Empty
| String(string)
| FragmentNameRef(string)
| FragmentQueryRef(string);
@@ -29,7 +28,7 @@ let rec print_input_value = iv =>
switch (iv) {
| Iv_null => "null"
| Iv_int(i) => string_of_int(i)
- | Iv_float(f) => string_of_float(f)
+ | Iv_float(f) => Printf.sprintf("%.16g", f)
| Iv_string(s) => "\"" ++ String.escaped(s) ++ "\""
| Iv_boolean(b) => string_of_bool(b)
| Iv_enum(s) => s
@@ -76,10 +75,24 @@ let print_directive = d =>
let is_internal_directive = d =>
switch (d.item.d_name.item) {
+ | "bsOmitFutureValue"
+ | "ppxOmitFutureValue"
| "bsVariant"
+ | "ppxVariant"
| "bsRecord"
+ | "ppxRecord"
+ | "bsObject"
+ | "ppxObject"
| "bsDecoder"
- | "bsField" => true
+ | "ppxDecoder"
+ | "bsCustom"
+ | "ppxCustom"
+ | "bsAs"
+ | "ppxAs"
+ | "argumentDefinitions"
+ | "arguments"
+ | "bsField"
+ | "ppxField" => true
| _ => false
};
@@ -115,19 +128,14 @@ let rec print_selection_set = (schema, ty, selection_set) =>
switch (ty) {
| Interface(_)
| Union(_) => true
- | Object({om_name, _}) =>
- let is_top_level_subscrption_type =
- schema.meta.sm_subscription_type == Some(om_name);
-
- !is_top_level_subscrption_type && Ppx_config.apollo_mode();
| _ => false
};
let maybe_typename =
if (add_typename) {
- String("__typename\n");
+ Some(String("__typename\n"));
} else {
- Empty;
+ None;
};
let selection =
@@ -138,7 +146,10 @@ let rec print_selection_set = (schema, ty, selection_set) =>
|> Array.concat;
Array.concat([
- [|String("{\n"), maybe_typename|],
+ switch (maybe_typename) {
+ | Some(typename) => [|String("{\n"), typename|]
+ | None => [|String("{\n")|]
+ },
selection,
[|String("}\n")|],
]);
@@ -151,33 +162,40 @@ and print_selection = (schema, ty, selection) =>
}
and print_field = (schema, ty, f) => {
let ty_fields =
- Option.unsafe_unwrap @@
- (
- switch (ty) {
- | Interface({im_fields, _}) => Some(im_fields)
- | Object({om_fields, _}) => Some(om_fields)
- | _ => None
- }
- );
+ switch (ty) {
+ | Interface({im_fields, _}) => im_fields
+ | Object({om_fields, _}) => om_fields
+ | _ => []
+ };
let field_ty =
List.find(fm => fm.fm_name == f.fd_name.item, ty_fields).fm_field_type
|> type_ref_name
|> lookup_type(schema)
|> Option.unsafe_unwrap;
+
Array.append(
- [|
+ [
switch (f.fd_alias) {
- | Some({item, _}) => String(item ++ ": ")
- | None => Empty
+ | Some({item, _}) => Some(String(item ++ ": "))
+ | None => None
},
- String(f.fd_name.item),
+ Some(String(f.fd_name.item)),
switch (f.fd_arguments) {
- | Some({item, _}) => String(print_arguments(item))
- | None => Empty
+ | Some({item, _}) => Some(String(print_arguments(item)))
+ | None => None
},
- String(print_directives(f.fd_directives)),
- |],
+ Some(String(print_directives(f.fd_directives))),
+ ]
+ |> List.fold_left(
+ acc =>
+ fun
+ | Some(r) => [r, ...acc]
+ | None => acc,
+ [],
+ )
+ |> List.rev
+ |> Array.of_list,
switch (f.fd_selection_set) {
| Some({item, _}) => print_selection_set(schema, field_ty, item)
| None => [||]
@@ -229,24 +247,35 @@ let print_operation = (schema, op) => {
| Subscription => Option.unsafe_unwrap(schema.meta.sm_subscription_type)
};
Array.append(
- [|
- String(
- switch (op.o_type) {
- | Query => "query "
- | Mutation => "mutation "
- | Subscription => "subscription "
- },
+ [
+ Some(
+ String(
+ switch (op.o_type) {
+ | Query => "query "
+ | Mutation => "mutation "
+ | Subscription => "subscription "
+ },
+ ),
),
switch (op.o_name) {
- | Some({item, _}) => String(item)
- | None => Empty
+ | Some({item, _}) => Some(String(item))
+ | None => None
},
switch (op.o_variable_definitions) {
- | Some({item, _}) => String(print_variable_definitions(item))
- | None => Empty
+ | Some({item, _}) => Some(String(print_variable_definitions(item)))
+ | None => None
},
- String(print_directives(op.o_directives)),
- |],
+ Some(String(print_directives(op.o_directives))),
+ ]
+ |> List.fold_left(
+ acc =>
+ fun
+ | Some(r) => [r, ...acc]
+ | None => acc,
+ [],
+ )
+ |> List.rev
+ |> Array.of_list,
print_selection_set(
schema,
lookup_type(schema, ty_name) |> Option.unsafe_unwrap,
@@ -287,7 +316,6 @@ let find_fragment_refs = parts =>
|> Array.fold_left(
acc =>
fun
- | Empty => acc
| String(_) => acc
| FragmentNameRef(r) => StringSet.add(r, acc)
| FragmentQueryRef(_) => acc,
@@ -295,11 +323,31 @@ let find_fragment_refs = parts =>
)
|> StringSet.elements;
+let compress_parts = (parts: array(t)) => {
+ parts
+ |> Array.to_list
+ |> List.fold_left(
+ (acc, curr) => {
+ switch (acc, curr) {
+ | ([String(s1), ...rest], String(s2)) => [
+ String(s1 ++ s2),
+ ...rest,
+ ]
+ | (acc, curr) => [curr, ...acc]
+ }
+ },
+ [],
+ )
+ |> List.rev
+ |> Array.of_list;
+};
+
let print_document = (schema, defs) => {
let parts = defs |> List.map(print_definition(schema)) |> Array.concat;
let fragment_refs = find_fragment_refs(parts);
Array.concat([
parts,
fragment_refs |> Array.of_list |> Array.map(ref => FragmentQueryRef(ref)),
- ]);
+ ])
+ |> compress_parts;
};
diff --git a/src/base/graphql_printer.rei b/src/base/graphql_printer.rei
new file mode 100644
index 00000000..76365f38
--- /dev/null
+++ b/src/base/graphql_printer.rei
@@ -0,0 +1,8 @@
+type t =
+ | String(string)
+ | FragmentNameRef(string)
+ | FragmentQueryRef(string);
+
+let type_ref_name: Schema.type_ref => string;
+let print_type: Graphql_ast.type_ref => string;
+let print_document: (Schema.t, Graphql_ast.document) => array(t);
diff --git a/src/base/log.re b/src/base/log.re
index 83f354d6..9c8bbcd3 100644
--- a/src/base/log.re
+++ b/src/base/log.re
@@ -3,4 +3,4 @@ let log = msg =>
print_endline(msg);
};
-let must_log = print_endline;
+let error_log = prerr_endline;
diff --git a/src/base/ppx_config.re b/src/base/ppx_config.re
index 34c8c9d1..35fdfb97 100644
--- a/src/base/ppx_config.re
+++ b/src/base/ppx_config.re
@@ -10,7 +10,20 @@ type config = {
root_directory: string,
schema_file: string,
raise_error_with_loc: 'a. (Source_pos.ast_location, string) => 'a,
- lean_parse: bool,
+ records: bool,
+ legacy: bool,
+ template_tag: option(string),
+ template_tag_location: option(string),
+ template_tag_import: option(string),
+ custom_fields: Hashtbl.t(string, string),
+ future_added_value: bool,
+ extend_query: option(string),
+ extend_query_no_required_variables: option(string),
+ extend_mutation: option(string),
+ extend_mutation_no_required_variables: option(string),
+ extend_subscription: option(string),
+ extend_subscription_no_required_variables: option(string),
+ extend_fragment: option(string),
};
let config_ref = ref(None);
@@ -24,9 +37,21 @@ let verbose_logging = () =>
let output_mode = () => (config_ref^ |> Option.unsafe_unwrap).output_mode;
+let custom_fields = () => (config_ref^ |> Option.unsafe_unwrap).custom_fields;
+
+let future_added_value = () =>
+ (config_ref^ |> Option.unsafe_unwrap).future_added_value;
+
let apollo_mode = () => (config_ref^ |> Option.unsafe_unwrap).apollo_mode;
-let lean_parse = () => (config_ref^ |> Option.unsafe_unwrap).lean_parse;
+let records = () => (config_ref^ |> Option.unsafe_unwrap).records;
+let legacy = () => (config_ref^ |> Option.unsafe_unwrap).legacy;
+
+let template_tag = () => (config_ref^ |> Option.unsafe_unwrap).template_tag;
+let template_tag_import = () =>
+ (config_ref^ |> Option.unsafe_unwrap).template_tag_import;
+let template_tag_location = () =>
+ (config_ref^ |> Option.unsafe_unwrap).template_tag_location;
let verbose_error_handling = () =>
(config_ref^ |> Option.unsafe_unwrap).verbose_error_handling;
@@ -36,5 +61,21 @@ let root_directory = () =>
let schema_file = () => (config_ref^ |> Option.unsafe_unwrap).schema_file;
+let extend_query = () => (config_ref^ |> Option.unsafe_unwrap).extend_query;
+let extend_query_no_required_variables = () =>
+ (config_ref^ |> Option.unsafe_unwrap).extend_query_no_required_variables;
+let extend_mutation = () =>
+ (config_ref^ |> Option.unsafe_unwrap).extend_mutation;
+let extend_mutation_no_required_variables = () =>
+ (config_ref^ |> Option.unsafe_unwrap).extend_mutation_no_required_variables;
+
+let extend_subscription = () =>
+ (config_ref^ |> Option.unsafe_unwrap).extend_subscription;
+let extend_subscription_no_required_variables = () =>
+ (config_ref^ |> Option.unsafe_unwrap).
+ extend_subscription_no_required_variables;
+let extend_fragment = () =>
+ (config_ref^ |> Option.unsafe_unwrap).extend_fragment;
+
let raise_error_with_loc = (loc, message) =>
(config_ref^ |> Option.unsafe_unwrap).raise_error_with_loc(loc, message);
diff --git a/src/base/read_schema.re b/src/base/read_schema.re
index 1d8bab8d..1f336e79 100644
--- a/src/base/read_schema.re
+++ b/src/base/read_schema.re
@@ -315,7 +315,7 @@ let create_dir_if_not_exist = abs_path =>
switch (error) {
| Unix.EEXIST => () /* It's Ok since the build tool e.g. BuckleScript could be multi-threading */
| error =>
- Log.must_log(Unix.error_message(error) ++ " " ++ cmd ++ " " ++ msg);
+ Log.error_log(Unix.error_message(error) ++ " " ++ cmd ++ " " ++ msg);
raise(Unix.Unix_error(error, cmd, msg));
}
};
@@ -379,7 +379,7 @@ let create_marshaled_schema = (json_schema, data) => {
Log.log("[write marshaled] " ++ marshaled_schema);
switch (open_out_bin(marshaled_schema)) {
| exception (Sys_error(msg)) =>
- Log.must_log("[write marshaled][Sys_error]: " ++ msg);
+ Log.error_log("[write marshaled][Sys_error]: " ++ msg);
raise(Sys_error(msg));
| outc =>
Marshal.to_channel(outc, data, []);
@@ -406,7 +406,7 @@ let rec read_marshaled_schema = json_schema => {
Log.log("[read marshaled] " ++ marshaled_schema);
switch (open_in_bin(marshaled_schema)) {
| exception (Sys_error(msg)) =>
- Log.must_log("[read marshaled][Sys_error]: " ++ msg);
+ Log.error_log("[read marshaled][Sys_error]: " ++ msg);
raise(Sys_error(msg));
| file =>
let data =
@@ -420,7 +420,7 @@ let rec read_marshaled_schema = json_schema => {
};
}
and recovery_build = json_schema => {
- let () = Log.must_log("Marshaled file is broken. Doing recovery build...");
+ let () = Log.error_log("Marshaled file is broken. Doing recovery build...");
let () = Sys.remove(get_hash_path(json_schema));
/* we don't remove marshal file since it might result in race condition,
* we simply let every thread noticed the broken marshal file rewrite to it */
diff --git a/src/base/result_decoder.re b/src/base/result_decoder.re
index b458cfde..b26835d3 100644
--- a/src/base/result_decoder.re
+++ b/src/base/result_decoder.re
@@ -6,23 +6,23 @@ open Type_utils;
open Generator_utils;
open Result_structure;
-exception Unimplemented(string);
-
let make_error = (error_marker, map_loc, span, message) => {
let () = error_marker.has_error = true;
Res_error(map_loc(span), message);
};
-let has_directive = (name, directives) =>
+let has_directive = (~prepend=false, name, directives) =>
List.exists(
- ({item: {d_name: {item, _}, _}, _}) => item == name,
+ ({item: {d_name: {item, _}, _}, _}) =>
+ prepend ? item == "bs" ++ name || item == "ppx" ++ name : item == name,
directives,
);
-let find_directive = (name, directives) =>
+let find_directive = (~prepend=false, name, directives) =>
switch (
List.find(
- ({item: {d_name: {item, _}, _}, _}) => item == name,
+ ({item: {d_name: {item, _}, _}, _}) =>
+ prepend ? item == "bs" ++ name || item == "ppx" ++ name : item == name,
directives,
)
) {
@@ -44,10 +44,45 @@ let find_argument = (name, arguments) =>
}
);
+let find_fragment_arguments =
+ (directives: list(Source_pos.spanning(Graphql_ast.directive))) => {
+ switch (directives |> List.find(d => d.item.d_name.item == "arguments")) {
+ | {item: {d_arguments: Some(arguments), _}, _} =>
+ arguments.item
+ |> List.fold_left(
+ acc =>
+ fun
+ | ({item: name, _}, {item: Iv_variable(variable_name), _})
+ when name == variable_name => [
+ name,
+ ...acc,
+ ]
+ | _ => acc,
+ [],
+ )
+ | _ => []
+ | exception Not_found => []
+ };
+};
+
+let get_ppx_as = directives => {
+ switch (directives |> find_directive(~prepend=true, "As")) {
+ | None => None
+ | Some({item: {d_arguments, _}, _}) =>
+ switch (find_argument("type", d_arguments)) {
+ | Some((_, {item: Iv_string(type_name), _})) => Some(type_name)
+ | _ => None
+ }
+ };
+};
+
let rec unify_type =
(
+ ~has_decoder,
error_marker,
as_record,
+ existing_record,
+ omit_future_value,
config,
span,
ty,
@@ -57,12 +92,32 @@ let rec unify_type =
| Ntr_nullable(t) =>
Res_nullable(
config.map_loc(span),
- unify_type(error_marker, as_record, config, span, t, selection_set),
+ unify_type(
+ ~has_decoder,
+ error_marker,
+ as_record,
+ existing_record,
+ omit_future_value,
+ config,
+ span,
+ t,
+ selection_set,
+ ),
)
| Ntr_list(t) =>
Res_array(
config.map_loc(span),
- unify_type(error_marker, as_record, config, span, t, selection_set),
+ unify_type(
+ ~has_decoder,
+ error_marker,
+ as_record,
+ existing_record,
+ omit_future_value,
+ config,
+ span,
+ t,
+ selection_set,
+ ),
)
| Ntr_named(n) =>
switch (lookup_type(config.schema, n)) {
@@ -75,18 +130,31 @@ let rec unify_type =
Res_float(config.map_loc(span))
| Some(Scalar({sm_name: "Boolean", _})) =>
Res_boolean(config.map_loc(span))
+ | Some(Scalar({sm_name})) when !has_decoder =>
+ try({
+ let decoderModule = Hashtbl.find(Ppx_config.custom_fields(), sm_name);
+ Res_custom_decoder(
+ config.map_loc(span),
+ decoderModule,
+ Res_raw_scalar(config.map_loc(span)),
+ );
+ }) {
+ | Not_found => Res_raw_scalar(config.map_loc(span))
+ | other => raise(other)
+ }
| Some(Scalar(_)) => Res_raw_scalar(config.map_loc(span))
| Some(Object(_) as ty) =>
unify_selection_set(
error_marker,
as_record,
+ existing_record,
config,
span,
ty,
selection_set,
)
| Some(Enum(enum_meta)) =>
- Res_poly_enum(config.map_loc(span), enum_meta)
+ Res_poly_enum(config.map_loc(span), enum_meta, omit_future_value)
| Some(Interface(im) as ty) =>
unify_interface(
error_marker,
@@ -105,7 +173,14 @@ let rec unify_type =
"Can't have fields on input objects",
)
| Some(Union(um)) =>
- unify_union(error_marker, config, span, um, selection_set)
+ unify_union(
+ error_marker,
+ config,
+ span,
+ um,
+ omit_future_value,
+ selection_set,
+ )
}
}
and unify_interface =
@@ -148,6 +223,7 @@ and unify_interface =
config.map_loc(span),
name,
List.map(unify_selection(error_marker, config, ty), selection),
+ None,
),
);
let generate_fragment_case =
@@ -177,7 +253,8 @@ and unify_interface =
fragment_cases,
);
}
-and unify_union = (error_marker, config, span, union_meta, selection_set) =>
+and unify_union =
+ (error_marker, config, span, union_meta, omit_future_value, selection_set) =>
switch (selection_set) {
| None =>
make_error(
@@ -226,17 +303,19 @@ and unify_union = (error_marker, config, span, union_meta, selection_set) =>
| Some(ty) => ty
};
- let is_record = has_directive("bsRecord", if_directives);
+ let is_record = has_directive(~prepend=true, "Record", if_directives);
+
let result_decoder =
unify_selection_set(
error_marker,
is_record,
+ None,
config,
if_selection_set.span,
type_cond_ty,
Some(if_selection_set),
);
- (if_type_condition.item, result_decoder);
+ (if_type_condition, result_decoder);
| None => assert(false)
};
@@ -254,6 +333,7 @@ and unify_union = (error_marker, config, span, union_meta, selection_set) =>
} else {
Nonexhaustive;
},
+ omit_future_value,
);
}
and unify_variant = (error_marker, config, span, ty, selection_set) =>
@@ -311,7 +391,7 @@ and unify_variant = (error_marker, config, span, ty, selection_set) =>
"Unknown field on type " ++ type_name(ty),
)
| Some(field_meta) =>
- let key = some_or(item.fd_alias, item.fd_name).item;
+ let key = some_or(item.fd_alias, item.fd_name);
let inner_type =
switch (to_native_type_ref(field_meta.fm_field_type)) {
| Ntr_list(_)
@@ -326,8 +406,11 @@ and unify_variant = (error_marker, config, span, ty, selection_set) =>
(
key,
unify_type(
+ ~has_decoder=false,
error_marker,
false,
+ None,
+ false,
config,
span,
inner_type,
@@ -356,10 +439,24 @@ and unify_variant = (error_marker, config, span, ty, selection_set) =>
}
and unify_field = (error_marker, config, field_span, ty) => {
let ast_field = field_span.item;
- let field_meta = lookup_field(ty, ast_field.fd_name.item);
- let key = some_or(ast_field.fd_alias, ast_field.fd_name).item;
- let is_variant = has_directive("bsVariant", ast_field.fd_directives);
- let is_record = has_directive("bsRecord", ast_field.fd_directives);
+ let field_name = ast_field.fd_name.item;
+ let field_meta = lookup_field(ty, field_name);
+ let key = some_or(ast_field.fd_alias, ast_field.fd_name);
+ let key_span = key.span;
+ let key = key.item;
+ let is_variant =
+ has_directive(~prepend=true, "Variant", ast_field.fd_directives);
+ let is_record =
+ has_directive(~prepend=true, "Record", ast_field.fd_directives);
+ let omit_future_value =
+ has_directive(~prepend=true, "OmitFutureValue", ast_field.fd_directives)
+ || !config.future_added_value;
+ let has_decoder =
+ has_directive(~prepend=true, "Decoder", ast_field.fd_directives)
+ || has_directive(~prepend=true, "Custom", ast_field.fd_directives);
+
+ let existing_record = get_ppx_as(ast_field.fd_directives);
+
let has_skip =
has_directive("skip", ast_field.fd_directives)
|| has_directive("include", ast_field.fd_directives);
@@ -367,7 +464,13 @@ and unify_field = (error_marker, config, field_span, ty) => {
if (is_variant) {
unify_variant(error_marker);
} else {
- unify_type(error_marker, is_record);
+ unify_type(
+ ~has_decoder,
+ error_marker,
+ is_record,
+ existing_record,
+ omit_future_value,
+ );
};
let parser_expr =
@@ -376,8 +479,8 @@ and unify_field = (error_marker, config, field_span, ty) => {
make_error(
error_marker,
config.map_loc,
- field_span.span,
- "Unknown field on type " ++ type_name(ty),
+ ast_field.fd_name.span,
+ "Unknown field '" ++ field_name ++ "' on type " ++ type_name(ty),
)
| Some(field_meta) =>
let field_ty = to_native_type_ref(field_meta.fm_field_type);
@@ -396,38 +499,94 @@ and unify_field = (error_marker, config, field_span, ty) => {
};
let loc = config.map_loc(field_span.span);
- switch (ast_field.fd_directives |> find_directive("bsDecoder")) {
- | None => Fr_named_field(key, loc, parser_expr)
+ let loc_key = config.map_loc(key_span);
+ let arguments =
+ switch (ast_field.fd_arguments) {
+ | None => []
+ | Some({item}) => item
+ };
+ switch (
+ switch (
+ ast_field.fd_directives |> find_directive(~prepend=true, "Decoder"),
+ ast_field.fd_directives |> find_directive(~prepend=true, "Custom"),
+ ) {
+ | (_, Some(decoder)) => Some(decoder)
+ | (Some(decoder), _) => Some(decoder)
+ | (None, None) => None
+ }
+ ) {
+ | None =>
+ Fr_named_field({name: key, loc_key, loc, type_: parser_expr, arguments})
| Some({item: {d_arguments, _}, span}) =>
- switch (find_argument("fn", d_arguments)) {
+ switch (find_argument("module", d_arguments)) {
| None =>
- Fr_named_field(
- key,
- loc,
- make_error(
- error_marker,
- config.map_loc,
- span,
- "bsDecoder must be given 'fn' argument",
- ),
- )
- | Some((_, {item: Iv_string(fn_name), span})) =>
- Fr_named_field(
- key,
+ Fr_named_field({
+ name: key,
loc,
- Res_custom_decoder(config.map_loc(span), fn_name, parser_expr),
- )
+ loc_key,
+ type_:
+ make_error(
+ error_marker,
+ config.map_loc,
+ span,
+ "pxxDecoder must be given 'module' argument",
+ ),
+ arguments,
+ })
+ | Some((_, {item: Iv_string(module_name), span})) =>
+ switch (parser_expr) {
+ | Res_nullable(loc, t) =>
+ Fr_named_field({
+ name: key,
+ loc_key,
+ loc,
+ type_:
+ Res_nullable(
+ loc,
+ Res_custom_decoder(config.map_loc(span), module_name, t),
+ ),
+ arguments,
+ })
+ | Res_array(loc, t) =>
+ Fr_named_field({
+ name: key,
+ loc_key,
+ loc,
+ type_:
+ Res_array(
+ loc,
+ Res_custom_decoder(config.map_loc(span), module_name, t),
+ ),
+ arguments,
+ })
+ | _ =>
+ Fr_named_field({
+ name: key,
+ loc_key,
+ loc,
+ type_:
+ Res_custom_decoder(
+ config.map_loc(span),
+ module_name,
+ parser_expr,
+ ),
+ arguments,
+ })
+ }
| Some((_, {span, _})) =>
- Fr_named_field(
- key,
+ Fr_named_field({
+ name: key,
+ loc_key,
loc,
- make_error(
- error_marker,
- config.map_loc,
- span,
- "The 'fn' argument must be a string",
- ),
- )
+ type_:
+ make_error(
+ error_marker,
+ config.map_loc,
+ span,
+ "The 'module' argument must be a string",
+ ),
+ arguments,
+ })
}
};
}
@@ -435,23 +594,44 @@ and unify_selection = (error_marker, config, ty, selection) =>
switch (selection) {
| Field(field_span) => unify_field(error_marker, config, field_span, ty)
| FragmentSpread({item: {fs_directives, fs_name}, span}) =>
- switch (find_directive("bsField", fs_directives)) {
+ let arguments = find_fragment_arguments(fs_directives);
+ switch (find_directive(~prepend=true, "Field", fs_directives)) {
| None =>
- raise_error(
- config.map_loc,
- span,
- "You must use @bsField(name: \"fieldName\") to use fragment spreads",
- )
+ let key =
+ fs_name.item
+ |> String.split_on_char('.')
+ |> List.rev
+ |> List.hd
+ |> String.uncapitalize_ascii;
+ Fr_fragment_spread(
+ key,
+ config.map_loc(span),
+ fs_name.item,
+ switch (ty) {
+ | Object({om_name, _}) => Some(om_name)
+ | _ => None
+ },
+ arguments,
+ );
| Some({item: {d_arguments, _}, span}) =>
switch (find_argument("name", d_arguments)) {
| None =>
raise_error(
config.map_loc,
span,
- "bsField must be given 'name' argument",
+ "ppxField must be given 'name' argument",
)
| Some((_, {item: Iv_string(key), span})) =>
- Fr_fragment_spread(key, config.map_loc(span), fs_name.item)
+ Fr_fragment_spread(
+ key,
+ config.map_loc(span),
+ fs_name.item,
+ switch (ty) {
+ | Object({om_name, _}) => Some(om_name)
+ | _ => None
+ },
+ arguments,
+ )
| Some(_) =>
raise_error(
config.map_loc,
@@ -459,7 +639,7 @@ and unify_selection = (error_marker, config, ty, selection) =>
"The 'name' argument must be a string",
)
}
- }
+ };
| InlineFragment({span, _}) =>
raise_error(
config.map_loc,
@@ -468,7 +648,15 @@ and unify_selection = (error_marker, config, ty, selection) =>
)
}
and unify_selection_set =
- (error_marker, as_record, config, span, ty, selection_set) =>
+ (
+ error_marker,
+ as_record,
+ existing_record,
+ config,
+ span,
+ ty,
+ selection_set,
+ ) =>
switch (selection_set) {
| None =>
make_error(
@@ -477,28 +665,36 @@ and unify_selection_set =
span,
"Must select subfields on objects",
)
- | Some({item: [FragmentSpread({item, _})], _}) =>
+ | Some({item: [FragmentSpread({item: {fs_directives, fs_name}, _})], _}) =>
+ let arguments = find_fragment_arguments(fs_directives);
+
if (as_record) {
make_error(
error_marker,
config.map_loc,
span,
- "@bsRecord can not be used with fragment spreads, place @bsRecord on the fragment definition instead",
+ "@ppxRecord can not be used with fragment spreads, place @ppxRecord on the fragment definition instead",
);
} else {
- Res_solo_fragment_spread(config.map_loc(span), item.fs_name.item);
- }
+ Res_solo_fragment_spread(
+ config.map_loc(span),
+ fs_name.item,
+ arguments,
+ );
+ };
| Some({item, _}) when as_record =>
Res_record(
config.map_loc(span),
type_name(ty),
List.map(unify_selection(error_marker, config, ty), item),
+ existing_record,
)
| Some({item, _}) =>
Res_object(
config.map_loc(span),
type_name(ty),
List.map(unify_selection(error_marker, config, ty), item),
+ existing_record,
)
};
@@ -508,6 +704,7 @@ let unify_operation = (error_marker, config) =>
unify_selection_set(
error_marker,
false,
+ None,
config,
span,
query_type(config.schema),
@@ -519,6 +716,7 @@ let unify_operation = (error_marker, config) =>
unify_selection_set(
error_marker,
false,
+ None,
config,
span,
mutation_type,
@@ -538,6 +736,7 @@ let unify_operation = (error_marker, config) =>
unify_selection_set(
error_marker,
false,
+ None,
config,
span,
subscription_type,
@@ -552,18 +751,56 @@ let unify_operation = (error_marker, config) =>
)
};
+let getFragmentArgumentDefinitions =
+ (directives: list(Source_pos.spanning(Graphql_ast.directive))) => {
+ switch (
+ directives |> List.find(d => {d.item.d_name.item == "argumentDefinitions"})
+ ) {
+ | {item: {d_arguments: Some(arguments), _}, _} =>
+ arguments.item
+ |> List.fold_left(
+ acc =>
+ fun
+ | (
+ {item: key, span},
+ {item: Iv_object(values), span: type_span},
+ ) => {
+ let type_ =
+ values
+ |> List.fold_left(
+ acc =>
+ fun
+ | ({item: "type", _}, {item: Iv_string(type_), _}) =>
+ Some(type_)
+ | _ => acc,
+ None,
+ );
+ switch (type_) {
+ | Some(type_) => [(key, type_, span, type_span), ...acc]
+ | _ => acc
+ };
+ }
+ | _ => acc,
+ [],
+ )
+ | _ => []
+ | exception Not_found => []
+ };
+};
+
let rec unify_document_schema = (config, document) => {
let error_marker = {Generator_utils.has_error: false};
switch (document) {
- | [Operation({item: {o_variable_definitions, _}, _} as op)] =>
+ | [Operation({item: {o_variable_definitions, _}, _} as op), ...rest] =>
let structure = unify_operation(error_marker, config, op);
[
- Mod_default_operation(
+ Def_operation(
o_variable_definitions,
error_marker.has_error,
op,
structure,
),
+ ...unify_document_schema(config, rest),
];
| [
Fragment(
@@ -578,7 +815,16 @@ let rec unify_document_schema = (config, document) => {
open Result;
let with_decoder =
- switch (fg_directives |> find_directive("bsDecoder")) {
+ switch (
+ switch (
+ fg_directives |> find_directive(~prepend=true, "Decoder"),
+ fg_directives |> find_directive(~prepend=true, "Custom"),
+ ) {
+ | (_, Some(decoder)) => Some(decoder)
+ | (Some(decoder), _) => Some(decoder)
+ | (None, None) => None
+ }
+ ) {
| None => Ok(None)
| Some({item: {d_arguments, _}, span}) =>
switch (find_argument("fn", d_arguments)) {
@@ -588,7 +834,7 @@ let rec unify_document_schema = (config, document) => {
error_marker,
config.map_loc,
span,
- "bsDecoder must be given 'fn' argument",
+ "ppxDecoder must be given 'fn' argument",
),
)
| Some((_, {item: Iv_string(fn_name), span})) =>
@@ -614,18 +860,21 @@ let rec unify_document_schema = (config, document) => {
}
};
- let is_record = has_directive("bsRecord", fg_directives);
+ let is_record = has_directive(~prepend=true, "Record", fg_directives);
+
+ let argumentDefinitions =
+ getFragmentArgumentDefinitions(fg_directives);
switch (Schema.lookup_type(config.schema, fg_type_condition.item)) {
| None =>
- Mod_fragment(
+ Def_fragment(
fg_name.item,
- [],
+ argumentDefinitions,
true,
fg,
make_error(
error_marker,
config.map_loc,
- span,
+ fg_type_condition.span,
Printf.sprintf("Unknown type \"%s\"", fg_type_condition.item),
),
)
@@ -634,18 +883,23 @@ let rec unify_document_schema = (config, document) => {
unify_selection_set(
error_marker,
is_record,
+ None,
config,
span,
ty,
Some(fg_selection_set),
);
+ let argumentDefinitions =
+ getFragmentArgumentDefinitions(fg_directives);
+
switch (with_decoder) {
- | Error(err) => Mod_fragment(fg_name.item, [], true, fg, err)
+ | Error(err) =>
+ Def_fragment(fg_name.item, argumentDefinitions, true, fg, err)
| Ok(decoder) =>
- Mod_fragment(
+ Def_fragment(
fg_name.item,
- [],
+ argumentDefinitions,
error_marker.has_error,
fg,
switch (decoder) {
@@ -659,7 +913,5 @@ let rec unify_document_schema = (config, document) => {
...unify_document_schema(config, rest),
]
| [] => []
- | _ =>
- raise @@ Unimplemented("unification with other than singular queries")
};
};
diff --git a/src/base/result_decoder.rei b/src/base/result_decoder.rei
new file mode 100644
index 00000000..84d923f2
--- /dev/null
+++ b/src/base/result_decoder.rei
@@ -0,0 +1,16 @@
+let getFragmentArgumentDefinitions:
+ list(Source_pos.spanning(Graphql_ast.directive)) =>
+ list((string, string, Source_pos.span, Source_pos.span));
+
+/**
+ * Takes a list of the AST of the GraphQL definitions (operations or fragments)
+ * and transforms that into a list of result structures. These result structures
+ * form the basis to generate the reason code for:
+ * - `query` variable
+ * - `parse` function
+ * - `serialize` function
+ * - `makeVariables` function
+*/
+let unify_document_schema:
+ (Generator_utils.output_config, list(Graphql_ast.definition)) =>
+ list(Result_structure.definition);
diff --git a/src/base/result_structure.re b/src/base/result_structure.re
index 8e65784e..0be1d31a 100644
--- a/src/base/result_structure.re
+++ b/src/base/result_structure.re
@@ -3,10 +3,17 @@ type exhaustive_flag =
| Nonexhaustive;
type loc = Source_pos.ast_location;
+type name = Source_pos.spanning(string);
type field_result =
- | Fr_named_field(string, loc, t)
- | Fr_fragment_spread(string, loc, string)
+ | Fr_named_field({
+ name: string,
+ loc_key: loc,
+ loc,
+ type_: t,
+ arguments: Graphql_ast.arguments,
+ })
+ | Fr_fragment_spread(string, loc, string, option(string), list(string))
and t =
| Res_nullable(loc, t)
| Res_array(loc, t)
@@ -16,25 +23,31 @@ and t =
| Res_float(loc)
| Res_boolean(loc)
| Res_raw_scalar(loc)
- | Res_poly_enum(loc, Schema.enum_meta)
+ | Res_poly_enum(loc, Schema.enum_meta, bool)
| Res_custom_decoder(loc, string, t)
- | Res_record(loc, string, list(field_result))
- | Res_object(loc, string, list(field_result))
- | Res_poly_variant_selection_set(loc, string, list((string, t)))
- | Res_poly_variant_union(loc, string, list((string, t)), exhaustive_flag)
+ | Res_record(loc, string, list(field_result), option(string))
+ | Res_object(loc, string, list(field_result), option(string))
+ | Res_poly_variant_selection_set(loc, string, list((name, t)))
+ | Res_poly_variant_union(
+ loc,
+ string,
+ list((name, t)),
+ exhaustive_flag,
+ bool,
+ )
| Res_poly_variant_interface(loc, string, (string, t), list((string, t)))
- | Res_solo_fragment_spread(loc, string)
+ | Res_solo_fragment_spread(loc, string, list(string))
| Res_error(loc, string);
-type mod_ =
- | Mod_fragment(
+type definition =
+ | Def_fragment(
string,
- list(string),
+ list((string, string, Source_pos.span, Source_pos.span)),
bool,
Source_pos.spanning(Graphql_ast.fragment),
t,
)
- | Mod_default_operation(
+ | Def_operation(
option(Source_pos.spanning(Graphql_ast.variable_definitions)),
bool,
Source_pos.spanning(Graphql_ast.operation),
@@ -51,14 +64,14 @@ let res_loc =
| Res_float(loc)
| Res_boolean(loc)
| Res_raw_scalar(loc)
- | Res_poly_enum(loc, _)
+ | Res_poly_enum(loc, _, _)
| Res_custom_decoder(loc, _, _)
- | Res_record(loc, _, _)
- | Res_object(loc, _, _)
+ | Res_record(loc, _, _, _)
+ | Res_object(loc, _, _, _)
| Res_poly_variant_selection_set(loc, _, _)
- | Res_poly_variant_union(loc, _, _, _)
+ | Res_poly_variant_union(loc, _, _, _, _)
| Res_poly_variant_interface(loc, _, _, _)
- | Res_solo_fragment_spread(loc, _)
+ | Res_solo_fragment_spread(loc, _, _)
| Res_error(loc, _) => loc;
let can_be_absent_as_field =
diff --git a/src/base/result_structure.rei b/src/base/result_structure.rei
new file mode 100644
index 00000000..4257dd9e
--- /dev/null
+++ b/src/base/result_structure.rei
@@ -0,0 +1,58 @@
+type exhaustive_flag =
+ | Exhaustive
+ | Nonexhaustive;
+
+type loc = Source_pos.ast_location;
+type name = Source_pos.spanning(string);
+
+type field_result =
+ | Fr_named_field({
+ name: string,
+ loc_key: loc,
+ loc,
+ type_: t,
+ arguments: Graphql_ast.arguments,
+ })
+ | Fr_fragment_spread(string, loc, string, option(string), list(string))
+and t =
+ | Res_nullable(loc, t)
+ | Res_array(loc, t)
+ | Res_id(loc)
+ | Res_string(loc)
+ | Res_int(loc)
+ | Res_float(loc)
+ | Res_boolean(loc)
+ | Res_raw_scalar(loc)
+ | Res_poly_enum(loc, Schema.enum_meta, bool)
+ | Res_custom_decoder(loc, string, t)
+ | Res_record(loc, string, list(field_result), option(string))
+ | Res_object(loc, string, list(field_result), option(string))
+ | Res_poly_variant_selection_set(loc, string, list((name, t)))
+ | Res_poly_variant_union(
+ loc,
+ string,
+ list((name, t)),
+ exhaustive_flag,
+ bool,
+ )
+ | Res_poly_variant_interface(loc, string, (string, t), list((string, t)))
+ | Res_solo_fragment_spread(loc, string, list(string))
+ | Res_error(loc, string);
+
+type definition =
+ | Def_fragment(
+ string,
+ list((string, string, Source_pos.span, Source_pos.span)),
+ bool,
+ Source_pos.spanning(Graphql_ast.fragment),
+ t,
+ )
+ | Def_operation(
+ option(Source_pos.spanning(Graphql_ast.variable_definitions)),
+ bool,
+ Source_pos.spanning(Graphql_ast.operation),
+ t,
+ );
+
+let res_loc: t => loc;
+let can_be_absent_as_field: t => bool;
diff --git a/src/base/rule_all_required_arguments.re b/src/base/rule_all_required_arguments.re
index 6cab1ddc..4bbf5d00 100644
--- a/src/base/rule_all_required_arguments.re
+++ b/src/base/rule_all_required_arguments.re
@@ -22,8 +22,9 @@ module Visitor: Traversal_utils.VisitorSig = {
|> Option.map(fm => fm.fm_arguments)
|> Option.get_or_else([])
|> List.filter(arg =>
- switch (arg.am_arg_type) {
- | NonNull(_) => true
+ switch (arg.am_arg_type, arg.am_default_value) {
+ | (NonNull(_), None) => true
+ | (NonNull(_), Some(_))
| _ => false
}
);
@@ -40,7 +41,7 @@ module Visitor: Traversal_utils.VisitorSig = {
def.item.fd_name.item,
);
- Context.push_error(ctx, def.span, message);
+ Context.push_error(ctx, def.item.fd_name.span, message);
};
});
};
diff --git a/src/base/rule_deprecated_fields.re b/src/base/rule_deprecated_fields.re
new file mode 100644
index 00000000..09c770e6
--- /dev/null
+++ b/src/base/rule_deprecated_fields.re
@@ -0,0 +1,32 @@
+module Visitor: Traversal_utils.VisitorSig = {
+ open Traversal_utils;
+ open Source_pos;
+ open Graphql_ast;
+
+ include AbstractVisitor;
+
+ type t = unit;
+ let make_self = () => ();
+
+ let enter_field = (_, ctx, def) => {
+ let field_meta =
+ Context.parent_type(ctx)
+ |> Option.flat_map(t => Schema.lookup_field(t, def.item.fd_name.item));
+
+ field_meta
+ |> Option.map((field: Schema.field_meta) => {
+ switch (field.fm_deprecation_reason) {
+ | None => ()
+ | Some(reason) =>
+ let message =
+ Printf.sprintf(
+ "Field \"%s\" has been deprecated. Reason: %s",
+ field.fm_name,
+ reason,
+ );
+ Context.push_warning(ctx, def.span, message);
+ }
+ })
+ |> ignore;
+ };
+};
diff --git a/src/base/rule_known_argument_names.re b/src/base/rule_known_argument_names.re
index 07446418..5b54869f 100644
--- a/src/base/rule_known_argument_names.re
+++ b/src/base/rule_known_argument_names.re
@@ -36,7 +36,7 @@ module Visitor: Traversal_utils.VisitorSig = {
Context.push_error(ctx, span, msg);
};
- let enter_argument = (known_args, ctx, (name, _)) =>
+ let enter_argument = (known_args, ctx, (name, _, _)) =>
switch (known_args^) {
| None => ()
| Some((pos, known_args)) =>
diff --git a/src/base/rule_no_invalid_default_values.re b/src/base/rule_no_invalid_default_values.re
new file mode 100644
index 00000000..207d08bb
--- /dev/null
+++ b/src/base/rule_no_invalid_default_values.re
@@ -0,0 +1,136 @@
+module Visitor: Traversal_utils.VisitorSig = {
+ open Traversal_utils;
+ open Graphql_ast;
+ open Source_pos;
+ open Type_utils.Generic;
+
+ include AbstractVisitor;
+
+ type t = {
+ variable_types: Hashtbl.t(string, tree),
+ mutable arg_type: option((spanning(string), tree)),
+ };
+ let make_self = () => {variable_types: Hashtbl.create(0), arg_type: None};
+
+ let enter_operation_definition = (self, ctx, def) => {
+ let () = Hashtbl.clear(self.variable_types);
+ switch (def.item.o_variable_definitions) {
+ | None => ()
+ | Some({item, _}) =>
+ List.iter(
+ ((name, {vd_type: {item: type_}})) =>
+ Hashtbl.add(
+ self.variable_types,
+ name.item,
+ type_ |> from_graphql_ast_tr(~schema=ctx.schema),
+ ),
+ item,
+ )
+ };
+ };
+
+ let enter_argument =
+ (
+ self,
+ ctx,
+ (name: spanning(string), arg_type: option(Schema.type_ref), _value),
+ ) => {
+ self.arg_type =
+ arg_type
+ |> Option.map(from_schema_tr(~schema=ctx.schema))
+ |> Option.map(tr => (name, tr));
+ };
+
+ let check_apply =
+ (
+ ctx,
+ tr1: tree,
+ tr2: tree,
+ arg_name: spanning(string),
+ name: spanning(string),
+ ) =>
+ switch (can_apply(tr1, tr2)) {
+ | Ok => ()
+ | Unequal =>
+ Traversal_utils.Context.push_error(
+ ctx,
+ name.span,
+ generate_error(
+ MismatchedTypes(tr1 |> string_of_tree, tr2 |> string_of_tree),
+ ),
+ )
+ | RequiredMismatch =>
+ Traversal_utils.Context.push_error(
+ ctx,
+ name.span,
+ generate_error(MismatchedRequiredVar(arg_name.item, name.item)),
+ )
+ };
+
+ let enter_variable_value = (self, ctx, name) => {
+ switch (
+ self.arg_type,
+ try(Some((name, Hashtbl.find(self.variable_types, name.item)))) {
+ | Not_found => None
+ },
+ ) {
+ | (None, _) => ()
+ | (Some((arg_name, NonNull(_))), None) =>
+ // TODO: This could be redundant now, check if rule_all_required_arguments.re is still necessary (or if it covers more cases like Fragments, etc.)
+ Traversal_utils.Context.push_error(
+ ctx,
+ name.span,
+ generate_error(RequiredVariableMissing(arg_name.item, name.item)),
+ )
+ | (Some((_, T(_))), None)
+ | (Some((_, List(_))), None) => ()
+ | (Some((arg_name, arg_type)), Some((_v_name, value_type))) =>
+ check_apply(ctx, arg_type, value_type, arg_name, name)
+ };
+ };
+
+ let check_pre_value = (~reset=false, generic, self, ctx, value) => {
+ switch (self.arg_type) {
+ | Some((arg_name, arg_type)) =>
+ check_apply(
+ ctx,
+ arg_type,
+ NonNull(T(generic)),
+ arg_name,
+ Source_pos.replace(value, ""),
+ )
+ | None => ()
+ };
+ if (reset) {
+ self.arg_type = None;
+ };
+ };
+
+ let enter_int_value = check_pre_value(Int);
+ let enter_float_value = check_pre_value(Float);
+ let enter_string_value = check_pre_value(String);
+ let enter_bool_value = check_pre_value(Boolean);
+ let enter_object_value = check_pre_value(~reset=true, InputObject);
+ // TODO: For Enum, check enum fields from schema
+ let enter_enum_value = check_pre_value(~reset=true, Enum);
+ let enter_list_value = (self, ctx, value) => {
+ switch (self.arg_type) {
+ | Some((_, NonNull(List(_))))
+ | Some((_, List(_)))
+ | Some((_, NonNull(T(EmptyList))))
+ | Some((_, T(EmptyList)))
+ | None => ()
+ | Some((_name, arg_type)) =>
+ Traversal_utils.Context.push_error(
+ ctx,
+ value.span,
+ generate_error(MismatchedTypes(arg_type |> string_of_tree, "List")),
+ )
+ };
+ // We are done, as the above functions also apply to list object fields
+ self.arg_type = None;
+ };
+ let exit_argument = (self, _, _) => {
+ self.arg_type = None;
+ };
+};
diff --git a/src/base/rule_no_invalid_input_object_values.re b/src/base/rule_no_invalid_input_object_values.re
new file mode 100644
index 00000000..87da50a7
--- /dev/null
+++ b/src/base/rule_no_invalid_input_object_values.re
@@ -0,0 +1,149 @@
+module Visitor: Traversal_utils.VisitorSig = {
+ open Traversal_utils;
+ open Graphql_ast;
+ open Source_pos;
+ open Type_utils.Generic;
+
+ include AbstractVisitor;
+
+ type t = {variable_types: Hashtbl.t(string, tree)};
+ let make_self = () => {variable_types: Hashtbl.create(0)};
+
+ let enter_operation_definition = (self, ctx, def) => {
+ let () = Hashtbl.clear(self.variable_types);
+ switch (def.item.o_variable_definitions) {
+ | None => ()
+ | Some({item, _}) =>
+ List.iter(
+ ((name, {vd_type: {item: type_}})) =>
+ Hashtbl.add(
+ self.variable_types,
+ name.item,
+ type_ |> from_graphql_ast_tr(~schema=ctx.schema),
+ ),
+ item,
+ )
+ };
+ };
+
+ let rec parse_input_object =
+ (
+ self,
+ ctx,
+ top_pos: spanning(string),
+ type_: Schema.type_ref,
+ value: spanning(input_value),
+ ) => {
+ switch (
+ type_ |> Schema.innermost_name |> Schema.lookup_type(ctx.schema),
+ value.item,
+ ) {
+ | (
+ Some(InputObject(obj_meta)),
+ Iv_list([{item: Iv_object(value), _}, ..._]),
+ )
+ // | (
+ // Some(InputObject(obj_meta)),
+ // Iv_list([{item: Iv_object(value), _}, ..._]),
+ // )
+ | (Some(InputObject(obj_meta)), Iv_object(value)) =>
+ obj_meta.iom_input_fields
+ |> List.iter(({Schema.am_arg_type, am_name}) => {
+ let value_field =
+ value
+ |> List.find_opt(((name, _value)) => {name.item == am_name});
+
+ switch (value_field) {
+ | Some(value_field) =>
+ parse_input_object(
+ self,
+ ctx,
+ fst(value_field),
+ am_arg_type,
+ snd(value_field),
+ )
+ | None => ()
+ };
+
+ switch (
+ am_arg_type |> from_schema_tr(~schema=ctx.schema),
+ value_field
+ |> Option.map(((name, value)) =>
+ (
+ switch (value.item) {
+ | Iv_variable(val_name) =>
+ Source_pos.replace(name, val_name)
+ | _ => name
+ },
+ Source_pos.replace(
+ value,
+ value.item
+ |> from_graphql_ast_iv(
+ ~arguments=self.variable_types,
+ ~schema=ctx.schema,
+ ),
+ ),
+ )
+ ),
+ ) {
+ | (NonNull(_), None) =>
+ Traversal_utils.Context.push_error(
+ ctx,
+ top_pos.span,
+ generate_error(RequiredFieldMissing(top_pos.item, am_name)),
+ )
+ | (T(_), None)
+ | (List(_), None) => ()
+ | (key_type, Some((name, value))) =>
+ switch (can_apply(key_type, value.item)) {
+ | Ok => ()
+ | Unequal =>
+ Traversal_utils.Context.push_error(
+ ctx,
+ value.span,
+ generate_error(
+ MismatchedTypes(
+ key_type |> string_of_tree,
+ value.item |> string_of_tree,
+ ),
+ ),
+ )
+ | RequiredMismatch =>
+ Traversal_utils.Context.push_error(
+ ctx,
+ name.span,
+ generate_error(MismatchedRequiredVar(am_name, name.item)),
+ )
+ }
+ };
+ })
+ | _ => ()
+ };
+ };
+
+ let enter_argument =
+ (
+ self,
+ ctx,
+ (
+ name: spanning(string),
+ arg_type: option(Schema.type_ref),
+ value: spanning(input_value),
+ ),
+ ) => {
+ switch (arg_type |> Option.map(from_schema_tr(~schema=ctx.schema))) {
+ | Some(T(InputObject))
+ | Some(NonNull(T(InputObject)))
+ | Some(List(T(InputObject)))
+ | Some(NonNull(List(T(InputObject)))) =>
+ parse_input_object(
+ self,
+ ctx,
+ name,
+ arg_type |> Option.unsafe_unwrap,
+ value,
+ )
+ | _ => ()
+ };
+ };
+};
diff --git a/src/base/rule_no_undefined_variables.re b/src/base/rule_no_undefined_variables.re
index a81f4115..066ed0d8 100644
--- a/src/base/rule_no_undefined_variables.re
+++ b/src/base/rule_no_undefined_variables.re
@@ -5,21 +5,41 @@ module Visitor: Traversal_utils.VisitorSig = {
include AbstractVisitor;
- type t = Hashtbl.t(string, spanning(string));
+ type opts = {mutable active: bool};
+ type t = (opts, Hashtbl.t(string, span));
- let make_self = () => Hashtbl.create(0);
+ let make_self = () => ({active: false}, Hashtbl.create(0));
- let enter_operation_definition = (self, _, def) => {
+ let enter_operation_definition = ((opts, self), _, def) => {
+ opts.active = true;
let () = Hashtbl.clear(self);
switch (def.item.o_variable_definitions) {
| None => ()
| Some({item, _}) =>
- List.iter(((name, _)) => Hashtbl.add(self, name.item, name), item)
+ List.iter(
+ ((name, _)) => Hashtbl.add(self, name.item, name.span),
+ item,
+ )
};
};
- let enter_variable_value = (self, ctx, def) =>
- if (!Hashtbl.mem(self, def.item)) {
+ let exit_operation_definition = ((opts, _), _, _) => {
+ opts.active = false;
+ };
+
+ let enter_fragment_definition = ((opts, self), _, def) => {
+ opts.active = true;
+ let () = Hashtbl.clear(self);
+ Result_decoder.getFragmentArgumentDefinitions(def.item.fg_directives)
+ |> List.iter(((name, _, span, _)) => Hashtbl.add(self, name, span));
+ };
+
+ let exit_fragment_definition = ((opts, _), _, _) => {
+ opts.active = false;
+ };
+
+ let enter_variable_value = ((opts, self), ctx, def) =>
+ if (opts.active && !Hashtbl.mem(self, def.item)) {
let message =
Printf.sprintf(
"Variable \"%s\" not found in operation. Make sure it's defined!",
diff --git a/src/base/rule_no_unused_variables.re b/src/base/rule_no_unused_variables.re
index 619f409e..6d0f16da 100644
--- a/src/base/rule_no_unused_variables.re
+++ b/src/base/rule_no_unused_variables.re
@@ -5,38 +5,63 @@ module Visitor: Traversal_utils.VisitorSig = {
include AbstractVisitor;
- type t = Hashtbl.t(string, spanning(string));
+ type t = Hashtbl.t(string, span);
let make_self = () => Hashtbl.create(0);
+ let enter_fragment_definition = (self, _, def) => {
+ let () = Hashtbl.clear(self);
+ Result_decoder.getFragmentArgumentDefinitions(def.item.fg_directives)
+ |> List.iter(((name, _, span, _)) => {Hashtbl.add(self, name, span)});
+ };
+
+ let exit_fragment_definition = (self, ctx, def) =>
+ Hashtbl.iter(
+ (v, span) => {
+ let message =
+ Printf.sprintf(
+ "Variable \"$%s\" is never used in fragment \"%s\"",
+ v,
+ def.item.fg_name.item,
+ );
+
+ Context.push_error(ctx, span, message);
+ },
+ self,
+ );
+
let enter_operation_definition = (self, _, def) => {
let () = Hashtbl.clear(self);
switch (def.item.o_variable_definitions) {
| None => ()
| Some({item, _}) =>
- List.iter(((name, _)) => Hashtbl.add(self, name.item, name), item)
+ List.iter(
+ ((name, _)) => Hashtbl.add(self, name.item, name.span),
+ item,
+ )
};
};
- let enter_variable_value = (self, _, name) =>
- Hashtbl.remove(self, name.item);
-
let exit_operation_definition = (self, ctx, def) =>
Hashtbl.iter(
- (_, v) => {
- let message =
- switch (def.item.o_name) {
- | None => Printf.sprintf("Variable \"$%s\" is never used.", v.item)
- | Some(name) =>
- Printf.sprintf(
- "Variable \"$%s\" is never used in operation \"%s\"",
- v.item,
- name.item,
- )
- };
-
- Context.push_error(ctx, v.span, message);
- },
+ (v, span) =>
+ if (v.[0] != '_') {
+ let message =
+ switch (def.item.o_name) {
+ | None => Printf.sprintf("Variable \"$%s\" is never used.", v)
+ | Some(name) =>
+ Printf.sprintf(
+ "Variable \"$%s\" is never used in operation \"%s\"",
+ v,
+ name.item,
+ )
+ };
+
+ Context.push_error(ctx, span, message);
+ },
self,
);
+
+ let enter_variable_value = (self, _, name) =>
+ Hashtbl.remove(self, name.item);
};
diff --git a/src/base/schema.re b/src/base/schema.re
index 512155f1..331ed24d 100644
--- a/src/base/schema.re
+++ b/src/base/schema.re
@@ -90,7 +90,7 @@ type directive_meta = {
dm_arguments: list(argument_meta),
};
-type schema = {
+type t = {
meta: schema_meta,
type_map: Hashtbl.t(string, type_meta),
directive_map: Hashtbl.t(string, directive_meta),
@@ -177,6 +177,16 @@ let type_name = ty =>
| InputObject({iom_name, _}) => iom_name
};
+let is_type_default = ty =>
+ switch (ty |> type_name) {
+ | "ID"
+ | "String"
+ | "Int"
+ | "Float"
+ | "Boolean" => true
+ | _ => false
+ };
+
let lookup_type = (schema, name) =>
switch (Hashtbl.find_all(schema.type_map, name)) {
| [] => None
diff --git a/src/base/schema_printer.re b/src/base/schema_printer.re
new file mode 100644
index 00000000..0627fc17
--- /dev/null
+++ b/src/base/schema_printer.re
@@ -0,0 +1,90 @@
+open Schema;
+
+let rec print_type_ref = (type_ref: type_ref) => {
+ switch (type_ref) {
+ | Schema.Named(n) => n
+ | List(t) => "[" ++ print_type_ref(t) ++ "]"
+ | NonNull(t) => print_type_ref(t) ++ "!"
+ };
+};
+
+let print_field = ({fm_name, fm_field_type}: field_meta) => {
+ fm_name ++ ": " ++ (fm_field_type |> print_type_ref);
+};
+
+let print_input_field = ({am_name, am_arg_type}: argument_meta) => {
+ am_name ++ ": " ++ (am_arg_type |> print_type_ref);
+};
+
+let print_object = ({om_fields, om_name}: object_meta) => {
+ (
+ om_fields
+ |> List.fold_left(
+ (p, {fm_name} as field: Schema.field_meta) => {
+ fm_name != "__typename" ? p ++ "\n " ++ print_field(field) : p
+ },
+ om_name ++ " {",
+ )
+ )
+ ++ "\n}";
+};
+
+let print_input_object = ({iom_input_fields, iom_name}: input_object_meta) => {
+ (
+ iom_input_fields
+ |> List.fold_left(
+ (p, input_field: Schema.argument_meta) =>
+ p ++ "\n " ++ print_input_field(input_field),
+ iom_name ++ " {",
+ )
+ )
+ ++ "\n}";
+};
+
+let print_enum = ({em_name, em_values}: enum_meta) => {
+ em_name
+ ++ " {\n"
+ ++ (
+ em_values
+ |> List.fold_left(
+ (p, {evm_name, evm_deprecation_reason}) => {
+ p
+ ++ " "
+ ++ evm_name
+ ++ (
+ switch (evm_deprecation_reason) {
+ | None => ""
+ | Some(_) => " (DEPRECATED)"
+ }
+ )
+ ++ "\n"
+ },
+ "",
+ )
+ )
+ ++ "}";
+};
+
+let print_scalar = ({sm_name}: scalar_meta) => sm_name;
+
+let print_type = (name: string, schema: t) => {
+ Schema.lookup_type(schema, name)
+ |> Option.flat_map(
+ fun
+ | Object(obj_meta) => Some(print_object(obj_meta))
+ | Scalar(scalar_meta) => Some(print_scalar(scalar_meta))
+ | InputObject(input_obj_meta) =>
+ Some(print_input_object(input_obj_meta))
+ | Enum(enum_meta) => Some(print_enum(enum_meta))
+ | Interface(_)
+ | Union(_) => None,
+ );
+};
+
+let rec print_type_from_ref = (type_ref: type_ref, schema: t) => {
+ switch (type_ref) {
+ | Schema.Named(n) => print_type(n, schema) |> Option.get_or_else("N/A")
+ | List(t) => "[" ++ print_type_from_ref(t, schema) ++ "]"
+ | NonNull(t) => print_type_from_ref(t, schema) ++ "!"
+ };
+};
diff --git a/src/base/source_pos.re b/src/base/source_pos.re
index 7a50cca2..c1bcc27e 100644
--- a/src/base/source_pos.re
+++ b/src/base/source_pos.re
@@ -4,12 +4,15 @@ type source_position = {
col: int,
};
+type span = (source_position, source_position);
type spanning('a) = {
item: 'a,
- span: (source_position, source_position),
+ span,
};
let origin = {index: 0, line: 0, col: 0};
+let nopos = {index: (-1), line: (-1), col: (-1)};
+let nospan = (nopos, nopos);
let advance_line = ({index, line, col: _}) => {
index: index + 1,
diff --git a/src/base/traversal_utils.re b/src/base/traversal_utils.re
index 9f81da0b..cdaa03a3 100644
--- a/src/base/traversal_utils.re
+++ b/src/base/traversal_utils.re
@@ -4,8 +4,9 @@ open Source_pos;
type ctx = {
map_loc: ((source_position, source_position)) => Result_structure.loc,
fragments: Hashtbl.t(string, Graphql_ast.fragment),
- schema: Schema.schema,
+ schema: Schema.t,
errors: ref(list((Result_structure.loc, string))),
+ warnings: ref(list((Result_structure.loc, string))),
type_stack: list(option(Schema.type_meta)),
type_literal_stack: list(option(Schema.type_ref)),
input_type_stack: list(option(Schema.type_meta)),
@@ -36,7 +37,12 @@ module type VisitorSig = {
let exit_directive: (t, ctx, spanning(directive)) => unit;
let enter_argument:
- (t, ctx, (spanning(string), spanning(input_value))) => unit;
+ (
+ t,
+ ctx,
+ (spanning(string), option(Schema.type_ref), spanning(input_value))
+ ) =>
+ unit;
let exit_argument:
(t, ctx, (spanning(string), spanning(input_value))) => unit;
@@ -73,13 +79,17 @@ module type VisitorSig = {
let enter_variable_value: (t, ctx, spanning(string)) => unit;
let exit_variable_value: (t, ctx, spanning(string)) => unit;
- let enter_list_value: (t, ctx, list(spanning(input_value))) => unit;
- let exit_list_value: (t, ctx, list(spanning(input_value))) => unit;
+ let enter_list_value:
+ (t, ctx, spanning(list(spanning(input_value)))) => unit;
+ let exit_list_value:
+ (t, ctx, spanning(list(spanning(input_value)))) => unit;
let enter_object_value:
- (t, ctx, list((spanning(string), spanning(input_value)))) => unit;
+ (t, ctx, spanning(list((spanning(string), spanning(input_value))))) =>
+ unit;
let exit_object_value:
- (t, ctx, list((spanning(string), spanning(input_value)))) => unit;
+ (t, ctx, spanning(list((spanning(string), spanning(input_value))))) =>
+ unit;
let enter_object_field:
(t, ctx, (spanning(string), spanning(input_value))) => unit;
@@ -194,6 +204,8 @@ module Context = {
};
let push_error = (ctx, loc, msg) =>
ctx.errors := [(ctx.map_loc(loc), msg), ...ctx.errors^];
+ let push_warning = (ctx, loc, msg) =>
+ ctx.warnings := [(ctx.map_loc(loc), msg), ...ctx.warnings^];
};
let rec as_schema_type_ref =
@@ -219,8 +231,10 @@ module Visitor = (V: VisitorSig) => {
V.enter_enum_value(self, ctx, Source_pos.replace(value, e))
| Iv_variable(v) =>
V.enter_variable_value(self, ctx, Source_pos.replace(value, v))
- | Iv_list(l) => V.enter_list_value(self, ctx, l)
- | Iv_object(o) => V.enter_object_value(self, ctx, o)
+ | Iv_list(l) =>
+ V.enter_list_value(self, ctx, Source_pos.replace(value, l))
+ | Iv_object(o) =>
+ V.enter_object_value(self, ctx, Source_pos.replace(value, o))
};
let exit_input_value = (self, ctx, value) =>
@@ -237,15 +251,26 @@ module Visitor = (V: VisitorSig) => {
V.exit_enum_value(self, ctx, Source_pos.replace(value, e))
| Iv_variable(v) =>
V.exit_variable_value(self, ctx, Source_pos.replace(value, v))
- | Iv_list(l) => V.exit_list_value(self, ctx, l)
- | Iv_object(o) => V.exit_object_value(self, ctx, o)
+ | Iv_list(l) =>
+ V.exit_list_value(self, ctx, Source_pos.replace(value, l))
+ | Iv_object(o) =>
+ V.exit_object_value(self, ctx, Source_pos.replace(value, o))
};
- let rec visit_input_value = (self, ctx, value) => {
+ let rec visit_input_value =
+ (self, ctx, arg_type: option(Schema.type_ref), value) => {
let () = enter_input_value(self, ctx, value);
let () =
- switch (value.item) {
- | Iv_object(fields) =>
+ switch (
+ arg_type
+ |> Option.map(Schema.innermost_name)
+ |> Option.flat_map(Schema.lookup_type(ctx.schema)),
+ value.item,
+ ) {
+ | (Some(Scalar(_) as ty), _)
+ when ty |> Schema.is_type_default === false =>
+ ()
+ | (_, Iv_object(fields)) =>
List.iter(
((key, value)) => {
let inner_type =
@@ -257,16 +282,23 @@ module Visitor = (V: VisitorSig) => {
Schema.lookup_type(ctx.schema, name)
| _ => None,
)
- |> Option.flat_map(t => Schema.lookup_input_field(t, key.item))
+ |> Option.flat_map(t =>
+ try(Schema.lookup_input_field(t, key.item)) {
+ | Schema.Invalid_type(msg) =>
+ Context.push_error(ctx, key.span, msg);
+ None;
+ | other => raise(other)
+ }
+ )
|> Option.map(am => am.Schema.am_arg_type);
let ctx = Context.push_input_type(ctx, inner_type);
let () = V.enter_object_field(self, ctx, (key, value));
- let () = visit_input_value(self, ctx, value);
+ let () = visit_input_value(self, ctx, inner_type, value);
V.exit_object_field(self, ctx, (key, value));
},
fields,
)
- | Iv_list(items) =>
+ | (_, Iv_list(items)) =>
let inner_type =
Context.current_input_type_literal(ctx)
|> Option.flat_map(
@@ -276,7 +308,7 @@ module Visitor = (V: VisitorSig) => {
| _ => None,
);
let ctx = Context.push_input_type(ctx, inner_type);
- List.iter(visit_input_value(self, ctx), items);
+ List.iter(visit_input_value(self, ctx, inner_type), items);
| _ => ()
};
exit_input_value(self, ctx, value);
@@ -349,8 +381,8 @@ module Visitor = (V: VisitorSig) => {
)
|> Option.map(am => am.Schema.am_arg_type);
let ctx = Context.push_input_type(ctx, arg_type);
- let () = V.enter_argument(self, ctx, (name, value));
- let () = visit_input_value(self, ctx, value);
+ let () = V.enter_argument(self, ctx, (name, arg_type, value));
+ let () = visit_input_value(self, ctx, arg_type, value);
V.exit_argument(self, ctx, (name, value));
},
item,
@@ -381,7 +413,13 @@ module Visitor = (V: VisitorSig) => {
let () =
switch (def.vd_default_value) {
| None => ()
- | Some(value) => visit_input_value(self, ctx, value)
+ | Some(value) =>
+ visit_input_value(
+ self,
+ ctx,
+ Some(def.vd_type.item |> Type_utils.to_schema_type_ref),
+ value,
+ )
};
V.exit_variable_definition(self, ctx, (name, def));
},
@@ -462,6 +500,7 @@ let make_context = (config, document) => {
fragments: find_fragments(document),
schema: config.Generator_utils.schema,
errors: ref([]),
+ warnings: ref([]),
type_stack: [],
type_literal_stack: [],
input_type_stack: [],
diff --git a/src/base/type_utils.re b/src/base/type_utils.re
index bde187dc..259236af 100644
--- a/src/base/type_utils.re
+++ b/src/base/type_utils.re
@@ -29,3 +29,189 @@ let is_nullable =
| Ntr_named(_)
| Ntr_list(_) => false
| Ntr_nullable(_) => true;
+
+module Generic = {
+ type t =
+ | ID
+ | String
+ | Int
+ | Float
+ | Boolean
+ | Null
+ | CustomScalar
+ | Object
+ | InputObject
+ | Enum
+ | Interface
+ | Union
+ | EmptyList;
+
+ type tree =
+ | T(t)
+ | NonNull(tree)
+ | List(tree);
+
+ let string_of_t =
+ fun
+ | ID => "ID"
+ | String => "String"
+ | Int => "Int"
+ | Float => "Float"
+ | Boolean => "Boolean"
+ | Object => "Object"
+ | InputObject => "InputObject"
+ | Enum => "Enum"
+ | Interface => "Interface"
+ | Union => "Union"
+ | Null => "Null"
+ | CustomScalar => "CustomScalar"
+ | EmptyList => "EmptyList";
+
+ let rec string_of_tree =
+ fun
+ | T(t) => t |> string_of_t
+ | NonNull(List(t)) => "[" ++ string_of_tree(t) ++ "]!"
+ | NonNull(t) => string_of_tree(t) ++ "!"
+ | List(t) => "[" ++ string_of_tree(t) ++ "]";
+
+ let eq = (t1: t, t2: t) =>
+ switch (t1, t2) {
+ | (ID, String)
+ | (String, ID)
+ | (Object, InputObject)
+ | (InputObject, Object) => true
+ | (t1, t2) when t1 === t2 => true
+ | _ => false
+ };
+ let eq_tree = (t1: tree, t2: tree) =>
+ t1 |> string_of_tree === (t2 |> string_of_tree);
+
+ type apply_result =
+ | Ok
+ | Unequal
+ | RequiredMismatch;
+ let rec can_apply = (to_: tree, from: tree) => {
+ switch (to_, from) {
+ // Disable checks for custom scalars
+ | (T(CustomScalar), T(_)) => Ok
+ | (T(CustomScalar), NonNull(_)) => Ok
+ // Needs recursive check
+ | (NonNull(t1), NonNull(t2))
+ | (List(t1), List(t2))
+ | (List(t1), NonNull(List(t2))) => can_apply(t1, t2)
+ // Normal type equality
+ | (T(t1), T(t2))
+ | (T(t1), NonNull(T(t2))) => eq(t1, t2) ? Ok : Unequal
+ // Default value "EmptyList" is acceptable for list types
+ | (List(_), T(EmptyList))
+ | (List(_), NonNull(T(EmptyList)))
+ | (NonNull(List(_)), T(EmptyList)) => Ok
+ // Left side is required, right side is not
+ | (NonNull(_), T(_))
+ | (NonNull(_), List(_)) => RequiredMismatch
+ | _ => Unequal
+ };
+ };
+
+ let from_schema_tm = (ty: Schema.type_meta) =>
+ switch (ty) {
+ | Scalar({sm_name: "ID"}) => ID
+ | Scalar({sm_name: "String"}) => String
+ | Scalar({sm_name: "Int"}) => Int
+ | Scalar({sm_name: "Float"}) => Float
+ | Scalar({sm_name: "Boolean"}) => Boolean
+ | Scalar(_) => CustomScalar
+ | Object(_) => Object
+ | InputObject(_) => InputObject
+ | Enum(_) => Enum
+ | Interface(_) => Interface
+ | Union(_) => Union
+ };
+ let rec from_schema_tr = (~schema: Schema.t, tr: Schema.type_ref) => {
+ switch (tr) {
+ | Named(name) =>
+ T(
+ name
+ |> Schema.lookup_type(schema)
+ |> Option.map(from_schema_tm)
+ |> Option.get_or_else(Null),
+ )
+ | NonNull(tr) => NonNull(tr |> from_schema_tr(~schema))
+ | List(tr) => List(tr |> from_schema_tr(~schema))
+ };
+ };
+
+ let rec from_graphql_ast_tr = (~schema: Schema.t, tr: Graphql_ast.type_ref) => {
+ switch (tr) {
+ | Tr_named(name) =>
+ T(
+ name.item
+ |> Schema.lookup_type(schema)
+ |> Option.map(from_schema_tm)
+ |> Option.get_or_else(Null),
+ )
+ | Tr_non_null_named(name) =>
+ NonNull(Tr_named(name) |> from_graphql_ast_tr(~schema))
+ | Tr_non_null_list(name) =>
+ NonNull(Tr_list(name) |> from_graphql_ast_tr(~schema))
+ | Tr_list(t) => List(t.item |> from_graphql_ast_tr(~schema))
+ };
+ };
+
+ let rec from_graphql_ast_iv =
+ (
+ ~arguments: Hashtbl.t(string, tree)=Hashtbl.create(0),
+ ~schema: Schema.t,
+ iv: Graphql_ast.input_value,
+ ) =>
+ switch (iv) {
+ | Iv_null => NonNull(T(Null))
+ | Iv_int(_) => NonNull(T(Int))
+ | Iv_float(_) => NonNull(T(Float))
+ | Iv_string(_) => NonNull(T(String))
+ | Iv_boolean(_) => NonNull(T(Boolean))
+ | Iv_enum(_) => NonNull(T(Enum))
+ | Iv_variable(variable_name) =>
+ try(Hashtbl.find(arguments, variable_name)) {
+ | Not_found => T(Null)
+ }
+ | Iv_list([inner, ..._]) =>
+ NonNull(List(inner.item |> from_graphql_ast_iv(~arguments, ~schema)))
+ | Iv_list([]) => NonNull(T(EmptyList))
+ | Iv_object(_) => NonNull(T(InputObject))
+ };
+
+ type error =
+ | MismatchedTypes(string, string)
+ | MismatchedRequiredVar(string, string)
+ | RequiredFieldMissing(string, string)
+ | RequiredVariableMissing(string, string);
+ let generate_error = (error: error) => {
+ switch (error) {
+ | MismatchedTypes(expected, received) =>
+ Printf.sprintf(
+ "Invalid argument. Expected \"%s\" but received \"%s\".",
+ expected,
+ received,
+ )
+ | MismatchedRequiredVar(arg_name, val_name) =>
+ Printf.sprintf(
+ "Invalid argument. Trying to apply the nullable variable \"$%s\" to the required argument \"%s\".",
+ val_name,
+ arg_name,
+ )
+ | RequiredFieldMissing(arg_name, key_name) =>
+ Printf.sprintf(
+ "Invalid argument. The field \"%s\" on argument \"%s\" is missing.",
+ key_name,
+ arg_name,
+ )
+ | RequiredVariableMissing(arg_name, variable_name) =>
+ Printf.sprintf(
+ "Invalid argument. The variable \"$%s\" on argument \"%s\" is missing.",
+ variable_name,
+ arg_name,
+ )
+ };
+ };
+};
diff --git a/src/base/validations.re b/src/base/validations.re
index 324b6daf..645ff5b9 100644
--- a/src/base/validations.re
+++ b/src/base/validations.re
@@ -2,17 +2,32 @@ open Traversal_utils;
module AllRulesImpl =
Multi_visitor.Visitor(
- Rule_known_argument_names.Visitor,
+ Rule_no_invalid_default_values.Visitor,
(
Multi_visitor.Visitor(
Rule_no_unused_variables.Visitor,
(
Multi_visitor.Visitor(
- Rule_all_required_arguments.Visitor,
+ Rule_no_undefined_variables.Visitor,
(
Multi_visitor.Visitor(
- Rule_no_undefined_variables.Visitor,
- Multi_visitor.NullVisitor,
+ Rule_no_invalid_input_object_values.Visitor,
+ (
+ Multi_visitor.Visitor(
+ Rule_all_required_arguments.Visitor,
+ (
+ Multi_visitor.Visitor(
+ Rule_known_argument_names.Visitor,
+ (
+ Multi_visitor.Visitor(
+ Rule_deprecated_fields.Visitor,
+ Multi_visitor.NullVisitor,
+ )
+ ),
+ )
+ ),
+ )
+ ),
)
),
)
@@ -26,8 +41,11 @@ module AllRules = Visitor(AllRulesImpl);
let run_validators = (config, document) => {
let ctx = make_context(config, document);
let _ = AllRules.visit_document(ctx, document);
- switch (ctx.errors^) {
- | [] => None
- | errs => Some(errs)
- };
+ (
+ switch (ctx.errors^) {
+ | [] => None
+ | errs => Some(errs)
+ },
+ ctx.warnings^,
+ );
};
diff --git a/src/bucklescript/bucklescript_config.re b/src/bucklescript/bucklescript_config.re
new file mode 100644
index 00000000..53c48d5b
--- /dev/null
+++ b/src/bucklescript/bucklescript_config.re
@@ -0,0 +1,269 @@
+open Graphql_ppx_base;
+
+module Paths = {
+ let bsconfig = "bsconfig.json";
+ let bsbProjectRoot = ref("");
+ let projectRoot = ref("");
+
+ let rec findProjectRoot = (~dir) =>
+ if (Sys.file_exists(Filename.concat(dir, bsconfig))) {
+ dir;
+ } else {
+ let parent = dir |> Filename.dirname;
+ if (parent == dir) {
+ prerr_endline(
+ "Error: cannot find project root containing " ++ bsconfig ++ ".",
+ );
+ assert(false);
+ } else {
+ findProjectRoot(~dir=parent);
+ };
+ };
+
+ let setProjectRoot = () => {
+ projectRoot := findProjectRoot(~dir=Sys.getcwd());
+ bsbProjectRoot :=
+ (
+ switch (Sys.getenv_opt("BSB_PROJECT_ROOT")) {
+ | None => projectRoot^
+ | Some(s) => s
+ }
+ );
+ };
+
+ let concat = Filename.concat;
+
+ let getBsConfigFile = () => {
+ let bsconfig = concat(projectRoot^, bsconfig);
+ bsconfig |> Sys.file_exists ? Some(bsconfig) : None;
+ };
+};
+
+exception Config_error(string);
+
+let defaultConfig =
+ Ppx_config.{
+ verbose_logging: false,
+ output_mode: Ppx_config.String,
+ verbose_error_handling:
+ switch (Sys.getenv("NODE_ENV")) {
+ | "production" => false
+ | _ => true
+ | exception Not_found => true
+ },
+ apollo_mode: false,
+ schema_file: "graphql_schema.json",
+ root_directory: Sys.getcwd(),
+ raise_error_with_loc: (loc, message) => {
+ let loc = Output_bucklescript_utils.conv_loc(loc);
+ raise(Location.Error(Location.error(~loc, message)));
+ },
+ records: true,
+ legacy: false,
+ template_tag: None,
+ template_tag_location: None,
+ template_tag_import: None,
+ custom_fields: Hashtbl.create(0),
+ future_added_value: true,
+ extend_query: None,
+ extend_query_no_required_variables: None,
+ extend_mutation: None,
+ extend_mutation_no_required_variables: None,
+ extend_subscription: None,
+ extend_subscription_no_required_variables: None,
+ extend_fragment: None,
+ };
+
+module JsonHelper = {
+ open Yojson.Basic.Util;
+ let mapBool = (option, update, json) =>
+ try(update(json |> (json => json |> member(option) |> to_bool))) {
+ | Yojson.Basic.Util.Type_error(_) => ()
+ | other => raise(other)
+ };
+ let mapString = (option, update, json) =>
+ try(update(json |> (json => json |> member(option) |> to_string))) {
+ | Yojson.Basic.Util.Type_error(_) => ()
+ | other => raise(other)
+ };
+};
+
+let read_custom_fields = json => {
+ Yojson.Basic.Util.(
+ try({
+ let custom_fields = Ppx_config.custom_fields() |> Hashtbl.copy;
+ json
+ |> (json => json |> member("custom-fields") |> to_assoc)
+ |> List.map(((key, value)) => (key, value |> to_string))
+ |> List.iter(((key, value)) => {
+ Hashtbl.add(custom_fields, key, value)
+ });
+ Ppx_config.update_config(current => {...current, custom_fields});
+
+ ();
+ }) {
+ | Yojson.Basic.Util.Type_error(_) => ()
+ | other => raise(other)
+ }
+ );
+};
+
+let read_config = () => {
+ Paths.setProjectRoot();
+
+ Ppx_config.set_config(defaultConfig);
+ open Yojson.Basic.Util;
+
+ let parseConfig = (json: Yojson.Basic.t) => {
+ let ppxConfig = json |> member("graphql");
+
+ ppxConfig
+ |> JsonHelper.mapBool("verbose", verbose_logging => {
+ Ppx_config.update_config(current => {...current, verbose_logging})
+ });
+ ppxConfig
+ |> JsonHelper.mapBool("future-added-value", future_added_value => {
+ Ppx_config.update_config(current => {...current, future_added_value})
+ });
+ ppxConfig
+ |> JsonHelper.mapBool("apollo-mode", apollo_mode => {
+ Ppx_config.update_config(current => {...current, apollo_mode})
+ });
+ ppxConfig
+ |> JsonHelper.mapString("schema", schema_file => {
+ Ppx_config.update_config(current => {...current, schema_file})
+ });
+ ppxConfig
+ |> JsonHelper.mapString("ast-out", ast_out => {
+ Ppx_config.update_config(current =>
+ {
+ ...current,
+ output_mode:
+ switch (ast_out) {
+ | "apollo" => Ppx_config.Apollo_AST
+ | "string" => Ppx_config.String
+ | other =>
+ raise(
+ Config_error(
+ "Error in graphql configuration: ast-out \""
+ ++ other
+ ++ "\" is not supported. Choose either apollo or string.",
+ ),
+ )
+ },
+ }
+ )
+ });
+ ppxConfig
+ |> JsonHelper.mapString("mode", mode => {
+ switch (mode) {
+ | "legacy" =>
+ Ppx_config.update_config(current =>
+ {...current, legacy: true, records: false}
+ )
+ | "objects" =>
+ Ppx_config.update_config(current => {...current, records: false})
+ | "records" =>
+ Ppx_config.update_config(current => {...current, records: true})
+ | other =>
+ raise(
+ Config_error(
+ "Error in graphql-ppx configuration: mode \""
+ ++ other
+ ++ "\" is not supported. Choose either records, objects or legacy.",
+ ),
+ )
+ }
+ });
+
+ ppxConfig
+ |> JsonHelper.mapString("extend-query", extend_query => {
+ Ppx_config.update_config(current =>
+ {...current, extend_query: Some(extend_query)}
+ )
+ });
+
+ ppxConfig
+ |> JsonHelper.mapString("extend-query-no-required-variables", extend_query => {
+ Ppx_config.update_config(current =>
+ {
+ ...current,
+ extend_query_no_required_variables: Some(extend_query),
+ }
+ )
+ });
+
+ ppxConfig
+ |> JsonHelper.mapString("extend-mutation", extend_mutation => {
+ Ppx_config.update_config(current =>
+ {...current, extend_mutation: Some(extend_mutation)}
+ )
+ });
+
+ ppxConfig
+ |> JsonHelper.mapString(
+ "extend-mutation-no-required-variables", extend_mutation => {
+ Ppx_config.update_config(current =>
+ {
+ ...current,
+ extend_mutation_no_required_variables: Some(extend_mutation),
+ }
+ )
+ });
+
+ ppxConfig
+ |> JsonHelper.mapString("extend-subscription", extend_subscription => {
+ Ppx_config.update_config(current =>
+ {...current, extend_subscription: Some(extend_subscription)}
+ )
+ });
+
+ ppxConfig
+ |> JsonHelper.mapString(
+ "extend-subscription-no-required-variables", extend_subscription => {
+ Ppx_config.update_config(current =>
+ {
+ ...current,
+ extend_subscription_no_required_variables:
+ Some(extend_subscription),
+ }
+ )
+ });
+
+ ppxConfig
+ |> JsonHelper.mapString("extend-fragment", extend_fragment => {
+ Ppx_config.update_config(current =>
+ {...current, extend_fragment: Some(extend_fragment)}
+ )
+ });
+
+ ppxConfig
+ |> JsonHelper.mapString("template-tag", template_tag => {
+ Ppx_config.update_config(current =>
+ {...current, template_tag: Some(template_tag)}
+ )
+ });
+ ppxConfig
+ |> JsonHelper.mapString("template-tag-import", template_tag_import => {
+ Ppx_config.update_config(current =>
+ {...current, template_tag_import: Some(template_tag_import)}
+ )
+ });
+ ppxConfig
+ |> JsonHelper.mapString("template-tag-location", template_tag_location => {
+ Ppx_config.update_config(current =>
+ {...current, template_tag_location: Some(template_tag_location)}
+ )
+ });
+ ppxConfig |> read_custom_fields;
+ };
+
+ switch (Paths.getBsConfigFile()) {
+ | Some(bsConfigFile) =>
+ try(bsConfigFile |> Yojson.Basic.from_file |> parseConfig) {
+ | Config_error(_) as e => raise(e)
+ | _ => ()
+ }
+ | None => ()
+ };
+};
diff --git a/src/bucklescript/dune b/src/bucklescript/dune
index 6dcda5ad..d15c77b1 100644
--- a/src/bucklescript/dune
+++ b/src/bucklescript/dune
@@ -1,5 +1,7 @@
(library
(name graphql_ppx_bucklescript)
(libraries reason ocaml-migrate-parsetree graphql_ppx.base)
+ (flags
+ (:standard -w -9))
(preprocess
(pps ppx_tools_versioned.metaquot_408)))
diff --git a/src/bucklescript/graphql_ppx.re b/src/bucklescript/graphql_ppx.re
index 0799efd4..201d386c 100644
--- a/src/bucklescript/graphql_ppx.re
+++ b/src/bucklescript/graphql_ppx.re
@@ -4,26 +4,39 @@ open Source_pos;
open Output_bucklescript_utils;
-let add_pos = (delimLength, base, pos) => {
- let (_, _, col) = Location.get_pos_info(conv_pos(base));
+let add_loc = (delimLength, base, span) => {
+ let (_, _, col) = Location.get_pos_info(conv_pos(base.loc_start));
+ let pos_bol_start =
+ base.loc_start.pos_bol
+ + col
+ + delimLength
+ + fst(span).index
+ - fst(span).col;
+ let pos_bol_end =
+ base.loc_start.pos_bol
+ + col
+ + delimLength
+ + snd(span).index
+ - snd(span).col;
+ let start = pos_bol_start + fst(span).col;
+ let end_ = pos_bol_end + snd(span).col;
{
- pos_fname: base.pos_fname,
- pos_lnum: base.pos_lnum + pos.line,
- pos_bol: 0,
- pos_cnum:
- switch (pos.line) {
- | 0 => delimLength + col + pos.col
- | _ => pos.col
- },
+ loc_start: {
+ pos_fname: base.loc_start.pos_fname,
+ pos_lnum: base.loc_start.pos_lnum + fst(span).line,
+ pos_bol: pos_bol_start,
+ pos_cnum: start,
+ },
+ loc_end: {
+ pos_fname: base.loc_start.pos_fname,
+ pos_lnum: base.loc_start.pos_lnum + snd(span).line,
+ pos_bol: pos_bol_end,
+ pos_cnum: end_,
+ },
+ loc_ghost: false,
};
};
-let add_loc = (delimLength, base, span) => {
- loc_start: add_pos(delimLength, base.loc_start, fst(span)),
- loc_end: add_pos(delimLength, base.loc_start, snd(span)),
- loc_ghost: false,
-};
-
let fmt_lex_err = err =>
Graphql_lexer.(
switch (err) {
@@ -40,6 +53,12 @@ let fmt_lex_err = err =>
}
);
+let global_records = () => Ppx_config.records();
+let legacy = () => Ppx_config.legacy();
+let global_template_tag = () => Ppx_config.template_tag();
+let global_template_tag_import = () => Ppx_config.template_tag_import();
+let global_template_tag_location = () => Ppx_config.template_tag_location();
+
let fmt_parse_err = err =>
Graphql_parser.(
switch (err) {
@@ -57,10 +76,260 @@ let make_error_expr = (loc, message) => {
);
};
-let rewrite_query = (~schema=?, ~loc, ~delim, ~query, ()) => {
+let extract_schema_from_config = config_fields => {
+ open Ast_408;
+ open Asttypes;
+ open Parsetree;
+
+ let maybe_schema_field =
+ try(
+ Some(
+ List.find(
+ config_field =>
+ switch (config_field) {
+ | (
+ {txt: Longident.Lident("schema"), _},
+ {pexp_desc: Pexp_constant(Pconst_string(_, _)), _},
+ ) =>
+ true
+ | _ => false
+ },
+ config_fields,
+ ),
+ )
+ ) {
+ | _ => None
+ };
+
+ switch (maybe_schema_field) {
+ | Some((_, {pexp_desc: Pexp_constant(Pconst_string(schema_name, _)), _})) =>
+ Some(schema_name)
+ | _ => None
+ };
+};
+
+let extract_template_tag_from_config = config_fields => {
+ open Ast_408;
+ open Asttypes;
+ open Parsetree;
+
+ let maybe_template_tag_field =
+ try(
+ Some(
+ List.find(
+ config_field =>
+ switch (config_field) {
+ | (
+ {txt: Longident.Lident("templateTag"), _},
+ {pexp_desc: Pexp_ident({txt: _}), _},
+ ) =>
+ true
+ | _ => false
+ },
+ config_fields,
+ ),
+ )
+ ) {
+ | _ => None
+ };
+
+ switch (maybe_template_tag_field) {
+ | Some((_, {pexp_desc: Pexp_ident({txt: lident})})) =>
+ Some(
+ Longident.flatten(lident)
+ |> List.fold_left(
+ (acc, elem) =>
+ if (acc == "") {
+ elem;
+ } else {
+ acc ++ "." ++ elem;
+ },
+ "",
+ ),
+ )
+ | _ => None
+ };
+};
+
+let extract_bool_from_config = (name, config_fields) => {
+ open Ast_408;
+ open Asttypes;
+ open Parsetree;
+
+ let maybe_field_value =
+ try(
+ Some(
+ List.find(
+ config_field =>
+ switch (config_field) {
+ | (
+ {txt: Longident.Lident(matched_name), _},
+ {
+ pexp_desc:
+ Pexp_construct({txt: Longident.Lident(_value)}, _),
+ _,
+ },
+ )
+ when matched_name == name =>
+ true
+ | _ => false
+ },
+ config_fields,
+ ),
+ )
+ ) {
+ | _ => None
+ };
+
+ switch (maybe_field_value) {
+ | Some((
+ _,
+ {pexp_desc: Pexp_construct({txt: Longident.Lident(value)}, _), _},
+ )) =>
+ switch (value) {
+ | "true" => Some(true)
+ | "false" => Some(false)
+ | _ => None
+ }
+ | _ => None
+ };
+};
+
+let extract_string_from_config = (name, config_fields) => {
open Ast_408;
- open Ast_helper;
+ open Asttypes;
open Parsetree;
+
+ let maybe_string_field =
+ try(
+ Some(
+ List.find(
+ config_field =>
+ switch (config_field) {
+ | (
+ {txt: Longident.Lident(matched_name), _},
+ {pexp_desc: Pexp_constant(Pconst_string(_, _)), _},
+ )
+ when matched_name == name =>
+ true
+ | _ => false
+ },
+ config_fields,
+ ),
+ )
+ ) {
+ | _ => None
+ };
+
+ switch (maybe_string_field) {
+ | Some((_, {pexp_desc: Pexp_constant(Pconst_string(value, _)), _})) =>
+ Some(value)
+ | _ => None
+ };
+};
+
+let extract_template_tag_location_from_config =
+ extract_string_from_config("templateTagLocation");
+let extract_template_tag_import_from_config =
+ extract_string_from_config("templateTagImport");
+let extract_extend_from_config = extract_string_from_config("extend");
+
+let extract_records_from_config = extract_bool_from_config("records");
+let extract_objects_from_config = extract_bool_from_config("objects");
+let extract_inline_from_config = extract_bool_from_config("inline");
+let extract_future_added_value_from_config =
+ extract_bool_from_config("future_added_value");
+let extract_tagged_template_config =
+ extract_bool_from_config("taggedTemplate");
+
+type query_config = {
+ schema: option(string),
+ records: option(bool),
+ objects: option(bool),
+ inline: option(bool),
+ template_tag: option(string),
+ template_tag_location: option(string),
+ template_tag_import: option(string),
+ tagged_template: option(bool),
+ future_added_value: option(bool),
+ extend: option(string),
+};
+
+let get_query_config = fields => {
+ {
+ schema: extract_schema_from_config(fields),
+ records: extract_records_from_config(fields),
+ objects: extract_objects_from_config(fields),
+ inline: extract_inline_from_config(fields),
+ template_tag: extract_template_tag_from_config(fields),
+ template_tag_import: extract_template_tag_import_from_config(fields),
+ template_tag_location: extract_template_tag_location_from_config(fields),
+ tagged_template: extract_tagged_template_config(fields),
+ future_added_value: extract_future_added_value_from_config(fields),
+ extend: extract_extend_from_config(fields),
+ };
+};
+let empty_query_config = {
+ schema: None,
+ records: None,
+ objects: None,
+ inline: None,
+ tagged_template: None,
+ template_tag: None,
+ template_tag_location: None,
+ template_tag_import: None,
+ future_added_value: None,
+ extend: None,
+};
+
+let get_with_default = (value, default_value) => {
+ switch (value) {
+ | Some(value) => Some(value)
+ | None => default_value
+ };
+};
+
+let get_template_tag = query_config => {
+ switch (query_config.tagged_template) {
+ | Some(false) => (None, None, None)
+ | _ =>
+ switch (
+ get_with_default(query_config.template_tag, global_template_tag()),
+ get_with_default(
+ query_config.template_tag_location,
+ global_template_tag_location(),
+ ),
+ get_with_default(
+ query_config.template_tag_import,
+ global_template_tag_import(),
+ ),
+ ) {
+ | (Some(tag), Some(location), Some(import)) => (
+ Some(tag),
+ Some(location),
+ Some(import),
+ )
+ | (None, Some(location), Some(import)) => (
+ Some(import),
+ Some(location),
+ Some(import),
+ )
+ | (Some(tag), Some(location), None) => (
+ Some(tag),
+ Some(location),
+ Some("default"),
+ )
+ | (Some(tag), None, Some(_))
+ | (Some(tag), None, None) => (Some(tag), None, None)
+ | (None, _, _) => (None, None, None)
+ }
+ };
+};
+
+let rewrite_query =
+ (~query_config: query_config, ~loc, ~delim, ~query, ~module_name, ()) => {
+ open Ast_408;
+
let lexer = Graphql_lexer.make(query);
let delimLength =
switch (delim) {
@@ -90,87 +359,75 @@ let rewrite_query = (~schema=?, ~loc, ~delim, ~query, ()) => {
),
)
| Result.Ok(document) =>
+ let schema = Lazy.force(Read_schema.get_schema(query_config.schema));
+ let document =
+ (
+ if (Ppx_config.apollo_mode()) {
+ document |> Ast_transforms.add_typename_to_selection_set(schema);
+ } else {
+ document;
+ }
+ )
+ |> Ast_transforms.remove_typename_from_union(schema);
+ let template_tag = get_template_tag(query_config);
+
let config = {
Generator_utils.map_loc: add_loc(delimLength, loc),
delimiter: delim,
full_document: document,
+ records:
+ switch (query_config.records, query_config.objects) {
+ | (Some(value), _) => value
+ | (_, Some(true)) => false
+ | (_, Some(false)) => true
+ | (None, None) => global_records()
+ },
+ inline:
+ switch (query_config.inline) {
+ | Some(value) => value
+ | None => false
+ },
+ future_added_value:
+ switch (query_config.future_added_value) {
+ | Some(value) => value
+ | None => Ppx_config.future_added_value()
+ },
+ legacy: legacy(),
/* the only call site of schema, make it lazy! */
- schema: Lazy.force(Read_schema.get_schema(schema)),
+ schema,
+ template_tag,
+ extend: query_config.extend,
};
switch (Validations.run_validators(config, document)) {
- | Some(errs) =>
- Mod.mk(
- Pmod_structure(
- errs
- |> List.map(((loc, msg)) => {
- let loc = conv_loc(loc);
- %stri
- [%e make_error_expr(loc, msg)];
- }),
- ),
- )
- | None =>
+ | (Some(errs), _) =>
+ let errs =
+ errs
+ |> List.rev
+ |> List.map(((loc, msg)) => {
+ let loc = conv_loc(loc);
+ %stri
+ [%e make_error_expr(loc, msg)];
+ });
+ [errs];
+ | (None, warnings) =>
+ warnings
+ |> List.iter(((loc, message)) => {
+ let loc = conv_loc(loc);
+ Location.print_warning(
+ loc,
+ Location.formatter_for_warnings^,
+ Warnings.Preprocessor(message),
+ );
+ });
Result_decoder.unify_document_schema(config, document)
- |> Output_bucklescript_module.generate_modules(config)
+ |> Output_bucklescript_module.generate_modules(config, module_name);
};
};
};
};
-let extract_schema_from_config = config_fields => {
- open Ast_408;
- open Asttypes;
- open Parsetree;
-
- let maybe_schema_field =
- try(
- Some(
- List.find(
- config_field =>
- switch (config_field) {
- | (
- {txt: Longident.Lident("schema"), _},
- {pexp_desc: Pexp_constant(Pconst_string(_, _)), _},
- ) =>
- true
- | _ => false
- },
- config_fields,
- ),
- )
- ) {
- | _ => None
- };
-
- switch (maybe_schema_field) {
- | Some((_, {pexp_desc: Pexp_constant(Pconst_string(schema_name, _)), _})) =>
- Some(schema_name)
- | _ => None
- };
-};
-
// Default configuration
-let () =
- Ppx_config.(
- set_config({
- verbose_logging: false,
- output_mode: Ppx_config.String,
- verbose_error_handling:
- switch (Sys.getenv("NODE_ENV")) {
- | "production" => false
- | _ => true
- | exception Not_found => true
- },
- apollo_mode: false,
- schema_file: "graphql_schema.json",
- root_directory: Sys.getcwd(),
- raise_error_with_loc: (loc, message) => {
- let loc = conv_loc(loc);
- raise(Location.Error(Location.error(~loc, message)));
- },
- lean_parse: false,
- })
- );
+let () = Bucklescript_config.read_config();
let mapper = (_config, _cookies) => {
Ast_408.(
@@ -178,80 +435,167 @@ let mapper = (_config, _cookies) => {
Parsetree.(
Asttypes.{
...default_mapper,
- module_expr: (mapper, mexpr) =>
- switch (mexpr) {
- | {pmod_desc: Pmod_extension(({txt: "graphql", loc}, pstr)), _} =>
- switch (pstr) {
- | PStr([
- {
- pstr_desc:
- Pstr_eval(
- {
- pexp_loc: loc,
- pexp_desc:
- Pexp_constant(Pconst_string(query, delim)),
- _,
- },
- _,
- ),
- _,
- },
- {
- pstr_desc:
- Pstr_eval(
- {pexp_desc: Pexp_record(fields, None), _},
- _,
- ),
- _,
- },
- ]) =>
- rewrite_query(
- ~schema=?extract_schema_from_config(fields),
- ~loc=conv_loc_from_ast(loc),
- ~delim,
- ~query,
- (),
- )
- | PStr([
- {
- pstr_desc:
- Pstr_eval(
- {
- pexp_loc: loc,
- pexp_desc:
- Pexp_constant(Pconst_string(query, delim)),
- _,
- },
- _,
- ),
- _,
- },
- ]) =>
- rewrite_query(
- ~loc=conv_loc_from_ast(loc),
- ~delim,
- ~query,
- (),
- )
- | _ =>
- raise(
- Location.Error(
- Location.error(
- ~loc,
- "[%graphql] accepts a string, e.g. [%graphql {| { query |}]",
- ),
- ),
- )
- }
- | other => default_mapper.module_expr(mapper, other)
- },
+ structure: (mapper, struc) => {
+ struc
+ |> List.fold_left(
+ acc =>
+ fun
+ | {
+ pstr_desc:
+ Pstr_module({
+ pmb_name: {txt: _},
+ pmb_expr: {
+ pmod_desc:
+ Pmod_extension(({txt: "graphql", loc}, pstr)),
+ },
+ }),
+ } as item
+ | {
+ pstr_desc:
+ Pstr_eval(
+ {
+ pexp_desc:
+ Pexp_extension(({txt: "graphql", loc}, pstr)),
+ },
+ _,
+ ),
+ } as item
+ | {
+ pstr_desc:
+ Pstr_value(
+ _,
+ [
+ {
+ pvb_pat: {ppat_desc: _},
+ pvb_expr: {
+ pexp_desc:
+ Pexp_extension((
+ {txt: "graphql", loc},
+ pstr,
+ )),
+ },
+ },
+ ],
+ ),
+ } as item => {
+ let module_name =
+ switch (item) {
+ | {pstr_desc: Pstr_module({pmb_name: {txt: name}})} =>
+ Some(name)
+ | _ => None
+ };
+ Output_bucklescript_docstrings.for_module_information(
+ loc,
+ module_name,
+ );
+ switch (pstr) {
+ | PStr([
+ {
+ pstr_desc:
+ Pstr_eval(
+ {
+ pexp_loc: loc,
+ pexp_desc:
+ Pexp_constant(
+ Pconst_string(query, delim),
+ ),
+ _,
+ },
+ _,
+ ),
+ _,
+ },
+ {
+ pstr_desc:
+ Pstr_eval(
+ {pexp_desc: Pexp_record(fields, None), _},
+ _,
+ ),
+ _,
+ },
+ ]) =>
+ List.append(
+ rewrite_query(
+ ~query_config=get_query_config(fields),
+ ~loc=conv_loc_from_ast(loc),
+ ~delim,
+ ~query,
+ ~module_name,
+ (),
+ )
+ |> List.concat
+ |> List.rev,
+ acc,
+ )
+ | PStr([
+ {
+ pstr_desc:
+ Pstr_eval(
+ {
+ pexp_loc: loc,
+ pexp_desc:
+ Pexp_constant(
+ Pconst_string(query, delim),
+ ),
+ _,
+ },
+ _,
+ ),
+ _,
+ },
+ ]) =>
+ List.append(
+ rewrite_query(
+ ~query_config=empty_query_config,
+ ~loc=conv_loc_from_ast(loc),
+ ~delim,
+ ~query,
+ ~module_name,
+ (),
+ )
+ |> List.concat
+ |> List.rev,
+ acc,
+ )
+ | _ =>
+ raise(
+ Location.Error(
+ Location.error(
+ ~loc,
+ "[%graphql] accepts a string, e.g. [%graphql {| { query |}]",
+ ),
+ ),
+ )
+ };
+ }
+ | other => [
+ default_mapper.structure_item(mapper, other),
+ ...acc,
+ ],
+ [],
+ )
+ |> List.rev;
+ },
}
)
)
);
};
+let argKey = ref("");
let args = [
+ (
+ "-custom-field",
+ Arg.Tuple([
+ Arg.String(key => {argKey := key}),
+ Arg.String(
+ moduleKey => {
+ Hashtbl.add(Ppx_config.custom_fields(), argKey^, moduleKey)
+ },
+ ),
+ ]),
+ "Adds a global custom field decoder/serializer (format: -custom-field ScalarType Module)",
+ ),
(
"-verbose",
Arg.Unit(
@@ -268,7 +612,7 @@ let args = [
() =>
Ppx_config.update_config(current => {...current, apollo_mode: true}),
),
- "Defines if apply Apollo specific code generation",
+ "Automatically add __typename everywhere (necessary for apollo)",
),
(
"-schema",
@@ -291,6 +635,14 @@ let args = [
),
"Defines if output string or AST",
),
+ (
+ "-future-added-value",
+ Arg.Bool(
+ future_added_value =>
+ Ppx_config.update_config(current => {...current, future_added_value}),
+ ),
+ "Omits the `FutureAddedValue variant for enums if set to false",
+ ),
(
"-o",
Arg.Unit(
@@ -302,12 +654,140 @@ let args = [
"Verbose error handling. If not defined NODE_ENV will be used",
),
(
- "-lean-parse",
+ "-objects",
+ Arg.Unit(
+ () => Ppx_config.update_config(current => {...current, records: false}),
+ ),
+ "Compile to objects instead of records by default (legacy)",
+ ),
+ (
+ "-records",
+ Arg.Unit(
+ () => Ppx_config.update_config(current => {...current, records: true}),
+ ),
+ "Compile to records by default",
+ ),
+ (
+ "-legacy",
Arg.Unit(
() =>
- Ppx_config.update_config(current => {...current, lean_parse: true}),
+ Ppx_config.update_config(current =>
+ {...current, legacy: true, records: false}
+ ),
+ ),
+ "Legacy mode (make, makeWithVariables, and objects by default)",
+ ),
+ (
+ "-template-tag",
+ Arg.String(
+ template_tag =>
+ Ppx_config.update_config(current =>
+ {...current, template_tag: Some(template_tag)}
+ ),
+ ),
+ "Template tag to use",
+ ),
+ (
+ "-template-tag-import",
+ Arg.String(
+ template_tag_import =>
+ Ppx_config.update_config(current =>
+ {...current, template_tag_import: Some(template_tag_import)}
+ ),
+ ),
+ "the import to use for the template tag (default is \"default\"",
+ ),
+ (
+ "-template-tag-location",
+ Arg.String(
+ template_tag_location =>
+ Ppx_config.update_config(current =>
+ {...current, template_tag_location: Some(template_tag_location)}
+ ),
+ ),
+ "the import location for the template tag (default is \"default\"",
+ ),
+ (
+ "-extend-query",
+ Arg.String(
+ extend_query =>
+ Ppx_config.update_config(current =>
+ {...current, extend_query: Some(extend_query)}
+ ),
+ ),
+ "extend queries with the following functor",
+ ),
+ (
+ "-extend-query-no-required-variables",
+ Arg.String(
+ extend_query_no_required_variables =>
+ Ppx_config.update_config(current =>
+ {
+ ...current,
+ extend_query_no_required_variables:
+ Some(extend_query_no_required_variables),
+ }
+ ),
+ ),
+ "extend queries having no required variables with the following functor",
+ ),
+ (
+ "-extend-mutation",
+ Arg.String(
+ extend_mutation =>
+ Ppx_config.update_config(current =>
+ {...current, extend_mutation: Some(extend_mutation)}
+ ),
+ ),
+ "extend mutations with the following functor",
+ ),
+ (
+ "-extend-mutation-no-required-variables",
+ Arg.String(
+ extend_mutation_no_required_variables =>
+ Ppx_config.update_config(current =>
+ {
+ ...current,
+ extend_mutation_no_required_variables:
+ Some(extend_mutation_no_required_variables),
+ }
+ ),
+ ),
+ "extend mutations having no required variables with the following functor",
+ ),
+ (
+ "-extend-subscription",
+ Arg.String(
+ extend_subscription =>
+ Ppx_config.update_config(current =>
+ {...current, extend_subscription: Some(extend_subscription)}
+ ),
+ ),
+ "extend subscriptions with the following functor",
+ ),
+ (
+ "-extend-subscription-no-required-variables",
+ Arg.String(
+ extend_subscription_no_required_variables =>
+ Ppx_config.update_config(current =>
+ {
+ ...current,
+ extend_subscription_no_required_variables:
+ Some(extend_subscription_no_required_variables),
+ }
+ ),
+ ),
+ "extend subscriptions having no required variables with the following functor",
+ ),
+ (
+ "-extend-fragment",
+ Arg.String(
+ extend_fragment =>
+ Ppx_config.update_config(current =>
+ {...current, extend_fragment: Some(extend_fragment)}
+ ),
),
- "A leaner parse function (experimental)",
+ "extend fragments with the following functor",
),
];
diff --git a/src/bucklescript/output_bucklescript_decoder.re b/src/bucklescript/output_bucklescript_decoder.re
deleted file mode 100644
index 8a6c9984..00000000
--- a/src/bucklescript/output_bucklescript_decoder.re
+++ /dev/null
@@ -1,928 +0,0 @@
-open Migrate_parsetree;
-open Graphql_ppx_base;
-open Result_structure;
-open Schema;
-
-open Ast_408;
-open Asttypes;
-open Parsetree;
-
-open Generator_utils;
-open Output_bucklescript_utils;
-
-let const_str_expr = s => Ast_helper.(Exp.constant(Pconst_string(s, None)));
-
-let lean_parse = () => Ppx_config.lean_parse();
-
-let make_error_raiser = message =>
- if (Ppx_config.verbose_error_handling()) {
- %expr
- Js.Exn.raiseError("graphql_ppx: " ++ [%e message]);
- } else {
- %expr
- Js.Exn.raiseError("Unexpected GraphQL query response");
- };
-
-let string_decoder = loc =>
- [@metaloc loc]
- (
- switch%expr (Js.Json.decodeString(value)) {
- | None =>
- %e
- make_error_raiser(
- [%expr "Expected string, got " ++ Js.Json.stringify(value)],
- )
- | Some(value) => (value: string)
- }
- );
-let float_decoder = loc =>
- [@metaloc loc]
- (
- switch%expr (Js.Json.decodeNumber(value)) {
- | None =>
- %e
- make_error_raiser(
- [%expr "Expected float, got " ++ Js.Json.stringify(value)],
- )
- | Some(value) => value
- }
- );
-
-let int_decoder = loc =>
- [@metaloc loc]
- (
- switch%expr (Js.Json.decodeNumber(value)) {
- | None =>
- %e
- make_error_raiser(
- [%expr "Expected int, got " ++ Js.Json.stringify(value)],
- )
- | Some(value) => int_of_float(value)
- }
- );
-
-let boolean_decoder = loc =>
- [@metaloc loc]
- (
- switch%expr (Js.Json.decodeBoolean(value)) {
- | None =>
- %e
- make_error_raiser(
- [%expr "Expected boolean, got " ++ Js.Json.stringify(value)],
- )
- | Some(value) => value
- }
- );
-let id_decoder = string_decoder;
-
-let string_decoder_lean = loc =>
- [@metaloc loc] [%expr (Obj.magic(value): string)];
-let id_decoder_lean = string_decoder_lean;
-let float_decoder_lean = loc =>
- [@metaloc loc] [%expr (Obj.magic(value): float)];
-let int_decoder_lean = loc => [@metaloc loc] [%expr (Obj.magic(value): int)];
-let boolean_decoder_lean = loc =>
- [@metaloc loc] [%expr (Obj.magic(value): bool)];
-
-let generate_poly_enum_decoder = (loc, enum_meta) => {
- let enum_match_arms =
- Ast_helper.(
- enum_meta.em_values
- |> List.map(({evm_name, _}) =>
- Exp.case(
- Pat.constant(Pconst_string(evm_name, None)),
- Exp.variant(evm_name, None),
- )
- )
- );
- let fallback_arm =
- Ast_helper.(
- Exp.case(
- Pat.any(),
- make_error_raiser(
- [%expr
- "Unknown enum variant for "
- ++ [%e const_str_expr(enum_meta.em_name)]
- ++ ": "
- ++ value
- ],
- ),
- )
- );
- let match_expr =
- Ast_helper.(
- Exp.match(
- [%expr value],
- List.concat([enum_match_arms, [fallback_arm]]),
- )
- );
-
- let enum_ty =
- [@metaloc loc]
- Ast_helper.(
- Typ.variant(
- enum_meta.em_values
- |> List.map(({evm_name, _}) =>
- {
- prf_desc: Rtag({txt: evm_name, loc}, true, []),
- prf_loc: loc,
- prf_attributes: [],
- }
- ),
- Closed,
- None,
- )
- );
-
- switch%expr (Js.Json.decodeString(value)) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Expected enum value for "
- ++ [%e const_str_expr(enum_meta.em_name)]
- ++ ", got "
- ++ Js.Json.stringify(value)
- ],
- )
- | Some(value) => ([%e match_expr]: [%t enum_ty])
- };
-};
-
-let generate_poly_enum_decoder_lean = (loc, enum_meta) => {
- let enum_match_arms =
- Ast_helper.(
- enum_meta.em_values
- |> List.mapi((i, {evm_name, _}) =>
- if (i == List.length(enum_meta.em_values) - 1) {
- Exp.case(Pat.any(), Exp.variant(evm_name, None));
- } else {
- Exp.case(
- Pat.constant(Pconst_string(evm_name, None)),
- Exp.variant(evm_name, None),
- );
- }
- )
- );
-
- let result =
- Ast_helper.(
- Exp.constraint_(
- Exp.match([%expr (Obj.magic(value): string)], enum_match_arms),
- Typ.variant(
- enum_meta.em_values
- |> List.map(({evm_name, _}) =>
- {
- prf_desc: Rtag({txt: evm_name, loc}, true, []),
- prf_loc: loc,
- prf_attributes: [],
- }
- ),
- Closed,
- None,
- ),
- )
- );
-
- [@metaloc loc]
- let%expr value: string = Obj.magic(value);
- %e
- result;
-};
-
-let generate_solo_fragment_spread = (loc, name) => {
- let ident =
- Ast_helper.Exp.ident({loc, txt: Longident.parse(name ++ ".parse")});
- %expr
- [%e ident](value);
-};
-
-let generate_error = (loc, message) => {
- let ext = Ast_mapper.extension_of_error(Location.error(~loc, message));
- let%expr _value = value;
- %e
- Ast_helper.Exp.extension(~loc, ext);
-};
-
-let rec generate_decoder = config =>
- fun
- | Res_nullable(loc, inner) =>
- lean_parse()
- ? generate_nullable_decoder_lean(config, conv_loc(loc), inner)
- : generate_nullable_decoder(config, conv_loc(loc), inner)
- | Res_array(loc, inner) =>
- lean_parse()
- ? generate_array_decoder_lean(config, conv_loc(loc), inner)
- : generate_array_decoder(config, conv_loc(loc), inner)
- | Res_id(loc) =>
- lean_parse()
- ? id_decoder_lean(conv_loc(loc)) : id_decoder(conv_loc(loc))
- | Res_string(loc) =>
- lean_parse()
- ? string_decoder_lean(conv_loc(loc)) : string_decoder(conv_loc(loc))
- | Res_int(loc) =>
- lean_parse()
- ? int_decoder_lean(conv_loc(loc)) : int_decoder(conv_loc(loc))
- | Res_float(loc) =>
- lean_parse()
- ? float_decoder_lean(conv_loc(loc)) : float_decoder(conv_loc(loc))
- | Res_boolean(loc) =>
- lean_parse()
- ? boolean_decoder_lean(conv_loc(loc))
- : boolean_decoder(conv_loc(loc))
- | Res_raw_scalar(_) => [%expr value]
- | Res_poly_enum(loc, enum_meta) =>
- lean_parse()
- ? generate_poly_enum_decoder_lean(conv_loc(loc), enum_meta)
- : generate_poly_enum_decoder(conv_loc(loc), enum_meta)
- | Res_custom_decoder(loc, ident, inner) =>
- generate_custom_decoder(config, conv_loc(loc), ident, inner)
- | Res_record(loc, name, fields) =>
- generate_record_decoder(config, conv_loc(loc), name, fields)
- | Res_object(loc, name, fields) =>
- generate_object_decoder(config, conv_loc(loc), name, fields)
- | Res_poly_variant_selection_set(loc, name, fields) =>
- generate_poly_variant_selection_set(config, conv_loc(loc), name, fields)
- | Res_poly_variant_union(loc, name, fragments, exhaustive) =>
- generate_poly_variant_union(
- config,
- conv_loc(loc),
- name,
- fragments,
- exhaustive,
- )
- | Res_poly_variant_interface(loc, name, base, fragments) =>
- generate_poly_variant_interface(
- config,
- conv_loc(loc),
- name,
- base,
- fragments,
- )
- | Res_solo_fragment_spread(loc, name) =>
- generate_solo_fragment_spread(conv_loc(loc), name)
- | Res_error(loc, message) => generate_error(conv_loc(loc), message)
-and generate_nullable_decoder_lean = (config, loc, inner) =>
- [@metaloc loc]
- (
- switch%expr (Js.toOption(Obj.magic(value): Js.Nullable.t('a))) {
- | Some(_) => Some([%e generate_decoder(config, inner)])
- | None => None
- }
- )
-and generate_nullable_decoder = (config, loc, inner) =>
- [@metaloc loc]
- (
- switch%expr (Js.Json.decodeNull(value)) {
- | None => Some([%e generate_decoder(config, inner)])
- | Some(_) => None
- }
- )
-and generate_array_decoder = (config, loc, inner) =>
- [@metaloc loc]
- [%expr
- value
- |> Js.Json.decodeArray
- |> Js.Option.getExn
- |> Js.Array.map(value => {
- %e
- generate_decoder(config, inner)
- })
- ]
-and generate_array_decoder_lean = (config, loc, inner) =>
- [@metaloc loc]
- [%expr
- Obj.magic(value)
- |> Js.Array.map(value => {
- %e
- generate_decoder(config, inner)
- })
- ]
-and generate_custom_decoder = (config, loc, ident, inner) => {
- let fn_expr =
- Ast_helper.(
- Exp.ident({loc: Location.none, txt: Longident.parse(ident)})
- );
- [@metaloc loc] [%expr [%e fn_expr]([%e generate_decoder(config, inner)])];
-}
-and generate_record_decoder = (config, loc, name, fields) => {
- /*
- Given a selection set, this function first generates the resolvers,
- binding the results to individual local variables. It then generates
- a record containing each field bound to the corresponding variable.
-
- While this might seem a bit convoluted, it lets us wrap the record in
- a [%bs.obj ] extension to generate a JavaScript object without having
- to worry about the record-in-javascript-object problem that BuckleScript has.
-
- As an example, a selection set like "{ f1 f2 f3 }" will result in
- let (field_f1, field_f2, field_f3) = (
- match Js.Dict.get value "f1" with ... end
- match Js.Dict.get value "f2" with ... end
- match Js.Dict.get value "f3" with ... end
- ) in { f1 = field_f1; f2 = field_f2; f3 = field_f3 }
- */
-
- let field_name_tuple_pattern =
- Ast_helper.(
- fields
- |> filter_map(
- fun
- | Fr_named_field(field, _, _) =>
- Some(Pat.var({loc, txt: "field_" ++ field}))
- | Fr_fragment_spread(_) => None,
- )
- |> (
- fun
- | [field_pattern] => field_pattern
- | field_patterns => Pat.tuple(field_patterns)
- )
- );
-
- let field_decoder_tuple =
- Ast_helper.(
- fields
- |> filter_map(
- fun
- | Fr_named_field(field, loc, inner) => {
- let loc = conv_loc(loc);
- [@metaloc loc]
- Some(
- switch%expr (Js.Dict.get(value, [%e const_str_expr(field)])) {
- | Some(value) =>
- %e
- generate_decoder(config, inner)
- | None =>
- if%e (can_be_absent_as_field(inner)) {
- %expr
- None;
- } else {
- make_error_raiser(
- [%expr
- "Field "
- ++ [%e const_str_expr(field)]
- ++ " on type "
- ++ [%e const_str_expr(name)]
- ++ " is missing"
- ],
- );
- }
- },
- );
- }
- | Fr_fragment_spread(_) => None,
- )
- |> (
- fun
- | [field_decoder] => field_decoder
- | field_decoders => Exp.tuple(field_decoders)
- )
- );
-
- let record_fields =
- Ast_helper.(
- fields
- |> List.map(
- fun
- | Fr_named_field(field, loc, _) => {
- let loc = conv_loc(loc);
- (
- {Location.loc, txt: Longident.Lident(field)},
- Exp.ident(
- ~loc,
- {loc, txt: Longident.Lident("field_" ++ field)},
- ),
- );
- }
- | Fr_fragment_spread(field, loc, name) => {
- let loc = conv_loc(loc);
- (
- {Location.loc, txt: Longident.Lident(field)},
- [@metaloc loc]
- {
- let%expr value = Js.Json.object_(value);
- %e
- generate_solo_fragment_spread(loc, name);
- },
- );
- },
- )
- );
- let record = Ast_helper.Exp.record(~loc, record_fields, None);
-
- switch%expr (Js.Json.decodeObject(value)) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Expected object of type "
- ++ [%e const_str_expr(name)]
- ++ ", got "
- ++ Js.Json.stringify(value)
- ],
- )
- | Some(value) =>
- let [%p field_name_tuple_pattern] = [%e field_decoder_tuple];
- %e
- record;
- };
-}
-and generate_object_decoder = (config, loc, name, fields) => {
- let ctor_result_type =
- fields
- |> List.mapi(
- (i, Fr_named_field(key, _, _) | Fr_fragment_spread(key, _, _)) =>
- {
- pof_desc:
- Otag(
- {txt: key, loc},
- Ast_helper.Typ.var("a" ++ string_of_int(i)),
- ),
- pof_loc: loc,
- pof_attributes: [],
- }
- );
-
- let rec do_obj_constructor = () => {
- Ast_helper.Exp.letmodule(
- {txt: "GQL", loc: Location.none},
- Ast_helper.Mod.structure([
- Ast_helper.Str.primitive({
- pval_name: {
- txt: "make_obj",
- loc: Location.none,
- },
- pval_type: make_obj_constructor_fn(0, fields),
- pval_prim: [""],
- pval_attributes: [
- {
- attr_name: {
- txt: "bs.obj",
- loc: Location.none,
- },
- attr_payload: PStr([]),
- attr_loc: loc,
- },
- ],
- pval_loc: Location.none,
- }),
- ]),
- Ast_helper.Exp.apply(
- Ast_helper.Exp.ident({
- txt: Longident.parse("GQL.make_obj"),
- loc: Location.none,
- }),
- List.append(
- fields
- |> List.map(
- fun
- | Fr_named_field(key, _, inner) => (
- Labelled(key),
- switch%expr (Js.Dict.get(value, [%e const_str_expr(key)])) {
- | Some(value) =>
- %e
- generate_decoder(config, inner)
- | None =>
- if%e (can_be_absent_as_field(inner)) {
- %expr
- None;
- } else {
- make_error_raiser(
- [%expr
- "Field "
- ++ [%e const_str_expr(key)]
- ++ " on type "
- ++ [%e const_str_expr(name)]
- ++ " is missing"
- ],
- );
- }
- },
- )
- | Fr_fragment_spread(key, loc, name) => {
- let loc = conv_loc(loc);
- (
- Labelled(key),
- {
- let%expr value = Js.Json.object_(value);
- %e
- generate_solo_fragment_spread(loc, name);
- },
- );
- },
- ),
- [
- (
- Nolabel,
- Ast_helper.Exp.construct(
- {txt: Longident.Lident("()"), loc: Location.none},
- None,
- ),
- ),
- ],
- ),
- ),
- );
- }
- and do_obj_constructor_lean = () => {
- Ast_helper.Exp.letmodule(
- {txt: "GQL", loc: Location.none},
- Ast_helper.Mod.structure([
- Ast_helper.Str.primitive({
- pval_name: {
- txt: "make_obj",
- loc: Location.none,
- },
- pval_type: make_obj_constructor_fn(0, fields),
- pval_prim: [""],
- pval_attributes: [
- {
- attr_name: {
- txt: "bs.obj",
- loc: Location.none,
- },
- attr_payload: PStr([]),
- attr_loc: loc,
- },
- ],
- pval_loc: Location.none,
- }),
- ]),
- Ast_helper.Exp.apply(
- Ast_helper.Exp.ident({
- txt: Longident.parse("GQL.make_obj"),
- loc: Location.none,
- }),
- List.append(
- fields
- |> List.map(
- fun
- | Fr_named_field(key, _, inner) => (
- Labelled(key),
- {
- let%expr value: 'a =
- Obj.magic(
- Js.Dict.unsafeGet(value, [%e const_str_expr(key)]): 'a,
- );
-
- %e
- generate_decoder(config, inner);
- },
- )
- | Fr_fragment_spread(key, loc, name) => {
- let loc = conv_loc(loc);
- (
- Labelled(key),
- {
- let%expr value = Js.Json.object_(value);
- %e
- generate_solo_fragment_spread(loc, name);
- },
- );
- },
- ),
- [
- (
- Nolabel,
- Ast_helper.Exp.construct(
- {txt: Longident.Lident("()"), loc: Location.none},
- None,
- ),
- ),
- ],
- ),
- ),
- );
- }
-
- and obj_constructor = () => {
- [@metaloc loc]
- let%expr value = value |> Js.Json.decodeObject |> Js.Option.getExn;
- %e
- do_obj_constructor();
- }
- and obj_constructor_lean = () => {
- [@metaloc loc]
- let%expr value: Js.Dict.t(Js.Json.t) = Obj.magic(value: Js.Json.t);
- %e
- do_obj_constructor_lean();
- }
- and make_obj_constructor_fn = i =>
- fun
- | [] =>
- Ast_helper.Typ.arrow(
- Nolabel,
- Ast_helper.Typ.constr(
- {txt: Longident.Lident("unit"), loc: Location.none},
- [],
- ),
- Ast_helper.Typ.constr(
- {txt: Longident.parse("Js.t"), loc: Location.none},
- [Ast_helper.Typ.object_(ctor_result_type, Closed)],
- ),
- )
- | [Fr_fragment_spread(key, _, _), ...next]
- | [Fr_named_field(key, _, _), ...next] =>
- Ast_helper.Typ.arrow(
- Labelled(key),
- Ast_helper.Typ.var("a" ++ string_of_int(i)),
- make_obj_constructor_fn(i + 1, next),
- );
- lean_parse() ? obj_constructor_lean() : obj_constructor();
-}
-and generate_poly_variant_selection_set = (config, loc, name, fields) => {
- let rec generator_loop =
- fun
- | [(field, inner), ...next] => {
- let variant_decoder =
- Ast_helper.(
- Exp.variant(
- Compat.capitalize_ascii(field),
- Some(generate_decoder(config, inner)),
- )
- );
- switch%expr (Js.Dict.get(value, [%e const_str_expr(field)])) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Field "
- ++ [%e const_str_expr(field)]
- ++ " on type "
- ++ [%e const_str_expr(name)]
- ++ " is missing"
- ],
- )
- | Some(temp) =>
- switch (Js.Json.decodeNull(temp)) {
- | None =>
- let value = temp;
- %e
- variant_decoder;
- | Some(_) =>
- %e
- generator_loop(next)
- }
- };
- }
- | [] =>
- make_error_raiser(
- [%expr
- "All fields on variant selection set on type "
- ++ [%e const_str_expr(name)]
- ++ " were null"
- ],
- );
- let variant_type =
- Ast_helper.(
- Typ.variant(
- fields
- |> List.map(((name, _)) =>
- {
- prf_desc:
- Rtag(
- {txt: Compat.capitalize_ascii(name), loc},
- false,
- [
- {
- ptyp_desc: Ptyp_any,
- ptyp_attributes: [],
- ptyp_loc_stack: [],
- ptyp_loc: Location.none,
- },
- ],
- ),
-
- prf_loc: loc,
- prf_attributes: [],
- }
- ),
- Closed,
- None,
- )
- );
- [@metaloc loc]
- (
- switch%expr (Js.Json.decodeObject(value)) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Expected type " ++ [%e const_str_expr(name)] ++ " to be an object"
- ],
- )
- | Some(value) => ([%e generator_loop(fields)]: [%t variant_type])
- }
- );
-}
-and generate_poly_variant_interface = (config, loc, name, base, fragments) => {
- let map_fallback_case = ((type_name, inner)) => {
- open Ast_helper;
- let name_pattern = Pat.any();
-
- Exp.variant(type_name, Some(generate_decoder(config, inner)))
- |> Exp.case(name_pattern);
- };
-
- let map_case = ((type_name, inner)) => {
- open Ast_helper;
- let name_pattern = Pat.constant(Pconst_string(type_name, None));
-
- Exp.variant(type_name, Some(generate_decoder(config, inner)))
- |> Exp.case(name_pattern);
- };
- let map_case_ty = ((name, _)) => {
- prf_desc:
- Rtag(
- {txt: name, loc},
- false,
- [
- {
- ptyp_desc: Ptyp_any,
- ptyp_attributes: [],
- ptyp_loc_stack: [],
- ptyp_loc: Location.none,
- },
- ],
- ),
- prf_loc: loc,
- prf_attributes: [],
- };
-
- let fragment_cases = List.map(map_case, fragments);
- let fallback_case = map_fallback_case(base);
- let fallback_case_ty = map_case_ty(base);
-
- let fragment_case_tys = List.map(map_case_ty, fragments);
- let interface_ty =
- Ast_helper.(
- Typ.variant([fallback_case_ty, ...fragment_case_tys], Closed, None)
- );
- let typename_matcher =
- Ast_helper.(
- Exp.match(
- [%expr typename],
- List.concat([fragment_cases, [fallback_case]]),
- )
- );
- [@metaloc loc]
- (
- switch%expr (Js.Json.decodeObject(value)) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Expected Interface implementation "
- ++ [%e const_str_expr(name)]
- ++ " to be an object, got "
- ++ Js.Json.stringify(value)
- ],
- )
- | Some(typename_obj) =>
- switch (Js.Dict.get(typename_obj, "__typename")) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Interface implementation"
- ++ [%e const_str_expr(name)]
- ++ " is missing the __typename field"
- ],
- )
- | Some(typename) =>
- switch (Js.Json.decodeString(typename)) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Interface implementation "
- ++ [%e const_str_expr(name)]
- ++ " has a __typename field that is not a string"
- ],
- )
- | Some(typename) => ([%e typename_matcher]: [%t interface_ty])
- }
- }
- }
- );
-}
-and generate_poly_variant_union =
- (config, loc, name, fragments, exhaustive_flag) => {
- let fragment_cases =
- Ast_helper.(
- fragments
- |> List.map(((type_name, inner)) => {
- let name_pattern = Pat.constant(Pconst_string(type_name, None));
- Ast_helper.(
- Exp.variant(type_name, Some(generate_decoder(config, inner)))
- )
- |> Exp.case(name_pattern);
- })
- );
- let (fallback_case, fallback_case_ty) =
- Ast_helper.(
- switch (exhaustive_flag) {
- | Result_structure.Exhaustive => (
- Exp.case(
- Pat.var({loc: Location.none, txt: "typename"}),
- make_error_raiser(
- [%expr
- "Union "
- ++ [%e const_str_expr(name)]
- ++ " returned unknown type "
- ++ typename
- ],
- ),
- ),
- [],
- )
- | Nonexhaustive => (
- Exp.case(Pat.any(), [%expr `Nonexhaustive]),
- [
- {
- prf_desc: Rtag({txt: "Nonexhaustive", loc}, true, []),
- prf_loc: loc,
- prf_attributes: [],
- },
- ],
- )
- }
- );
- let fragment_case_tys =
- fragments
- |> List.map(((name, _)) =>
- {
- prf_desc:
- Rtag(
- {txt: name, loc},
- false,
- [
- {
- ptyp_desc: Ptyp_any,
- ptyp_attributes: [],
- ptyp_loc: Location.none,
- ptyp_loc_stack: [],
- },
- ],
- ),
- prf_loc: loc,
- prf_attributes: [],
- }
- );
-
- let union_ty =
- Ast_helper.(
- Typ.variant(
- List.concat([fallback_case_ty, fragment_case_tys]),
- Closed,
- None,
- )
- );
- let typename_matcher =
- Ast_helper.(
- Exp.match(
- [%expr typename],
- List.concat([fragment_cases, [fallback_case]]),
- )
- );
- [@metaloc loc]
- (
- switch%expr (Js.Json.decodeObject(value)) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Expected union "
- ++ [%e const_str_expr(name)]
- ++ " to be an object, got "
- ++ Js.Json.stringify(value)
- ],
- )
- | Some(typename_obj) =>
- switch (Js.Dict.get(typename_obj, "__typename")) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Union "
- ++ [%e const_str_expr(name)]
- ++ " is missing the __typename field"
- ],
- )
- | Some(typename) =>
- switch (Js.Json.decodeString(typename)) {
- | None =>
- %e
- make_error_raiser(
- [%expr
- "Union "
- ++ [%e const_str_expr(name)]
- ++ " has a __typename field that is not a string"
- ],
- )
- | Some(typename) => ([%e typename_matcher]: [%t union_ty])
- }
- }
- }
- );
-};
diff --git a/src/bucklescript/output_bucklescript_docstrings.re b/src/bucklescript/output_bucklescript_docstrings.re
new file mode 100644
index 00000000..45ac667e
--- /dev/null
+++ b/src/bucklescript/output_bucklescript_docstrings.re
@@ -0,0 +1,360 @@
+open Graphql_ppx_base;
+open Output_bucklescript_utils;
+open Graphql_ast;
+
+open Migrate_parsetree;
+open Ast_408;
+open Ast_helper;
+
+let query_docstring = {|The GraphQL query string|};
+let parse_docstring = {|Parse the JSON GraphQL data to ReasonML data types|};
+
+let serialize_docstring = {|Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data |};
+
+let str_items: ref(list(Parsetree.structure_item)) = ref([]);
+let str_module_information: ref(list(Parsetree.structure_item)) = ref([]);
+
+let reset = () => {
+ str_items := [];
+};
+
+let make_let = (value, expr, docstring) => {
+ Ast_helper.Str.value(
+ Nonrecursive,
+ [
+ Vb.mk(
+ ~attrs=[
+ Docstrings.docs_attr(
+ Docstrings.docstring(docstring, Location.none),
+ ),
+ ],
+ Ast_helper.Pat.var(Location.mkloc(value, Location.none)),
+ expr,
+ ),
+ ],
+ );
+};
+
+let generate_text_struct = (name, loc, text) => [
+ Str.type_(Nonrecursive, [Type.mk(Location.mknoloc(name))]),
+ Str.value(
+ Nonrecursive,
+ [
+ Vb.mk(
+ ~attrs=[
+ Docstrings.docs_attr(Docstrings.docstring(text, conv_loc(loc))),
+ ],
+ Ast_helper.Pat.var(Location.mkloc(name, conv_loc(loc))),
+ Exp.constraint_(
+ Exp.apply(
+ Exp.ident(Location.mknoloc(Longident.parse("Obj.magic"))),
+ [(Nolabel, Exp.constant(Pconst_integer("0", None)))],
+ ),
+ Typ.constr(Location.mknoloc(Longident.parse(name)), []),
+ ),
+ ),
+ ],
+ ),
+];
+
+let for_field_arguments =
+ (
+ config: Generator_utils.output_config,
+ field_meta: option(Schema.field_meta),
+ arguments: Graphql_ast.arguments,
+ ) => {
+ switch (field_meta) {
+ | None => ()
+ | Some({fm_arguments, fm_name}) =>
+ str_items :=
+ List.concat([
+ str_items^,
+ ...arguments
+ |> List.map(((name, type_): Graphql_ast.argument) => {
+ List.concat([
+ switch (type_.item) {
+ | Iv_variable(var_name) =>
+ config.full_document
+ |> List.fold_left(
+ (p, def) => {
+ switch (def) {
+ | Fragment(_)
+ | Operation({
+ item: {o_variable_definitions: None},
+ })
+ | Operation({
+ item: {
+ o_variable_definitions: Some({item: []}),
+ },
+ }) => p
+ | Operation({
+ item: {
+ o_variable_definitions:
+ Some({item: variable_definitions}),
+ },
+ }) =>
+ switch (
+ variable_definitions
+ |> List.find_opt(
+ (
+ (
+ s_var_name:
+ Source_pos.spanning(string),
+ _,
+ ),
+ ) => {
+ s_var_name.item == var_name
+ })
+ ) {
+ | None => p
+ | Some((
+ _s_var_name,
+ {vd_type: {item: s_type}},
+ )) =>
+ let loc = config.map_loc(type_.span);
+ let safe_name =
+ "_graphql_"
+ ++ var_name
+ ++ "_"
+ ++ (loc.loc_start.pos_cnum |> string_of_int);
+ List.append(
+ p,
+ generate_text_struct(
+ safe_name,
+ loc,
+ "Variable **$"
+ ++ var_name
+ ++ "** has the following graphql type:\n\n```\n"
+ ++ Schema_printer.print_type_from_ref(
+ s_type |> Type_utils.to_schema_type_ref,
+ config.schema,
+ )
+ ++ "\n```",
+ ),
+ );
+ }
+ }
+ },
+ [],
+ )
+ | _ => []
+ },
+ switch (
+ fm_arguments
+ |> List.find_opt(({am_name}: Schema.argument_meta) => {
+ am_name == name.item
+ })
+ ) {
+ | None => []
+ | Some({am_arg_type}) =>
+ let name_loc = config.map_loc(name.span);
+ let safe_name =
+ "_graphql_"
+ ++ name.item
+ ++ "_"
+ ++ (name_loc.loc_start.pos_cnum |> string_of_int);
+ generate_text_struct(
+ safe_name,
+ name_loc,
+ "Argument **"
+ ++ name.item
+ ++ "** on field **"
+ ++ fm_name
+ ++ "** has the following graphql type:\n\n```\n"
+ ++ Schema_printer.print_type_from_ref(
+ am_arg_type,
+ config.schema,
+ )
+ ++ "\n```",
+ );
+ },
+ ])
+ }),
+ ])
+ };
+};
+
+let for_root_identifier = (_config: Generator_utils.output_config, loc) => {
+ str_items :=
+ List.append(
+ str_items^,
+ [
+ Ast_helper.Str.type_(
+ Recursive,
+ [
+ Type.mk(
+ ~manifest=
+ Typ.constr(Location.mkloc(Longident.parse("t"), loc), []),
+ Location.mknoloc("root"),
+ ),
+ ],
+ ),
+ ],
+ );
+};
+
+let for_operation =
+ (
+ config: Generator_utils.output_config,
+ operation: Source_pos.spanning(Graphql_ast.operation),
+ ) => {
+ for_root_identifier(
+ config,
+ Output_bucklescript_utils.extend_loc_from_start(
+ conv_loc(config.map_loc(operation.span)),
+ switch (operation.item.o_type) {
+ | Query => 5
+ | Mutation => 8
+ | Subscription => 12
+ },
+ ),
+ );
+};
+
+let for_fragment_root =
+ (
+ config: Generator_utils.output_config,
+ fragment: Source_pos.spanning(Graphql_ast.fragment),
+ ) => {
+ for_root_identifier(
+ config,
+ Output_bucklescript_utils.extend_loc_from_start(
+ conv_loc(config.map_loc(fragment.span)),
+ 8,
+ ),
+ );
+};
+
+let for_input_constraint =
+ (
+ config: Generator_utils.output_config,
+ Extract_type_definitions.InputField(field),
+ ) => {
+ switch (
+ field.loc_type,
+ Extract_type_definitions.get_inner_type(field.type_)
+ |> Option.flat_map(innerType => {
+ switch (innerType) {
+ | Extract_type_definitions.Type(Object(_) as ty)
+ | Extract_type_definitions.Type(Enum(_) as ty)
+ | Extract_type_definitions.Type(Interface(_) as ty)
+ | Extract_type_definitions.Type(Union(_) as ty)
+ | Extract_type_definitions.Type(InputObject(_) as ty) =>
+ let type_name = ty |> Schema.extract_name_from_type_meta;
+ config.schema
+ |> Schema_printer.print_type(type_name)
+ |> Option.map(printed_type => (type_name, printed_type));
+ | _ => None
+ }
+ }),
+ ) {
+ | (Some(loc_type), Some((type_name, printed_type))) =>
+ let safe_name =
+ "_graphql_"
+ ++ type_name
+ ++ "_"
+ ++ (loc_type.loc_start.pos_cnum |> string_of_int);
+ str_items :=
+ List.append(
+ str_items^,
+ generate_text_struct(
+ safe_name,
+ loc_type,
+ "```\n" ++ printed_type ++ "\n```",
+ ),
+ );
+ | (None, _)
+ | (_, None) => ()
+ };
+};
+
+let for_fragment =
+ (
+ config: Generator_utils.output_config,
+ fragment: Source_pos.spanning(Graphql_ast.fragment),
+ ) => {
+ switch (
+ config.schema
+ |> Schema_printer.print_type(fragment.item.fg_type_condition.item)
+ ) {
+ | None => ()
+ | Some(printed_type) =>
+ let loc = config.map_loc(fragment.item.fg_type_condition.span);
+
+ str_items :=
+ List.append(
+ str_items^,
+ generate_text_struct(
+ "graphql",
+ loc,
+ "```\n" ++ printed_type ++ "\n```",
+ ),
+ );
+ };
+};
+
+let for_module_information = (loc: Location.t, module_name: option(string)) => {
+ let module_name = module_name |> Option.get_or_else("GraphQL");
+ str_module_information :=
+ generate_text_struct(
+ "graphql_module",
+ loc |> conv_loc_from_ast,
+ Printf.sprintf(
+ {|**--- 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 %s {
+ /**
+ %s
+ */
+ 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;
+
+ /**
+ %s
+ */
+ let parse: Raw.t => t;
+
+ /**
+ %s
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```|},
+ module_name,
+ query_docstring,
+ parse_docstring,
+ serialize_docstring,
+ ),
+ );
+};
+
+let get_module = () => {
+ switch (str_items^) {
+ | [] => []
+ | items => [
+ Str.module_(
+ Mb.mk(
+ Location.mknoloc("Z__INTERNAL"),
+ Mod.mk(
+ Pmod_structure(List.append(items, str_module_information^)),
+ ),
+ ),
+ ),
+ ]
+ };
+};
diff --git a/src/bucklescript/output_bucklescript_encoder.re b/src/bucklescript/output_bucklescript_encoder.re
deleted file mode 100644
index 1990b163..00000000
--- a/src/bucklescript/output_bucklescript_encoder.re
+++ /dev/null
@@ -1,200 +0,0 @@
-open Migrate_parsetree;
-open Graphql_ppx_base;
-open Graphql_ast;
-open Source_pos;
-open Schema;
-
-open Ast_408;
-open Asttypes;
-
-open Type_utils;
-open Generator_utils;
-open Output_bucklescript_utils;
-
-let mangle_enum_name = Generator_utils.uncapitalize_ascii;
-
-let ident_from_string = (loc, func_name) =>
- Ast_helper.(Exp.ident(~loc, {txt: Longident.parse(func_name), loc}));
-
-module StringSet = Set.Make(String);
-
-let sort_variable_types = (schema, variables) => {
- let recursive_flag = ref(false);
- let ordered_nodes = Queue.create();
- let has_added_to_queue = name =>
- Queue.fold((acc, (_, v)) => acc || name == v, false, ordered_nodes);
- let rec loop = visit_stack =>
- fun
- | [] => ()
- | [(span, type_ref), ...tail] => {
- let type_name = innermost_name(type_ref);
- let () =
- switch (lookup_type(schema, type_name)) {
- | None => ()
- | Some(_) when StringSet.mem(type_name, visit_stack) =>
- recursive_flag := true
- | Some(_) when has_added_to_queue(type_name) => ()
- | Some(Enum(_)) => Queue.push((span, type_name), ordered_nodes)
- | Some(InputObject(io)) =>
- let () =
- loop(
- StringSet.add(type_name, visit_stack),
- io.iom_input_fields
- |> List.map(({am_arg_type, _}) => (span, am_arg_type)),
- );
- Queue.push((span, type_name), ordered_nodes);
- | Some(_) => ()
- };
- loop(visit_stack, tail);
- };
-
- let () = loop(StringSet.empty, variables);
- let ordered_nodes =
- Array.init(
- Queue.length(ordered_nodes),
- _ => {
- let (span, name) = Queue.take(ordered_nodes);
- (span, name |> lookup_type(schema) |> Option.unsafe_unwrap);
- },
- );
- (recursive_flag^, ordered_nodes);
-};
-
-let function_name_string = x =>
- "json_of_" ++ Schema.extract_name_from_type_meta(x);
-
-let rec parser_for_type = (schema, loc, type_ref) => {
- let raise_inconsistent_schema = type_name =>
- raise_error_with_loc(
- loc,
- "Inconsistent schema, type named " ++ type_name ++ " cannot be found",
- );
- switch (type_ref) {
- | Ntr_list(x) =>
- let child_parser = parser_for_type(schema, loc, x);
- [@metaloc conv_loc(loc)]
- [%expr (v => Js.Json.array(Js.Array.map([%e child_parser], v)))];
- | Ntr_nullable(x) =>
- let child_parser = parser_for_type(schema, loc, x);
- [@metaloc conv_loc(loc)]
- [%expr
- (
- v =>
- switch (v) {
- | None => Js.Json.null
- | Some(v) => [%e child_parser](v)
- }
- )
- ];
- | Ntr_named(type_name) =>
- switch (lookup_type(schema, type_name)) {
- | None => raise_inconsistent_schema(type_name)
- | Some(Scalar({sm_name: "String", _}))
- | Some(Scalar({sm_name: "ID", _})) =>
- %expr
- Js.Json.string
- | Some(Scalar({sm_name: "Int", _})) =>
- %expr
- (v => Js.Json.number(float_of_int(v)))
- | Some(Scalar({sm_name: "Float", _})) =>
- %expr
- Js.Json.number
- | Some(Scalar({sm_name: "Boolean", _})) =>
- %expr
- Js.Json.boolean
- | Some(Scalar(_)) =>
- %expr
- (v => v)
- | Some(ty) =>
- function_name_string(ty) |> ident_from_string(conv_loc(loc))
- }
- };
-};
-
-let filter_out_null_values = [%expr
- Js.Array.filter(((_, value)) => !Js.Json.test(value, Js.Json.Null))
-];
-
-let json_of_fields = (schema, loc, expr, fields) => {
- let field_array_exprs =
- fields
- |> List.map(({am_name, am_arg_type, _}) => {
- let type_ref = to_native_type_ref(am_arg_type);
- let parser = parser_for_type(schema, loc, type_ref);
- [@metaloc conv_loc(loc)]
- [%expr
- (
- [%e
- Ast_helper.Exp.constant(
- Parsetree.Pconst_string(am_name, None),
- )
- ],
- [%e parser](
- [%e expr]##[%e ident_from_string(conv_loc(loc), am_name)],
- ),
- )
- ];
- });
- let field_array = Ast_helper.Exp.array(field_array_exprs);
- [@metaloc conv_loc(loc)]
- [%expr
- Js.Json.object_(
- [%e field_array] |> [%e filter_out_null_values] |> Js.Dict.fromArray,
- )
- ];
-};
-let generate_encoder = (config, (spanning, x)) => {
- let loc = config.map_loc(spanning.span);
- let body =
- switch (x) {
- | Scalar(_) =>
- raise_error_with_loc(
- loc,
- "Can not build variable encoder for scalar type",
- )
- | Object(_) =>
- raise @@ Invalid_argument("Unsupported variable type: Object")
- | Interface(_) =>
- raise @@ Invalid_argument("Unsupported variable type: Interface")
- | Union(_) =>
- raise @@ Invalid_argument("Unsupported variable type: Union")
- | Enum({em_values, _}) =>
- let match_arms =
- em_values
- |> List.map(({evm_name, _}) => {
- let pattern = Ast_helper.Pat.variant(evm_name, None);
- let expr =
- Ast_helper.Exp.constant(
- Parsetree.Pconst_string(evm_name, None),
- );
- Ast_helper.Exp.case(pattern, [%expr Js.Json.string([%e expr])]);
- });
- Ast_helper.Exp.match([%expr value], match_arms);
- | InputObject({iom_input_fields, _}) =>
- json_of_fields(config.schema, loc, [%expr value], iom_input_fields)
- };
-
- let loc = conv_loc(loc);
- Ast_helper.Vb.mk(
- ~loc,
- Ast_helper.Pat.var({txt: function_name_string(x), loc}),
- [%expr value => [%e body]],
- );
-};
-
-let generate_encoders = (config, _loc) =>
- fun
- | Some({item, _}) =>
- item
- |> List.map(((span, {vd_type: variable_type, _})) =>
- (span, to_schema_type_ref(variable_type.item))
- )
- |> sort_variable_types(config.schema)
- |> (
- ((is_recursive, types)) => (
- if (is_recursive) {Recursive} else {Nonrecursive},
- Array.map(generate_encoder(config), types),
- )
- )
-
- | None => (Nonrecursive, [||]);
diff --git a/src/bucklescript/output_bucklescript_module.re b/src/bucklescript/output_bucklescript_module.re
index 22d4c1ee..da8c644d 100644
--- a/src/bucklescript/output_bucklescript_module.re
+++ b/src/bucklescript/output_bucklescript_module.re
@@ -2,11 +2,19 @@ open Migrate_parsetree;
open Graphql_ppx_base;
open Result_structure;
open Generator_utils;
-
open Ast_408;
open Asttypes;
open Parsetree;
open Ast_helper;
+open Extract_type_definitions;
+open Output_bucklescript_utils;
+
+type operation_type = Graphql_ast.operation_type;
+type operation_options = {has_required_variables: bool};
+
+type definition =
+ | Fragment
+ | Operation(operation_type, operation_options);
module StringSet = Set.Make(String);
module VariableFinderImpl = {
@@ -28,85 +36,126 @@ let find_variables = (config, document) => {
VariableFinderImpl.from_self(VariableFinder.visit_document(ctx, document));
};
-let ret_type_magic = [
- /* Some functor magic to determine the return type of parse */
- [%stri module type mt_ret = {type t;}],
- [%stri type typed_ret('a) = (module mt_ret with type t = 'a)],
- [%stri
- let ret_type = (type a, f: _ => a): typed_ret(a) => {
- module MT_Ret = {
- type t = a;
- };
- (module MT_Ret);
- }
- ],
- [%stri module MT_Ret = (val ret_type(parse))],
- [%stri type t = MT_Ret.t],
-];
+let join = (part1, part2) => {
+ Ast_helper.(
+ Exp.apply(
+ Exp.ident({Location.txt: Longident.parse("^"), loc: Location.none}),
+ [(Nolabel, part1), (Nolabel, part2)],
+ )
+ );
+};
+
+let pretty_print = (query: string): string => {
+ let indent = ref(1);
+
+ let str =
+ query
+ |> String.split_on_char('\n')
+ |> List.map(l => String.trim(l))
+ |> List.filter(l => l != "")
+ |> List.map(line => {
+ if (String.contains(line, '}')) {
+ indent := indent^ - 1;
+ };
+ let line = String.make(indent^ * 2, ' ') ++ line;
+ if (String.contains(line, '{')) {
+ indent := indent^ + 1;
+ };
+ line;
+ })
+ |> String.concat("\n");
+
+ str ++ "\n";
+};
+
+let compress_parts = (parts: array(Graphql_printer.t)) => {
+ Graphql_printer.(
+ parts
+ |> Array.to_list
+ |> List.fold_left(
+ (acc, curr) => {
+ switch (acc, curr) {
+ | ([String(s1), ...rest], String(s2)) => [
+ String(s1 ++ s2),
+ ...rest,
+ ]
+ | (acc, curr) => [curr, ...acc]
+ }
+ },
+ [],
+ )
+ |> List.rev
+ |> Array.of_list
+ );
+};
+
+let emit_printed_template_query = (parts: array(Graphql_printer.t)) => {
+ switch (parts) {
+ | [|String(s)|] => s
+ | [||] => ""
+ | parts =>
+ Graphql_printer.(
+ Array.fold_left(
+ acc =>
+ fun
+ | String(s) => acc ++ s
+ | FragmentNameRef(f) => {
+ let name =
+ switch (String.split_on_char('.', f) |> List.rev) {
+ | [name, ..._] => name
+ | [] => assert(false)
+ };
+ acc ++ name;
+ }
+ // This is the code to make the template tag compatible with Apollo
+ // we can expose this as an option later. (we need to wait for new
+ // %raw functionality to properly do template literals. So in current
+ // state it is not possible to make it compatible with Apollo.
+ // | FragmentQueryRef(f) => acc ++ "${" ++ f ++ ".query" ++ "}",
+ | FragmentQueryRef(_f) => acc,
+ "",
+ parts,
+ )
+ )
+ };
+};
let emit_printed_query = parts => {
open Ast_408;
+ let make_string = s => {
+ Exp.constant(Parsetree.Pconst_string(s, None));
+ };
+ let make_fragment_name = f => {
+ Exp.ident({
+ Location.txt: Longident.parse(f ++ ".name"),
+ loc: Location.none,
+ });
+ };
+ let make_fragment_query = f => {
+ Exp.ident({
+ Location.txt: Longident.parse(f ++ ".query"),
+ loc: Location.none,
+ });
+ };
open Graphql_printer;
- let generate_expr = acc =>
- fun
- | Empty => acc
- | String(s) =>
- Ast_helper.(
- Exp.apply(
- Exp.ident({
- Location.txt: Longident.parse("^"),
- loc: Location.none,
- }),
- [
- (Nolabel, acc),
- (Nolabel, Exp.constant(Parsetree.Pconst_string(s, None))),
- ],
- )
- )
- | FragmentNameRef(f) =>
- Ast_helper.(
- Exp.apply(
- Exp.ident({
- Location.txt: Longident.parse("^"),
- loc: Location.none,
- }),
- [
- (Nolabel, acc),
- (
- Nolabel,
- Exp.ident({
- Location.txt: Longident.parse(f ++ ".name"),
- loc: Location.none,
- }),
- ),
- ],
- )
- )
- | FragmentQueryRef(f) =>
- Ast_helper.(
- Exp.apply(
- Exp.ident({
- Location.txt: Longident.parse("^"),
- loc: Location.none,
- }),
- [
- (Nolabel, acc),
- (
- Nolabel,
- Exp.ident({
- Location.txt: Longident.parse(f ++ ".query"),
- loc: Location.none,
- }),
- ),
- ],
- )
- );
+ let generate_expr = (acc, part) =>
+ switch (acc, part) {
+ | (None, String(s)) => Some(make_string(s))
+ | (Some(acc), String(s)) => Some(join(acc, make_string(s)))
+ | (None, FragmentNameRef(f)) => Some(make_fragment_name(f))
+ | (Some(acc), FragmentNameRef(f)) =>
+ Some(join(acc, make_fragment_name(f)))
+ | (None, FragmentQueryRef(f)) => Some(make_fragment_query(f))
+ | (Some(acc), FragmentQueryRef(f)) =>
+ Some(join(acc, make_fragment_query(f)))
+ };
- Array.fold_left(
- generate_expr,
- Ast_408.(Ast_helper.Exp.constant(Parsetree.Pconst_string("", None))),
- parts,
- );
+ let result = parts |> Array.fold_left(generate_expr, None);
+
+ switch (result) {
+ | None => make_string("")
+ | Some(e) => e
+ };
};
let rec emit_json =
@@ -151,141 +200,484 @@ let rec emit_json =
]
);
+// we need to add a require statement because we cannot output the js value of
+// a bucklescript identifier in the raw statement yet. This is a feature that
+// should be coming, so then we don't need templateTagImport and templateTagLocatino
+// anymore (and also this require statement will not be necessary anymore)
+let pre_template_tag = (~location=?, ~import=?, template_tag) => {
+ switch (import, location) {
+ | (Some(import), Some(location)) =>
+ Some(
+ (
+ switch (import, template_tag) {
+ | ("default", template_tag) => "let " ++ template_tag
+ | (import, template_tag) when import == template_tag =>
+ "let { " ++ template_tag ++ " }"
+ | (import, template_tag) =>
+ "let { " ++ import ++ ": " ++ template_tag ++ " }"
+ }
+ )
+ ++ " = "
+ ++ "require(\""
+ ++ location
+ ++ "\")",
+ )
+ | _ => None
+ };
+};
+
+let wrap_template_tag = (template_tag, source) => {
+ // if the template literal is: "graphql"
+ // a string is created like this: graphql`[query]`
+ template_tag ++ "`\n" ++ source ++ "`";
+};
+
+let wrap_structure_raw = contents => {
+ Str.extension((
+ {txt: "raw", loc: Location.none},
+ PStr([
+ {
+ pstr_desc:
+ Pstr_eval(
+ Exp.constant(Parsetree.Pconst_string(contents, None)),
+ [],
+ ),
+ pstr_loc: Location.none,
+ },
+ ]),
+ ));
+};
+
+let wrap_raw = contents => {
+ Exp.extension((
+ {txt: "raw", loc: Location.none},
+ PStr([
+ {
+ pstr_desc:
+ Pstr_eval(
+ Exp.constant(Parsetree.Pconst_string(contents, None)),
+ [],
+ ),
+ pstr_loc: Location.none,
+ },
+ ]),
+ ));
+};
+
let make_printed_query = (config, document) => {
let source = Graphql_printer.print_document(config.schema, document);
let reprinted =
switch (Ppx_config.output_mode()) {
- | Ppx_config.Apollo_AST =>
- Ast_serializer_apollo.serialize_document(source, document) |> emit_json
- | Ppx_config.String => emit_printed_query(source)
+ | Ppx_config.Apollo_AST => (
+ None,
+ Ast_serializer_apollo.serialize_document(source, document)
+ |> emit_json,
+ )
+ | Ppx_config.String =>
+ switch (config.template_tag) {
+ | (None, _, _) => (None, emit_printed_query(source))
+ | (Some(template_tag), location, import) =>
+ // the only way to emit a template literal for now, using the bs.raw
+ // extension
+ (
+ switch (pre_template_tag(~location?, ~import?, template_tag)) {
+ | Some(contents) => Some(wrap_structure_raw(contents))
+ | None => None
+ },
+ wrap_raw(
+ wrap_template_tag(
+ template_tag,
+ pretty_print(emit_printed_template_query(source)),
+ ),
+ ),
+ )
+ }
};
- [
- [%stri let ppx_printed_query = [%e reprinted]],
- [%stri let query = ppx_printed_query],
- ];
+ reprinted;
+};
+
+let wrap_module = (name: string, contents) => {
+ {
+ pstr_desc:
+ Pstr_module({
+ pmb_name: {
+ txt: Generator_utils.capitalize_ascii(name),
+ loc: Location.none,
+ },
+ pmb_expr: Mod.structure(contents),
+ pmb_attributes: [],
+ pmb_loc: Location.none,
+ }),
+ pstr_loc: Location.none,
+ };
+};
+
+let wrap_query_module = (definition, name: string, contents, config) => {
+ let module_name = Generator_utils.capitalize_ascii(name ++ "'");
+ let funct =
+ switch (config.extend) {
+ | Some(funct) => Some(funct)
+ | None =>
+ switch (definition) {
+ | Fragment => Ppx_config.extend_fragment()
+ | Operation(Query, {has_required_variables: false}) =>
+ switch (Ppx_config.extend_query_no_required_variables()) {
+ | Some(extension) => Some(extension)
+ | None => Ppx_config.extend_query()
+ }
+ | Operation(Query, _) => Ppx_config.extend_query()
+ | Operation(Mutation, {has_required_variables: false}) =>
+ switch (Ppx_config.extend_mutation_no_required_variables()) {
+ | Some(extension) => Some(extension)
+ | None => Ppx_config.extend_mutation()
+ }
+ | Operation(Mutation, _) => Ppx_config.extend_mutation()
+ | Operation(Subscription, {has_required_variables: false}) =>
+ switch (Ppx_config.extend_subscription_no_required_variables()) {
+ | Some(extension) => Some(extension)
+ | None => Ppx_config.extend_subscription()
+ }
+ | Operation(Subscription, _) => Ppx_config.extend_subscription()
+ }
+ };
+
+ switch (funct) {
+ | Some(funct) =>
+ let inner_result = [
+ Str.include_(
+ Incl.mk(
+ Mod.ident({txt: Longident.parse(module_name), loc: Location.none}),
+ ),
+ ),
+ Str.include_(
+ Incl.mk(
+ Mod.apply(
+ Mod.ident({txt: Longident.parse(funct), loc: Location.none}),
+ Mod.ident({
+ txt: Longident.parse(module_name),
+ loc: Location.none,
+ }),
+ ),
+ ),
+ ),
+ ];
+ [wrap_module(module_name, contents), wrap_module(name, inner_result)];
+ | None => [wrap_module(name, contents)]
+ };
};
let generate_default_operation =
(config, variable_defs, has_error, operation, res_structure) => {
+ Output_bucklescript_docstrings.reset();
let parse_fn =
- Output_bucklescript_decoder.generate_decoder(config, res_structure);
- if (has_error) {
- [[%stri let parse = value => [%e parse_fn]]];
- } else {
- let (rec_flag, encoders) =
- Output_bucklescript_encoder.generate_encoders(
- config,
- Result_structure.res_loc(res_structure),
- variable_defs,
- );
- let (make_fn, make_with_variables_fn, make_variables_fn, definition_tuple) =
- Output_bucklescript_unifier.make_make_fun(config, variable_defs);
+ Output_bucklescript_parser.generate_parser(
+ config,
+ [],
+ Graphql_ast.Operation(operation),
+ res_structure,
+ );
+ let serialize_fn =
+ Output_bucklescript_serializer.generate_serializer(
+ config,
+ [],
+ Graphql_ast.Operation(operation),
+ None,
+ res_structure,
+ );
+ let types =
+ Output_bucklescript_types.generate_types(
+ config,
+ res_structure,
+ false,
+ None,
+ );
+ // Add to internal module
+ Output_bucklescript_docstrings.for_operation(config, operation);
+ let raw_types =
+ Output_bucklescript_types.generate_types(
+ config,
+ res_structure,
+ true,
+ None,
+ );
+ let arg_types =
+ Output_bucklescript_types.generate_arg_types(
+ false,
+ config,
+ variable_defs,
+ );
+ let raw_arg_types =
+ Output_bucklescript_types.generate_arg_types(true, config, variable_defs);
+ let extracted_args = extract_args(config, variable_defs);
+ let serialize_variable_functions =
+ Output_bucklescript_serializer.generate_serialize_variables(
+ config,
+ extracted_args,
+ );
+ let has_required_variables = has_required_variables(extracted_args);
+
+ let contents =
+ if (has_error) {
+ [[%stri let parse: Raw.t => t = value => [%e parse_fn]]];
+ } else {
+ let variable_constructors =
+ Output_bucklescript_serializer.generate_variable_constructors(
+ config,
+ extracted_args,
+ );
+
+ let (pre_printed_query, printed_query) =
+ make_printed_query(config, [Graphql_ast.Operation(operation)]);
+
+ let legacy_make_with_variables = [%stri
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ }
+ ];
- List.concat([
- make_printed_query(config, [Graphql_ast.Operation(operation)]),
List.concat([
- [[%stri let parse = value => [%e parse_fn]]],
- if (rec_flag == Recursive) {
+ List.concat([
+ [wrap_module("Raw", List.append(raw_types, raw_arg_types))],
+ switch (pre_printed_query) {
+ | Some(pre_printed_query) => [pre_printed_query]
+ | None => []
+ },
[
- {
- pstr_desc: Pstr_value(rec_flag, encoders |> Array.to_list),
- pstr_loc: Location.none,
- },
- ];
- } else {
- encoders
- |> Array.map(encoder =>
- {
- pstr_desc: Pstr_value(Nonrecursive, [encoder]),
- pstr_loc: Location.none,
- }
- )
- |> Array.to_list;
- },
- [
- [%stri let make = [%e make_fn]],
- [%stri let makeWithVariables = [%e make_with_variables_fn]],
- [%stri let makeVariables = [%e make_variables_fn]],
- [%stri let definition = [%e definition_tuple]],
- ],
- ]),
- ret_type_magic,
- ]);
- };
+ Output_bucklescript_docstrings.(
+ make_let("query", printed_query, query_docstring)
+ ),
+ ],
+ types,
+ arg_types,
+ [
+ Output_bucklescript_docstrings.(
+ make_let(
+ "parse",
+ [%expr (value: Raw.t) => ([%e parse_fn]: t)],
+ parse_docstring,
+ )
+ ),
+ ],
+ [
+ Output_bucklescript_docstrings.(
+ make_let(
+ "serialize",
+ [%expr (value: t) => ([%e serialize_fn]: Raw.t)],
+ serialize_docstring,
+ )
+ ),
+ ],
+ switch (serialize_variable_functions) {
+ | None => []
+ | Some(f) => [f]
+ },
+ switch (variable_constructors) {
+ | None => [[%stri let makeVariables = () => ()]]
+ | Some(c) => [c]
+ },
+ has_required_variables
+ ? [] : [[%stri let makeDefaultVariables = () => makeVariables()]],
+ config.legacy && variable_constructors != None
+ ? [legacy_make_with_variables] : [],
+ config.legacy && variable_constructors == None
+ ? [
+ [%stri
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ }
+ ],
+ ]
+ : [],
+ [
+ [%stri external unsafe_fromJson: Js.Json.t => Raw.t = "%identity"],
+ ],
+ [[%stri external toJson: Raw.t => Js.Json.t = "%identity"]],
+ [
+ [%stri
+ external variablesToJson: Raw.t_variables => Js.Json.t =
+ "%identity"
+ ],
+ ],
+ Output_bucklescript_docstrings.get_module(),
+ ]),
+ ]);
+ };
+
+ let name =
+ switch (operation) {
+ | {item: {o_name: Some({item: name})}} => Some(name)
+ | _ => None
+ };
+ (
+ Operation(
+ operation.item.o_type,
+ {has_required_variables: has_required_variables},
+ ),
+ name,
+ contents,
+ );
};
let generate_fragment_module =
- (config, name, _required_variables, has_error, fragment, res_structure) => {
+ (config, name, required_variables, has_error, fragment, res_structure) => {
+ Output_bucklescript_docstrings.reset();
let parse_fn =
- Output_bucklescript_decoder.generate_decoder(config, res_structure);
-
- let variable_names =
- find_variables(config, [Graphql_ast.Fragment(fragment)])
- |> StringSet.elements;
-
- let variable_fields =
- variable_names
- |> List.map(name =>
- {
- pof_desc:
- Otag(
- {txt: name, loc: Location.none},
- Ast_helper.Typ.constr(
- {txt: Longident.Lident("unit"), loc: Location.none},
- [],
- ),
- ),
- pof_loc: Location.none,
- pof_attributes: [],
- }
- );
- let variable_obj_type =
- Ast_helper.Typ.constr(
- {txt: Longident.parse("Js.t"), loc: Location.none},
- [Ast_helper.Typ.object_(variable_fields, Open)],
+ Output_bucklescript_parser.generate_parser(
+ config,
+ [],
+ Graphql_ast.Fragment(fragment),
+ res_structure,
+ );
+ let serialize_fn =
+ Output_bucklescript_serializer.generate_serializer(
+ config,
+ [],
+ Graphql_ast.Fragment(fragment),
+ None,
+ res_structure,
);
+ let types =
+ Output_bucklescript_types.generate_types(
+ config,
+ res_structure,
+ false,
+ Some((
+ fragment.item.fg_type_condition.item,
+ fragment.item.fg_name.span,
+ )),
+ );
+ // Add to internal module
+ Output_bucklescript_docstrings.for_fragment_root(config, fragment);
+ let raw_types =
+ Output_bucklescript_types.generate_types(
+ config,
+ res_structure,
+ true,
+ Some((
+ fragment.item.fg_type_condition.item,
+ fragment.item.fg_name.span,
+ )),
+ );
+
+ let rec make_labeled_fun = body =>
+ fun
+ | [] => body
+ | [(name, type_, span, type_span), ...tl] => {
+ let loc = config.map_loc(span) |> conv_loc;
+ let type_loc = config.map_loc(type_span) |> conv_loc;
+ Ast_helper.(
+ Exp.fun_(
+ ~loc,
+ Labelled(name),
+ None,
+ Pat.constraint_(
+ Pat.var({txt: "_" ++ name, loc: type_loc}),
+ Typ.variant(
+ [
+ {
+ prf_desc:
+ Rtag(
+ {
+ txt:
+ Output_bucklescript_parser.type_name_to_words(
+ type_,
+ ),
+ loc: type_loc,
+ },
+ true,
+ [],
+ ),
+ prf_loc: type_loc,
+ prf_attributes: [],
+ },
+ ],
+ Closed,
+ None,
+ ),
+ ),
+ make_labeled_fun(body, tl),
+ )
+ );
+ };
+
let contents =
if (has_error) {
- [
- [%stri
- let make = (_vars: [%t variable_obj_type], value) => [%e parse_fn]
- ],
- ];
+ [[%stri let make = (_vars, value) => [%e parse_fn]]];
} else {
- List.concat([
- make_printed_query(config, [Graphql_ast.Fragment(fragment)]),
- [
- [%stri let parse = value => [%e parse_fn]],
- [%stri
- let name = [%e
- Ast_helper.Exp.constant(Pconst_string(name, None))
- ]
+ let (pre_printed_query, printed_query) =
+ make_printed_query(config, [Graphql_ast.Fragment(fragment)]);
+ let verify_parse =
+ make_labeled_fun(
+ [%expr (value: Raw.t) => parse(value)],
+ required_variables,
+ );
+ // Add to internal module
+ Output_bucklescript_docstrings.for_fragment(config, fragment);
+ List.concat(
+ List.concat([
+ [
+ switch (pre_printed_query) {
+ | Some(pre_printed_query) => [pre_printed_query]
+ | None => []
+ },
+ [
+ Output_bucklescript_docstrings.(
+ make_let("query", printed_query, query_docstring)
+ ),
+ ],
+ [wrap_module("Raw", raw_types)],
+ types,
+ [
+ Output_bucklescript_docstrings.(
+ make_let(
+ "parse",
+ [%expr (value: Raw.t) => ([%e parse_fn]: t)],
+ parse_docstring,
+ )
+ ),
+ ],
+ [[%stri let verifyArgsAndParse = [%e verify_parse]]],
+ [
+ Output_bucklescript_docstrings.(
+ make_let(
+ "serialize",
+ [%expr (value: t) => ([%e serialize_fn]: Raw.t)],
+ serialize_docstring,
+ )
+ ),
+ ],
+ [
+ [%stri
+ let name = [%e
+ Ast_helper.Exp.constant(Pconst_string(name, None))
+ ]
+ ],
+ ],
+ [
+ [%stri
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity"
+ ],
+ ],
+ [[%stri external toJson: Raw.t => Js.Json.t = "%identity"]],
+ Output_bucklescript_docstrings.get_module(),
],
- ],
- ret_type_magic,
- ]);
+ ]),
+ );
};
- let m =
- Pstr_module({
- pmb_name: {
- txt: Generator_utils.capitalize_ascii(name),
- loc: Location.none,
- },
- pmb_expr: Mod.structure(contents),
- pmb_attributes: [],
- pmb_loc: Location.none,
- });
-
- [{pstr_desc: m, pstr_loc: Location.none}];
+ (Fragment, Some(Generator_utils.capitalize_ascii(name)), contents);
};
-let generate_operation = config =>
+let generate_definition = config =>
fun
- | Mod_default_operation(vdefs, has_error, operation, structure) =>
+ | Def_operation(vdefs, has_error, operation, structure) =>
generate_default_operation(config, vdefs, has_error, operation, structure)
- | Mod_fragment(name, req_vars, has_error, fragment, structure) =>
+ | Def_fragment(name, req_vars, has_error, fragment, structure) =>
generate_fragment_module(
config,
name,
@@ -295,7 +687,55 @@ let generate_operation = config =>
structure,
);
-let generate_modules = (config, operations) => {
- let generated = List.map(generate_operation(config), operations);
- Mod.mk(Pmod_structure(List.concat(generated)));
+let generate_modules = (config, module_name, operations) => {
+ switch (operations) {
+ | [] => []
+ | [operation] =>
+ switch (generate_definition(config, operation)) {
+ | (definition, Some(name), contents) =>
+ config.inline
+ ? [contents]
+ : [
+ wrap_query_module(
+ definition,
+ switch (module_name) {
+ | Some(name) => name
+ | None => name
+ },
+ contents,
+ config,
+ ),
+ ]
+ | (definition, None, contents) =>
+ switch (module_name) {
+ | Some(name) => [
+ wrap_query_module(definition, name, contents, config),
+ ]
+ | None => [contents]
+ }
+ }
+ | operations =>
+ let contents =
+ operations
+ |> List.map(generate_definition(config))
+ |> List.mapi((i, (definition, name, contents)) =>
+ switch (name) {
+ | Some(name) =>
+ wrap_query_module(definition, name, contents, config)
+ | None =>
+ wrap_query_module(
+ definition,
+ "Untitled" ++ string_of_int(i),
+ contents,
+ config,
+ )
+ }
+ );
+ switch (module_name) {
+ | Some(module_name) => [
+ [wrap_module(module_name, List.concat(contents))],
+ ]
+ | None => contents
+ };
+ };
};
diff --git a/src/bucklescript/output_bucklescript_parser.re b/src/bucklescript/output_bucklescript_parser.re
new file mode 100644
index 00000000..14adb7ad
--- /dev/null
+++ b/src/bucklescript/output_bucklescript_parser.re
@@ -0,0 +1,676 @@
+open Migrate_parsetree;
+open Graphql_ppx_base;
+open Result_structure;
+open Schema;
+
+open Ast_408;
+open Asttypes;
+open Parsetree;
+
+open Generator_utils;
+open Output_bucklescript_utils;
+open Output_bucklescript_types;
+open Extract_type_definitions;
+
+// Cheap way of preventing location override from types module
+// Might refactor this later
+let conv_loc = _ => Location.none;
+
+let record_to_object = (loc, record) => {
+ Ast_helper.(
+ Exp.extension((
+ {txt: "bs.obj", loc: conv_loc(loc)},
+ PStr([[%stri [%e record]]]),
+ ))
+ );
+};
+
+let rec generate_poly_type_ref_name = (type_ref: Graphql_ast.type_ref) => {
+ switch (type_ref) {
+ | Tr_named({item: name}) => name
+ | Tr_list({item: type_ref}) =>
+ "ListOf_" ++ generate_poly_type_ref_name(type_ref)
+ | Tr_non_null_named({item: name}) => "NonNull_" ++ name
+ | Tr_non_null_list({item: type_ref}) =>
+ "NonNullListOf_" ++ generate_poly_type_ref_name(type_ref)
+ };
+};
+
+let type_name_to_words = type_name => {
+ let str = ref("");
+ type_name
+ |> String.iter(
+ fun
+ | '!' => str := str^ ++ "_NonNull"
+ | ']' => str := str^ ++ "_OfList"
+ | c => str := str^ ++ String.make(1, c),
+ );
+ str^;
+};
+
+let get_variable_definitions = (definition: Graphql_ast.definition) => {
+ switch (definition) {
+ | Fragment({item: {fg_directives: directives}}) =>
+ Result_decoder.getFragmentArgumentDefinitions(directives)
+ |> List.map(((name, type_, span, type_span)) =>
+ (name, type_name_to_words(type_), span, type_span)
+ )
+ | Operation({item: {o_variable_definitions: Some({item: definitions})}}) =>
+ Graphql_ast.(
+ definitions
+ |> List.fold_left(
+ (
+ acc,
+ (
+ {Source_pos.item: name, span},
+ {vd_type: {item: type_ref, span: type_span}},
+ ),
+ ) =>
+ [
+ (
+ name,
+ Graphql_printer.print_type(type_ref) |> type_name_to_words,
+ span,
+ type_span,
+ ),
+ ...acc,
+ ],
+ [],
+ )
+ )
+ | _ => []
+ };
+};
+
+let make_error_raiser = message =>
+ if (Ppx_config.verbose_error_handling()) {
+ %expr
+ Js.Exn.raiseError("graphql-ppx: " ++ [%e message]);
+ } else {
+ %expr
+ Js.Exn.raiseError("Unexpected GraphQL query response");
+ };
+
+let raw_value = loc => [@metaloc loc] [%expr value];
+
+let generate_poly_enum_decoder = (loc, enum_meta, omit_future_value) => {
+ let enum_match_arms =
+ Ast_helper.(
+ enum_meta.em_values
+ |> List.map(({evm_name, _}) =>
+ Exp.case(
+ const_str_pat(evm_name),
+ Exp.variant(to_valid_ident(evm_name), None),
+ )
+ )
+ );
+
+ let fallback_arm =
+ omit_future_value
+ ? Ast_helper.(
+ Exp.case(
+ Pat.any(),
+ Exp.apply(
+ Exp.ident(Location.mknoloc(Longident.parse("raise"))),
+ [
+ (
+ Nolabel,
+ Exp.construct(
+ Location.mknoloc(Longident.parse("Not_found")),
+ None,
+ ),
+ ),
+ ],
+ ),
+ )
+ )
+ : Ast_helper.(
+ Exp.case(
+ Pat.var({loc: conv_loc(loc), txt: "other"}),
+ Exp.variant(
+ "FutureAddedValue",
+ Some(
+ Exp.ident({
+ Location.txt: Longident.parse("other"),
+ loc: conv_loc(loc),
+ }),
+ ),
+ ),
+ )
+ );
+
+ let match_expr =
+ Ast_helper.(
+ Exp.match(
+ [@metaloc conv_loc(loc)] [%expr Obj.magic(value: string)],
+ List.concat([enum_match_arms, [fallback_arm]]),
+ )
+ );
+
+ %expr
+ [%e match_expr];
+};
+
+let generate_fragment_parse_fun = (config, loc, name, arguments, definition) => {
+ let ident =
+ Ast_helper.Exp.ident({
+ loc,
+ txt: Longident.parse(name ++ ".verifyArgsAndParse"),
+ });
+ let variable_defs = get_variable_definitions(definition);
+ let labeled_args =
+ variable_defs
+ |> List.filter(((name, _, _, _)) =>
+ arguments |> List.exists(arg => arg == name)
+ )
+ |> List.map(((arg_name, type_, _span, type_span)) =>
+ (
+ Labelled(arg_name),
+ Ast_helper.Exp.variant(
+ ~loc=config.map_loc(type_span) |> conv_loc,
+ type_,
+ None,
+ ),
+ )
+ );
+
+ Ast_helper.Exp.apply(
+ ~loc,
+ ident,
+ List.append(labeled_args, [(Nolabel, ident_from_string("value"))]),
+ );
+};
+
+let generate_solo_fragment_spread_decoder =
+ (config, loc, name, arguments, definition) => {
+ generate_fragment_parse_fun(config, loc, name, arguments, definition);
+};
+
+let generate_error = (loc, message) => {
+ let loc = Output_bucklescript_utils.conv_loc(loc);
+ let ext = Ast_mapper.extension_of_error(Location.error(~loc, message));
+ let%expr _value = value;
+ %e
+ Ast_helper.Exp.extension(~loc, ext);
+};
+
+let rec generate_nullable_decoder = (config, loc, inner, path, definition) =>
+ [@metaloc loc]
+ (
+ switch%expr (Js.toOption(value)) {
+ | Some(value) =>
+ Some([%e generate_parser(config, path, definition, inner)])
+ | None => None
+ }
+ )
+and generate_array_decoder = (config, loc, inner, path, definition) =>
+ [@metaloc loc]
+ [%expr
+ value
+ |> Js.Array.map(value => {
+ %e
+ generate_parser(config, path, definition, inner)
+ })
+ ]
+and generate_custom_decoder = (config, loc, ident, inner, path, definition) =>
+ [@metaloc loc]
+ {
+ %expr
+ [%e ident_from_string(ident ++ ".parse")](
+ [%e generate_parser(config, path, definition, inner)],
+ );
+ }
+and generate_object_decoder =
+ (
+ config,
+ loc,
+ _name,
+ fields,
+ path,
+ definition,
+ existing_record,
+ force_record,
+ ) => {
+ // whether we can use inline values, this compiles to better javascript
+ // but we can't use this if we are constructing objects instead of records
+ let inline_values = config.records;
+ let do_obj_constructor_base = (is_object, wrap) => {
+ open Ast_helper;
+ let opaque =
+ fields
+ |> List.exists(
+ fun
+ | Fr_fragment_spread(_) => true
+ | _ => false,
+ );
+ let object_type = base_type_name("Raw." ++ generate_type_name(path));
+
+ let get_value =
+ fun
+ | Fr_named_field({name: key, type_: inner}) =>
+ [@metaloc conv_loc(loc)]
+ {
+ let%expr value =
+ switch%e (opaque, is_object) {
+ | (true, _) =>
+ %expr
+ Obj.magic(
+ Js.Dict.unsafeGet(
+ Obj.magic(value),
+ [%e const_str_expr(key)],
+ ),
+ )
+
+ | (_, true) =>
+ %expr
+ value##[%e ident_from_string(to_valid_ident(key))]
+ | (_, false) =>
+ %expr
+ [%e
+ Ast_helper.Exp.field(
+ Exp.constraint_(ident_from_string("value"), object_type),
+ {
+ loc: Location.none,
+ Location.txt: Longident.parse(to_valid_ident(key)),
+ },
+ )
+ ]
+ };
+
+ %e
+ generate_parser(config, [key, ...path], definition, inner);
+ }
+
+ | Fr_fragment_spread(_key, loc, name, _, arguments) =>
+ [@metaloc conv_loc(loc)]
+ {
+ let%expr value: [%t base_type_name(name ++ ".Raw.t")] =
+ Obj.magic(value);
+ %e
+ generate_fragment_parse_fun(
+ config,
+ conv_loc(loc),
+ name,
+ arguments,
+ definition,
+ );
+ };
+
+ let get_record_contents =
+ fun
+ | Fr_fragment_spread(key, _, _, _, _)
+ | Fr_named_field({name: key}) => (
+ {txt: Longident.parse(to_valid_ident(key)), loc: conv_loc(loc)},
+ ident_from_string(to_valid_ident(key)),
+ );
+
+ let get_record_contents_inline =
+ fun
+ | Fr_fragment_spread(key, _, _, _, _) as field
+ | Fr_named_field({name: key}) as field => (
+ {txt: Longident.parse(to_valid_ident(key)), loc: conv_loc(loc)},
+ get_value(field),
+ );
+
+ let record =
+ Exp.record(
+ List.map(
+ inline_values ? get_record_contents_inline : get_record_contents,
+ fields,
+ ),
+ None,
+ );
+
+ let record = wrap ? record_to_object(loc, record) : record;
+
+ inline_values
+ ? record
+ : {
+ let bindings =
+ fields
+ |> List.map(
+ fun
+ | Fr_named_field({name}) as field => (name, field)
+ | Fr_fragment_spread(key, _, _, _, _) as field => (
+ key,
+ field,
+ ),
+ )
+ |> List.map(((key, field)) => {
+ Vb.mk(
+ Pat.var({txt: to_valid_ident(key), loc: conv_loc(loc)}),
+ get_value(field),
+ )
+ })
+ |> List.rev;
+ Exp.let_(Nonrecursive, bindings, record);
+ };
+ };
+
+ let do_obj_constructor = () =>
+ [@metaloc loc]
+ {
+ do_obj_constructor_base(true, true);
+ };
+
+ let do_obj_constructor_records = () =>
+ [@metaloc loc]
+ {
+ Ast_helper.(
+ Exp.constraint_(
+ do_obj_constructor_base(!config.records, false),
+ base_type_name(
+ switch (existing_record) {
+ | None => generate_type_name(path)
+ | Some(type_name) => type_name
+ },
+ ),
+ )
+ );
+ };
+
+ config.records || existing_record != None || force_record
+ ? do_obj_constructor_records() : do_obj_constructor();
+}
+and generate_poly_variant_selection_set_decoder =
+ (config, loc, name, fields, path, definition) => {
+ let rec generator_loop =
+ fun
+ | [({item: field}: Result_structure.name, inner), ...next] => {
+ let field_name = Compat.capitalize_ascii(field);
+ let variant_decoder =
+ Ast_helper.(
+ Exp.variant(
+ field_name,
+ Some(
+ generate_parser(config, [field, ...path], definition, inner),
+ ),
+ )
+ );
+ [@metaloc loc]
+ {
+ let%expr temp =
+ Js.Dict.unsafeGet(Obj.magic(value), [%e const_str_expr(field)]);
+
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ %e
+ variant_decoder;
+ | Some(_) =>
+ %e
+ generator_loop(next)
+ };
+ };
+ }
+ | [] =>
+ make_error_raiser(
+ [%expr
+ "All fields on variant selection set on type "
+ ++ [%e const_str_expr(name)]
+ ++ " were null"
+ ],
+ );
+
+ [@metaloc loc]
+ (
+ switch%expr (Js.Json.decodeObject(Obj.magic(value): Js.Json.t)) {
+ | None =>
+ %e
+ make_error_raiser(
+ [%expr
+ "Expected type " ++ [%e const_str_expr(name)] ++ " to be an object"
+ ],
+ )
+ | Some(value) =>
+ %e
+ generator_loop(fields)
+ }
+ );
+}
+and generate_poly_variant_interface_decoder =
+ (config, loc, _name, base, fragments, path, definition) => {
+ let map_fallback_case = ((type_name, inner)) => {
+ open Ast_helper;
+ let name_pattern = Pat.any();
+
+ Exp.variant(
+ type_name,
+ Some(
+ generate_parser(config, [type_name, ...path], definition, inner),
+ ),
+ )
+ |> Exp.case(name_pattern);
+ };
+
+ let map_case = ((type_name, _inner)) => {
+ open Ast_helper;
+ let name_pattern = const_str_pat(type_name);
+
+ Exp.variant(
+ type_name,
+ Some(
+ {
+ let%expr value: [%t
+ base_type_name(
+ "Raw." ++ generate_type_name([type_name, ...path]),
+ )
+ ] =
+ Obj.magic(value);
+ generate_parser(config, [type_name, ...path], definition, inner);
+ },
+ ),
+ )
+ |> Exp.case(name_pattern);
+ };
+
+ let fragment_cases = List.map(map_case, fragments);
+ let fallback_case = map_fallback_case(base);
+ let typename_matcher =
+ Ast_helper.(
+ Exp.match(
+ [%expr typename],
+ List.concat([fragment_cases, [fallback_case]]),
+ )
+ );
+
+ [@metaloc loc]
+ {
+ let%expr typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ ([%e typename_matcher]: [%t base_type_name(generate_type_name(path))]);
+ };
+}
+and generate_poly_variant_union_decoder =
+ (
+ config,
+ loc,
+ _name,
+ fragments,
+ _exhaustive_flag,
+ omit_future_value,
+ path,
+ definition,
+ ) => {
+ let fragment_cases =
+ fragments
+ |> List.map((({item: type_name}: Result_structure.name, inner)) => {
+ Ast_helper.(
+ Exp.case(
+ const_str_pat(type_name),
+ Exp.variant(
+ type_name,
+ Some(
+ {
+ let%expr value: [%t
+ switch (inner) {
+ | Res_solo_fragment_spread(_, name, _) =>
+ base_type_name(name ++ ".Raw.t")
+ | _ =>
+ base_type_name(
+ "Raw." ++ generate_type_name([type_name, ...path]),
+ )
+ }
+ ] =
+ Obj.magic(value);
+ %e
+ generate_parser(
+ config,
+ [type_name, ...path],
+ definition,
+ inner,
+ );
+ },
+ ),
+ ),
+ )
+ )
+ });
+ let fallback_case =
+ omit_future_value
+ ? Ast_helper.(
+ Exp.case(
+ Pat.any(),
+ Exp.apply(
+ Exp.ident(Location.mknoloc(Longident.parse("raise"))),
+ [
+ (
+ Nolabel,
+ Exp.construct(
+ Location.mknoloc(Longident.parse("Not_found")),
+ None,
+ ),
+ ),
+ ],
+ ),
+ )
+ )
+ : Ast_helper.(
+ Exp.case(
+ Pat.any(),
+ Exp.variant(
+ "FutureAddedValue",
+ Some(
+ [%expr
+ (
+ Obj.magic(
+ [%e
+ Exp.ident({
+ Location.txt: Longident.parse("value"),
+ loc: Location.none,
+ })
+ ],
+ ): Js.Json.t
+ )
+ ],
+ ),
+ ),
+ )
+ );
+
+ let typename_matcher =
+ Ast_helper.(
+ Exp.match(
+ [%expr typename],
+ List.concat([fragment_cases, [fallback_case]]),
+ )
+ );
+
+ [@metaloc loc]
+ {
+ let%expr typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ ([%e typename_matcher]: [%t base_type_name(generate_type_name(path))]);
+ };
+}
+and generate_parser = (config, path: list(string), definition) =>
+ fun
+ | Res_nullable(loc, inner) =>
+ generate_nullable_decoder(config, conv_loc(loc), inner, path, definition)
+ | Res_array(loc, inner) =>
+ generate_array_decoder(config, conv_loc(loc), inner, path, definition)
+ | Res_id(loc) => raw_value(conv_loc(loc))
+ | Res_string(loc) => raw_value(conv_loc(loc))
+ | Res_int(loc) => raw_value(conv_loc(loc))
+ | Res_float(loc) => raw_value(conv_loc(loc))
+ | Res_boolean(loc) => raw_value(conv_loc(loc))
+ | Res_raw_scalar(loc) => raw_value(conv_loc(loc))
+ | Res_poly_enum(loc, enum_meta, omit_future_value) =>
+ generate_poly_enum_decoder(loc, enum_meta, omit_future_value)
+ | Res_custom_decoder(loc, ident, inner) =>
+ generate_custom_decoder(
+ config,
+ conv_loc(loc),
+ ident,
+ inner,
+ path,
+ definition,
+ )
+ | Res_record(loc, name, fields, existing_record) =>
+ generate_object_decoder(
+ config,
+ loc,
+ name,
+ fields,
+ path,
+ definition,
+ existing_record,
+ true,
+ )
+ | Res_object(loc, name, fields, existing_record) =>
+ generate_object_decoder(
+ config,
+ loc,
+ name,
+ fields,
+ path,
+ definition,
+ existing_record,
+ false,
+ )
+ | Res_poly_variant_union(
+ loc,
+ name,
+ fragments,
+ exhaustive,
+ omit_future_value,
+ ) =>
+ generate_poly_variant_union_decoder(
+ config,
+ conv_loc(loc),
+ name,
+ fragments,
+ exhaustive,
+ omit_future_value,
+ path,
+ definition,
+ )
+ | Res_poly_variant_selection_set(loc, name, fields) =>
+ generate_poly_variant_selection_set_decoder(
+ config,
+ conv_loc(loc),
+ name,
+ fields,
+ path,
+ definition,
+ )
+
+ | Res_poly_variant_interface(loc, name, base, fragments) =>
+ generate_poly_variant_interface_decoder(
+ config,
+ conv_loc(loc),
+ name,
+ base,
+ fragments,
+ [name, ...path],
+ definition,
+ )
+ | Res_solo_fragment_spread(loc, name, arguments) =>
+ generate_solo_fragment_spread_decoder(
+ config,
+ conv_loc(loc),
+ name,
+ arguments,
+ definition,
+ )
+ | Res_error(loc, message) => generate_error(loc, message);
diff --git a/src/bucklescript/output_bucklescript_serializer.re b/src/bucklescript/output_bucklescript_serializer.re
new file mode 100644
index 00000000..e334c081
--- /dev/null
+++ b/src/bucklescript/output_bucklescript_serializer.re
@@ -0,0 +1,810 @@
+open Migrate_parsetree;
+open Graphql_ppx_base;
+open Source_pos;
+open Schema;
+
+open Ast_408;
+open Asttypes;
+
+open Generator_utils;
+open Output_bucklescript_utils;
+open Extract_type_definitions;
+open Result_structure;
+open Output_bucklescript_types;
+
+// Cheap way of preventing location override from types module
+// Might refactor this later
+let conv_loc = _ => Location.none;
+
+let raw_value = loc => [@metaloc loc] [%expr value];
+/*
+ * This serializes a variable type to an option type with a JSON value
+ * the reason that it generates an option type is that we don't want the values
+ * to become Js.Json.null, that would mean actually setting a value to null in
+ * the GraphQL spec.
+ *
+ * What we want however is to remove these values from the generated JSON
+ * object. To be able to achieve that we wrap it in an option, so that we know
+ * which values to remove.
+ *
+ * In the future we'd like to support a flag so that:
+ * Some(Some(val)) => actual value
+ * None => not present in JSON object
+ * Some(None) => Null
+ */
+let rec serialize_type =
+ fun
+ | Type(Scalar({sm_name: "ID"}))
+ | Type(Scalar({sm_name: "String"})) => [%expr (a => a)]
+ | Type(Scalar({sm_name: "Int"})) => [%expr (a => a)]
+ | Type(Scalar({sm_name: "Float"})) => [%expr (a => a)]
+ | Type(Scalar({sm_name: "Boolean"})) => [%expr (a => a)]
+ | Type(Scalar({sm_name: _})) => [%expr (a => a)]
+ | Type(InputObject({iom_name})) => [%expr
+ (a => [%e ident_from_string("serializeInputObject" ++ iom_name)](a))
+ ]
+ | Type(Enum({em_values})) => {
+ let case_exp =
+ Ast_helper.(
+ Exp.match(
+ ident_from_string("a"),
+ em_values
+ |> List.map(value => {
+ Exp.case(
+ Pat.variant(value.evm_name, None),
+ Ast_helper.Exp.constant(
+ Parsetree.Pconst_string(value.evm_name, None),
+ ),
+ )
+ }),
+ )
+ );
+ %expr
+ (a => [%e case_exp]);
+ }
+ | Nullable(inner) => [%expr
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return([%e serialize_type(inner)](b))
+ }
+ )
+ ]
+ // in this case if there are null values in the list actually convert them to
+ // JSON nulls
+ | List(inner) => [%expr
+ (a => Array.map(b => {[%e serialize_type(inner)](b)}, a))
+ ]
+ | Type(Object(_)) => [%expr (v => None)]
+ | Type(Union(_)) => [%expr (v => None)]
+ | Type(Interface(_)) => [%expr (v => None)]
+ | TypeNotFound(_) => [%expr (v => None)];
+
+let record_to_object = (loc, record) => {
+ Ast_helper.(
+ Exp.extension((
+ {txt: "bs.obj", loc: conv_loc(loc)},
+ PStr([[%stri [%e record]]]),
+ ))
+ );
+};
+
+let serialize_fun = (config, loc, fields, type_name) => {
+ let arg = "inp";
+ open Ast_helper;
+ let record =
+ Exp.record(
+ fields
+ |> List.map((InputField({name, type_, loc})) => {
+ (
+ {txt: Longident.parse(name), loc: conv_loc(loc)},
+ [%expr
+ [%e serialize_type(type_)](
+ if%e (config.records) {
+ Exp.field(
+ Exp.constraint_(
+ ident_from_string(arg),
+ base_type_name(type_name),
+ ),
+ {
+ loc: Location.none,
+ Location.txt: Longident.parse(to_valid_ident(name)),
+ },
+ );
+ } else {
+ %expr
+ [%e ident_from_string(arg)]##[%e
+ ident_from_string(
+ to_valid_ident(name),
+ )
+ ];
+ },
+ )
+ ],
+ )
+ }),
+ None,
+ );
+ let record = !config.records ? record_to_object(loc, record) : record;
+ Ast_helper.(
+ Exp.fun_(
+ Nolabel,
+ None,
+ Pat.var(~loc=Location.none, {txt: arg, loc: Location.none}),
+ record,
+ )
+ );
+};
+
+let is_recursive = input_objects => {
+ List.length(input_objects) > 1;
+};
+
+let filter_map = f => {
+ let rec aux = accu =>
+ fun
+ | [] => List.rev(accu)
+ | [x, ...l] =>
+ switch (f(x)) {
+ | None => aux(accu, l)
+ | Some(v) => aux([v, ...accu], l)
+ };
+
+ aux([]);
+};
+
+let generate_serialize_variables =
+ (config, arg_type_defs: list(arg_type_def)) =>
+ switch (arg_type_defs) {
+ | [NoVariables] => Some([%stri let serializeVariables = () => ()])
+ | arg_type_defs =>
+ Some(
+ Ast_helper.(
+ Str.value(
+ is_recursive(arg_type_defs) ? Recursive : Nonrecursive,
+ arg_type_defs
+ |> filter_map(
+ fun
+ | InputObject({name, fields, loc}) =>
+ Some((name, fields, loc))
+ | NoVariables => None,
+ )
+ |> List.map(((name, fields, loc)) => {
+ let type_name =
+ switch (name) {
+ | None => "t_variables"
+ | Some(input_object_name) =>
+ "t_variables_" ++ input_object_name
+ };
+ [@metaloc conv_loc(loc)]
+ Vb.mk(
+ Pat.constraint_(
+ ~loc=conv_loc(loc),
+ Pat.var({
+ loc: conv_loc(loc),
+ txt:
+ switch (name) {
+ | None => "serializeVariables"
+ | Some(input_object_name) =>
+ "serializeInputObject" ++ input_object_name
+ },
+ }),
+ Typ.arrow(
+ ~loc=conv_loc(loc),
+ Nolabel,
+ base_type_name(type_name),
+ base_type_name("Raw." ++ type_name),
+ ),
+ ),
+ serialize_fun(config, loc, fields, type_name),
+ );
+ }),
+ )
+ ),
+ )
+ };
+
+/*
+ * Generate constructors for variables and for input types.
+ * If there are lots of optional variables this will generate a function with
+ * optional arguments, so you do not have to specify all variables if most are
+ * None.
+ *
+ * This also helps if you don't want the build to break if a optional variable
+ * is added.
+ *
+ * The makeVariables (root) yields Js.Json.t, the input types will yield
+ * unserialized contents, but if you use them inside of the makeVariables
+ * function, the end-result will be serialized.
+ */
+let generate_variable_constructors =
+ (config, arg_type_defs: list(arg_type_def)) => {
+ switch (arg_type_defs) {
+ | [NoVariables] => None
+ | _ =>
+ Some(
+ Ast_helper.(
+ Str.value(
+ Nonrecursive,
+ arg_type_defs
+ |> filter_map(
+ fun
+ | InputObject({name, fields, loc}) =>
+ Some((name, fields, loc))
+ | NoVariables => None,
+ )
+ |> List.map(((name, fields, loc)) => {
+ let rec make_labeled_fun = body =>
+ fun
+ | [] => [@metaloc loc |> conv_loc] [%expr (() => [%e body])]
+ | [InputField({name, loc, type_}), ...tl] => {
+ let name_loc = loc |> conv_loc;
+ Ast_helper.(
+ Exp.fun_(
+ ~loc=name_loc,
+ switch (type_) {
+ | List(_)
+ | Type(_) => Labelled(name)
+ | _ => Optional(name)
+ },
+ None,
+ Pat.var(~loc=name_loc, {txt: name, loc: name_loc}),
+ make_labeled_fun(body, tl),
+ )
+ );
+ };
+
+ let record =
+ Ast_helper.(
+ Exp.record(
+ ~loc=loc |> conv_loc,
+ fields
+ |> List.map((InputField({name, loc})) =>
+ (
+ {
+ Location.txt: Longident.parse(name),
+ loc: conv_loc(loc),
+ },
+ ident_from_string(name),
+ )
+ ),
+ None,
+ )
+ );
+
+ let object_ = record_to_object(loc, record);
+
+ let body =
+ Ast_helper.(
+ Exp.constraint_(
+ ~loc=conv_loc(loc),
+ config.records ? record : object_,
+ base_type_name(
+ switch (name) {
+ | None => "t_variables"
+ | Some(input_type_name) =>
+ "t_variables_" ++ input_type_name
+ },
+ ),
+ )
+ );
+
+ switch (name) {
+ | None =>
+ let make_variables_body =
+ Ast_helper.(
+ make_labeled_fun(
+ Exp.apply(
+ Exp.ident({
+ Location.txt:
+ Longident.Lident("serializeVariables"),
+ loc: conv_loc(loc),
+ }),
+ [(Nolabel, body)],
+ ),
+ fields,
+ )
+ );
+ if (config.legacy && name == None) {
+ let make_body =
+ make_labeled_fun(
+ [%expr
+ {
+ "query": query,
+ "variables": serializeVariables([%e body]),
+ "parse": parse,
+ }
+ ],
+ fields,
+ );
+
+ [
+ (Some("make"), loc, make_body),
+ (name, loc, make_variables_body),
+ ];
+ } else {
+ [(name, loc, make_variables_body)];
+ };
+
+ | Some(_) => [(name, loc, make_labeled_fun(body, fields))]
+ };
+ })
+ |> List.concat
+ |> List.map(((name, loc, expr)) => {
+ [@metaloc conv_loc(loc)]
+ Vb.mk(
+ Pat.var({
+ loc: conv_loc(loc),
+ txt:
+ switch (name) {
+ | None => "makeVariables"
+ | Some("make") => "make"
+ | Some(input_object_name) =>
+ "makeInputObject" ++ input_object_name
+ },
+ }),
+ expr,
+ )
+ }),
+ )
+ ),
+ )
+ };
+};
+
+let get_field = (is_object, key, existing_record, path) => {
+ is_object
+ ? [%expr value##[%e ident_from_string(to_valid_ident(key))]]
+ : [%expr
+ [%e
+ Ast_helper.(
+ Exp.field(
+ Exp.constraint_(
+ ident_from_string("value"),
+ base_type_name(
+ switch (existing_record) {
+ | None => generate_type_name(path)
+ | Some(existing) => existing
+ },
+ ),
+ ),
+ {loc: Location.none, txt: Longident.parse(to_valid_ident(key))},
+ )
+ )
+ ]
+ ];
+};
+
+let rec generate_nullable_encoder = (config, loc, inner, path, definition) =>
+ [@metaloc loc]
+ (
+ switch%expr (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ [%e generate_serializer(config, path, definition, None, inner)],
+ )
+ | None => Js.Nullable.null
+ }
+ )
+and generate_array_encoder = (config, loc, inner, path, definition) =>
+ [@metaloc loc]
+ [%expr
+ value
+ |> Js.Array.map(value => {
+ %e
+ generate_serializer(config, path, definition, None, inner)
+ })
+ ]
+and generate_poly_enum_encoder = (loc, enum_meta, omit_future_value) => {
+ open Ast_helper;
+ let enum_match_arms =
+ enum_meta.em_values
+ |> List.map(({evm_name, _}) =>
+ Exp.case(Pat.variant(evm_name, None), const_str_expr(evm_name))
+ );
+
+ let fallback_arm =
+ Exp.case(
+ Pat.variant("FutureAddedValue", Some(Pat.var({loc, txt: "other"}))),
+ ident_from_string("other"),
+ );
+
+ let match_expr =
+ Exp.match(
+ [%expr value],
+ List.concat([
+ enum_match_arms,
+ omit_future_value ? [] : [fallback_arm],
+ ]),
+ );
+
+ %expr
+ [%e match_expr];
+}
+and generate_custom_encoder = (config, loc, ident, inner, path, definition) =>
+ [@metaloc loc]
+ {
+ %expr
+ [%e ident_from_string(ident ++ ".serialize")](
+ [%e generate_serializer(config, path, definition, None, inner)],
+ );
+ }
+and generate_object_encoder =
+ (
+ config,
+ loc,
+ _name,
+ fields,
+ path,
+ definition,
+ existing_record,
+ typename,
+ force_record,
+ ) => {
+ open Ast_helper;
+ let do_obj_constructor_base = (is_object, wrap) => {
+ switch (
+ fields
+ |> filter_map(
+ fun
+ | Fr_fragment_spread(_, _, _, _, _) => None
+ | Fr_named_field({name, type_}) => Some((name, type_)),
+ )
+ ) {
+ | [] =>
+ %expr
+ Js.Dict.empty
+ | fields =>
+ let record =
+ Exp.record(
+ {
+ let fields =
+ // if the object is part of a union, it gets passed a typename
+ // the typename needs to exist on the raw type, because it is used
+ // to parse it into a union type. So if this is supplied, and
+ // typename is not already explicitly in the fields, add this.
+ if (typename != None
+ && !(
+ fields
+ |> List.exists(
+ fun
+ | ("__typename", _) => true
+ | _ => false,
+ )
+ )) {
+ [
+ ("__typename", Res_string(conv_loc_from_ast(loc))),
+ ...fields,
+ ];
+ } else {
+ fields;
+ };
+
+ fields
+ |> List.map(((key, _inner)) => {
+ let key_value = {
+ Location.txt: Longident.parse(to_valid_ident(key)),
+ loc,
+ };
+ switch (key, typename) {
+ | ("__typename", Some(typename)) => (
+ key_value,
+ const_str_expr(typename),
+ )
+ | _ => (key_value, ident_from_string(to_valid_ident(key)))
+ };
+ });
+ },
+ None,
+ );
+
+ let record = wrap ? record_to_object(loc, record) : record;
+
+ let bindings =
+ fields
+ |> List.map(((key, inner)) =>
+ Vb.mk(
+ Pat.var({txt: to_valid_ident(key), loc}),
+ {
+ // TODO: would be nice to pass the input instead of relying
+ // on a static identifier called `value`
+ let%expr value = [%e
+ get_field(is_object, key, existing_record, path)
+ ];
+ %e
+ generate_serializer(
+ config,
+ [key, ...path],
+ definition,
+ None,
+ inner,
+ );
+ },
+ )
+ )
+ |> List.rev;
+ Exp.let_(Nonrecursive, bindings, record);
+ };
+ };
+
+ let do_obj_constructor = with_objects =>
+ [@metaloc conv_loc(loc)]
+ {
+ do_obj_constructor_base(with_objects, true);
+ };
+
+ let do_obj_constructor_records = () =>
+ [@metaloc conv_loc(loc)]
+ {
+ Exp.constraint_(
+ do_obj_constructor_base(false, false),
+ base_type_name("Raw." ++ generate_type_name(path)),
+ );
+ };
+
+ // the fields and fragments needs to be deeply merged, the fragments in the
+ // reason types are separate fields (separated out from the raw output of
+ // the query).
+ //
+ // The fragments are responsible for generating the raw output for themselves
+ // using a serialize function per fragment. However when there are regular
+ // fields AND (possibly multiple) fragment spreads we need to deeply merge
+ // them to reconcile back to the canonical json representation.
+ //
+ // The deeply merge is done using a runtime function that is supplied with
+ // this PPX as the `GraphQL_PPX.deep_merge` function
+ //
+ // This also brings an important gotcha: if a field is duplicated between
+ // fragments, and it is changed in a particular frament, it is only changed
+ // in the raw representation if it is merged last. Unfortunately there is not
+ // really anything that we can do about this.
+
+ let merge_into_opaque = is_object => {
+ %expr
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ %e
+ do_obj_constructor(is_object);
+ },
+ ): Js.Json.t,
+ [%e
+ fields
+ |> List.fold_left(
+ acc =>
+ fun
+ | Fr_named_field(_) => acc
+ | Fr_fragment_spread(key, _loc, name, _, _arguments) => [
+ [%expr
+ (
+ Obj.magic(
+ [%e ident_from_string(name ++ ".serialize")](
+ [%e
+ get_field(
+ is_object,
+ key,
+ existing_record,
+ path,
+ )
+ ],
+ ),
+ ): Js.Json.t
+ )
+ ],
+ ...acc,
+ ],
+ [],
+ )
+ |> List.rev
+ |> Ast_helper.Exp.array
+ ],
+ ),
+ ): [%t
+ base_type_name("Raw." ++ generate_type_name(path))
+ ]
+ );
+ };
+
+ let has_fragment_spreads =
+ fields
+ |> List.exists(
+ fun
+ | Fr_fragment_spread(_) => true
+ | _ => false,
+ );
+
+ switch (has_fragment_spreads, config.records, existing_record, force_record) {
+ | (true, records, _, _) => merge_into_opaque(!records)
+ | (false, true, _, _) => do_obj_constructor_records()
+ | (false, false, _, true) => do_obj_constructor(false)
+ | (false, false, Some(_), _) => do_obj_constructor(false)
+ | (false, false, _, _) => do_obj_constructor(true)
+ };
+}
+and generate_poly_variant_union_encoder =
+ (
+ config,
+ _loc,
+ _name,
+ fragments,
+ _exhaustive,
+ omit_future_value,
+ path,
+ definition,
+ ) => {
+ open Ast_helper;
+ let fragment_cases =
+ fragments
+ |> List.map((({item: type_name}: Result_structure.name, inner)) => {
+ Ast_helper.(
+ Exp.case(
+ Pat.variant(
+ type_name,
+ Some(Pat.var({txt: "value", loc: Location.none})),
+ ),
+ [%expr
+ (
+ Obj.magic(
+ [%e
+ generate_serializer(
+ config,
+ [type_name, ...path],
+ definition,
+ Some(type_name),
+ inner,
+ )
+ ],
+ ): [%t
+ base_type_name("Raw." ++ generate_type_name(path))
+ ]
+ )
+ ],
+ )
+ )
+ });
+
+ let fallback_case =
+ Exp.case(
+ Pat.variant(
+ "FutureAddedValue",
+ Some(Pat.var({txt: "value", loc: Location.none})),
+ ),
+ [%expr
+ (
+ Obj.magic(value): [%t
+ base_type_name("Raw." ++ generate_type_name(path))
+ ]
+ )
+ ],
+ );
+
+ let typename_matcher =
+ Exp.match(
+ [%expr value],
+ List.concat([
+ fragment_cases,
+ omit_future_value ? [] : [fallback_case],
+ ]),
+ );
+
+ %expr
+ [%e typename_matcher];
+}
+and generate_poly_variant_selection_set_encoder =
+ (_config, _loc, _name, _fields, _path, _definition) => [%expr
+ Obj.magic(Js.Json.null)
+]
+and generate_poly_variant_interface_encoder =
+ (_config, _loc, _name, _base, _fragments, _path, _definition) => [%expr
+ Obj.magic(Js.Json.null)
+]
+and generate_solo_fragment_spread_encorder =
+ (_config, _loc, name, _arguments, _definition) => [%expr
+ [%e ident_from_string(name ++ ".serialize")](
+ [%e ident_from_string("value")],
+ )
+]
+
+and generate_error = (loc, message) => {
+ let loc = Output_bucklescript_utils.conv_loc(loc);
+ let ext = Ast_mapper.extension_of_error(Location.error(~loc, message));
+ let%expr _value = value;
+ %e
+ Ast_helper.Exp.extension(~loc, ext);
+}
+and generate_serializer = (config, path: list(string), definition, typename) =>
+ fun
+ | Res_nullable(loc, inner) =>
+ generate_nullable_encoder(config, conv_loc(loc), inner, path, definition)
+ | Res_array(loc, inner) =>
+ generate_array_encoder(config, conv_loc(loc), inner, path, definition)
+ | Res_id(loc) => raw_value(conv_loc(loc))
+ | Res_string(loc) => raw_value(conv_loc(loc))
+ | Res_int(loc) => raw_value(conv_loc(loc))
+ | Res_float(loc) => raw_value(conv_loc(loc))
+ | Res_boolean(loc) => raw_value(conv_loc(loc))
+ | Res_raw_scalar(loc) => raw_value(conv_loc(loc))
+ | Res_poly_enum(loc, enum_meta, omit_future_value) =>
+ generate_poly_enum_encoder(conv_loc(loc), enum_meta, omit_future_value)
+ | Res_custom_decoder(loc, ident, inner) =>
+ generate_custom_encoder(
+ config,
+ conv_loc(loc),
+ ident,
+ inner,
+ path,
+ definition,
+ )
+ | Res_record(loc, name, fields, existing_record) =>
+ generate_object_encoder(
+ config,
+ conv_loc(loc),
+ name,
+ fields,
+ path,
+ definition,
+ existing_record,
+ typename,
+ true,
+ )
+ | Res_object(loc, name, fields, existing_record) =>
+ generate_object_encoder(
+ config,
+ conv_loc(loc),
+ name,
+ fields,
+ path,
+ definition,
+ existing_record,
+ typename,
+ false,
+ )
+ | Res_poly_variant_union(
+ loc,
+ name,
+ fragments,
+ exhaustive,
+ omit_future_value,
+ ) =>
+ generate_poly_variant_union_encoder(
+ config,
+ conv_loc(loc),
+ name,
+ fragments,
+ exhaustive,
+ omit_future_value,
+ path,
+ definition,
+ )
+ | Res_poly_variant_selection_set(loc, name, fields) =>
+ generate_poly_variant_selection_set_encoder(
+ config,
+ conv_loc(loc),
+ name,
+ fields,
+ path,
+ definition,
+ )
+ | Res_poly_variant_interface(loc, name, base, fragments) =>
+ generate_poly_variant_interface_encoder(
+ config,
+ conv_loc(loc),
+ name,
+ base,
+ fragments,
+ [name, ...path],
+ definition,
+ )
+ | Res_solo_fragment_spread(loc, name, arguments) =>
+ generate_solo_fragment_spread_encorder(
+ config,
+ conv_loc(loc),
+ name,
+ arguments,
+ definition,
+ )
+ | Res_error(loc, message) => generate_error(loc, message);
diff --git a/src/bucklescript/output_bucklescript_types.re b/src/bucklescript/output_bucklescript_types.re
new file mode 100644
index 00000000..67244ded
--- /dev/null
+++ b/src/bucklescript/output_bucklescript_types.re
@@ -0,0 +1,800 @@
+open Migrate_parsetree;
+open Graphql_ppx_base;
+open Result_structure;
+open Extract_type_definitions;
+open Source_pos;
+open Output_bucklescript_utils;
+
+open Ast_408;
+open Parsetree;
+
+// duplicate of ouput_bucklescript_decoder
+let make_error_raiser = message =>
+ if (Ppx_config.verbose_error_handling()) {
+ %expr
+ Js.Exn.raiseError("graphql-ppx: " ++ [%e message]);
+ } else {
+ %expr
+ Js.Exn.raiseError("Unexpected GraphQL query response");
+ };
+// duplicate of ouput_bucklescript_decoder
+let const_str_expr = s => Ast_helper.(Exp.constant(Pconst_string(s, None)));
+
+let base_type = (~inner=[], ~loc=?, name) => {
+ Ast_helper.Typ.constr(
+ {
+ Location.txt: Longident.parse(name),
+ loc:
+ switch (loc) {
+ | None => Location.none
+ | Some(loc) => loc
+ },
+ },
+ inner,
+ );
+};
+
+// generate the type definition, including nullables, arrays etc.
+let rec generate_type = (~atLoc=?, config, path, raw) =>
+ fun
+ | Res_string(_loc) => base_type(~loc=?atLoc, "string")
+ | Res_nullable(_loc, inner) =>
+ if (raw) {
+ base_type(
+ ~inner=[generate_type(config, path, raw, inner)],
+ "Js.Nullable.t",
+ );
+ } else {
+ base_type(
+ ~loc=?atLoc,
+ ~inner=[generate_type(config, path, raw, inner)],
+ "option",
+ );
+ }
+ | Res_array(_loc, inner) =>
+ base_type(
+ ~loc=?atLoc,
+ ~inner=[generate_type(config, path, raw, inner)],
+ "array",
+ )
+ | Res_custom_decoder(_loc, module_name, inner) =>
+ if (raw) {
+ generate_type(config, path, raw, inner);
+ } else {
+ base_type(~loc=?atLoc, module_name ++ ".t");
+ }
+ | Res_id(_loc) => base_type(~loc=?atLoc, "string")
+ | Res_int(_loc) => {
+ base_type(~loc=?atLoc, "int");
+ }
+ | Res_float(_loc) => base_type(~loc=?atLoc, "float")
+ | Res_boolean(_loc) => base_type(~loc=?atLoc, "bool")
+ | Res_raw_scalar(_loc) => base_type(~loc=?atLoc, "Js.Json.t")
+ | Res_object(_loc, _name, _fields, type_name)
+ | Res_record(_loc, _name, _fields, type_name) =>
+ switch (type_name, raw) {
+ | (Some(type_name), false) => base_type(~loc=?atLoc, type_name)
+ | (_, _) => base_type(~loc=?atLoc, generate_type_name(path))
+ }
+ | Res_poly_variant_selection_set(_loc, _name, _)
+ | Res_poly_variant_union(_loc, _name, _, _, _)
+ | Res_poly_variant_interface(_loc, _name, _, _) => {
+ base_type(~loc=?atLoc, generate_type_name(path));
+ }
+ | Res_solo_fragment_spread(loc, module_name, _arguments) =>
+ if (raw) {
+ base_type(module_name ++ ".Raw.t");
+ } else {
+ base_type(~loc=conv_loc(loc), module_name ++ ".t");
+ }
+ | Res_error(loc, error) =>
+ raise(Location.Error(Location.error(~loc=conv_loc(loc), error)))
+ | Res_poly_enum(_loc, _enum_meta, _) =>
+ base_type(~loc=?atLoc, generate_type_name(path));
+
+let wrap_type_declaration = (~manifest=?, inner, _loc, path) => {
+ Ast_helper.Type.mk(
+ ~kind=inner,
+ ~manifest?,
+ {loc: Location.none, txt: generate_type_name(path)},
+ );
+};
+
+let generate_opaque = (path, _loc) => {
+ Ast_helper.Type.mk({loc: Location.none, txt: generate_type_name(path)});
+};
+
+let raw_opaque_object = fields => {
+ fields
+ |> List.exists(
+ fun
+ | Fragment(_) => true
+ | _ => false,
+ );
+};
+
+let already_has__typename = fields =>
+ List.exists(
+ fun
+ | Field({path: ["__typename", ..._]}) => true
+ | _ => false,
+ fields,
+ );
+
+let generate_record_type = (config, fields, obj_path, raw, loc, is_variant) => {
+ let record_fields =
+ fields
+ |> List.fold_left(
+ acc =>
+ fun
+ | Fragment({key, loc_key, module_name, type_name}) => [
+ Ast_helper.Type.field(
+ {Location.txt: key, loc: Location.none},
+ Ast_helper.Typ.constr(
+ {
+ Location.txt:
+ Longident.parse(
+ module_name
+ ++ ".t"
+ ++ (
+ switch (type_name) {
+ | None => ""
+ | Some(type_name) => "_" ++ type_name
+ }
+ ),
+ ),
+ loc: conv_loc(loc_key),
+ },
+ [],
+ ),
+ ),
+ ...acc,
+ ]
+ | Field({path: [name, ...path], type_, loc_key, arguments}) => {
+ // Add field to internal module
+ if (!raw) {
+ Output_bucklescript_docstrings.for_field_arguments(
+ config,
+ name
+ |> Schema.lookup_field(Schema.query_type(config.schema)),
+ arguments,
+ );
+ };
+ [
+ Ast_helper.Type.field(
+ {Location.txt: to_valid_ident(name), loc: Location.none},
+ generate_type(
+ ~atLoc=?raw ? None : Some(conv_loc(loc_key)),
+ config,
+ [name, ...path],
+ raw,
+ type_,
+ ),
+ ),
+ ...acc,
+ ];
+ }
+ | Field({path: [], loc}) =>
+ // I don't think this should ever happen but we need to
+ // cover this case, perhaps we can constrain the type
+ raise(
+ Location.Error(
+ Location.error(~loc=loc |> conv_loc, "No path"),
+ ),
+ ),
+ [],
+ )
+ |> List.rev;
+
+ let record_fields =
+ // if this is a variant in the parsed type and __typename is not explicitly
+ // requested, still add it (because the printer is added)
+ if (raw && is_variant && !already_has__typename(fields)) {
+ [
+ Ast_helper.Type.field(
+ {Location.txt: "__typename", loc: Location.none},
+ base_type_name("string"),
+ ),
+ ...record_fields,
+ ];
+ } else {
+ record_fields;
+ };
+
+ raw && raw_opaque_object(fields)
+ ? generate_opaque(obj_path, loc)
+ : wrap_type_declaration(Ptype_record(record_fields), loc, obj_path);
+};
+
+let generate_variant_selection = (config, fields, path, loc, raw) =>
+ if (raw) {
+ generate_opaque(path, loc);
+ } else {
+ wrap_type_declaration(
+ Ptype_abstract,
+ ~manifest=
+ Ast_helper.(
+ Typ.variant(
+ fields
+ |> List.map(((name: Result_structure.name, res)) =>
+ {
+ prf_desc:
+ Rtag(
+ {
+ txt: Compat.capitalize_ascii(name.item),
+ loc: Location.none,
+ },
+ false,
+ [
+ generate_type(
+ ~atLoc=
+ conv_loc(
+ config.Generator_utils.map_loc(name.span),
+ ),
+ config,
+ [name.item, ...path],
+ raw,
+ res,
+ ),
+ ],
+ ),
+ prf_loc: Location.none,
+ prf_attributes: [],
+ }
+ ),
+ Closed,
+ None,
+ )
+ ),
+ loc,
+ path,
+ );
+ };
+
+let generate_variant_union =
+ (
+ config,
+ fields: list((Result_structure.name, Result_structure.t)),
+ omit_future_value,
+ path,
+ loc,
+ raw,
+ ) =>
+ if (raw) {
+ generate_opaque(path, loc);
+ } else {
+ let fallback_case_ty =
+ omit_future_value
+ ? []
+ : [
+ {
+ prf_desc:
+ Rtag(
+ {txt: "FutureAddedValue", loc: conv_loc(loc)},
+ false,
+ [base_type("Js.Json.t")],
+ ),
+ prf_loc: conv_loc(loc),
+ prf_attributes: [],
+ },
+ ];
+
+ let fragment_case_tys =
+ fields
+ |> List.map(((name, res)) =>
+ {
+ prf_desc:
+ Rtag(
+ {txt: name.item, loc: conv_loc(loc)},
+ false,
+ [
+ generate_type(
+ ~atLoc=
+ conv_loc(config.Generator_utils.map_loc(name.span)),
+ config,
+ [name.item, ...path],
+ raw,
+ res,
+ ),
+ ],
+ ),
+ prf_loc: conv_loc(loc),
+ prf_attributes: [],
+ }
+ );
+
+ wrap_type_declaration(
+ Ptype_abstract,
+ ~manifest=
+ Ast_helper.(
+ Typ.variant(
+ List.concat([fallback_case_ty, fragment_case_tys]),
+ Closed,
+ None,
+ )
+ ),
+ loc,
+ path,
+ );
+ };
+
+let generate_variant_interface = (config, fields, base, path, loc, raw) =>
+ if (raw) {
+ generate_opaque(path, loc);
+ } else {
+ let map_case_ty = ((name, res)) => {
+ prf_desc:
+ Rtag(
+ {txt: name, loc: conv_loc(loc)},
+ false,
+ [generate_type(config, [name, ...path], raw, res)],
+ ),
+ prf_loc: conv_loc(loc),
+ prf_attributes: [],
+ };
+
+ let fallback_case_ty = map_case_ty(base);
+ let fragment_case_tys = fields |> List.map(map_case_ty);
+
+ wrap_type_declaration(
+ Ptype_abstract,
+ ~manifest=
+ Ast_helper.(
+ Typ.variant([fallback_case_ty, ...fragment_case_tys], Closed, None)
+ ),
+ loc,
+ path,
+ );
+ };
+
+let generate_enum = (_config, fields, path, loc, raw, omit_future_value) =>
+ wrap_type_declaration(
+ Ptype_abstract,
+ ~manifest=
+ if (raw) {
+ base_type("string");
+ } else {
+ [@metaloc conv_loc(loc)]
+ Ast_helper.(
+ Typ.variant(
+ List.append(
+ omit_future_value
+ ? []
+ : [
+ {
+ prf_desc:
+ Rtag(
+ {txt: "FutureAddedValue", loc: conv_loc(loc)},
+ false,
+ [base_type("string")],
+ ),
+ prf_loc: conv_loc(loc),
+ prf_attributes: [],
+ },
+ ],
+ fields
+ |> List.map(field =>
+ {
+ prf_desc:
+ Rtag(
+ {txt: to_valid_ident(field), loc: conv_loc(loc)},
+ true,
+ [],
+ ),
+ prf_loc: conv_loc(loc),
+ prf_attributes: [],
+ }
+ ),
+ ),
+ Closed,
+ None,
+ )
+ );
+ },
+ loc,
+ path,
+ );
+
+let generate_object_type = (config, fields, obj_path, raw, loc, is_variant) => {
+ let object_fields =
+ fields
+ |> List.fold_left(
+ acc =>
+ fun
+ | Fragment({key, loc_key, module_name, type_name}) => [
+ {
+ pof_desc:
+ Otag(
+ {txt: key, loc: Location.none},
+ Ast_helper.Typ.constr(
+ {
+ Location.txt:
+ Longident.parse(
+ module_name
+ ++ ".t"
+ ++ (
+ switch (type_name) {
+ | None => ""
+ | Some(type_name) => "_" ++ type_name
+ }
+ ),
+ ),
+ loc: conv_loc(loc_key),
+ },
+ [],
+ ),
+ ),
+ pof_loc: Location.none,
+ pof_attributes: [],
+ },
+ ...acc,
+ ]
+
+ | Field({path: [name, ...path], loc_key, type_}) => [
+ {
+ pof_desc:
+ Otag(
+ {txt: to_valid_ident(name), loc: Location.none},
+ generate_type(
+ ~atLoc=?raw ? None : Some(conv_loc(loc_key)),
+ config,
+ [name, ...path],
+ raw,
+ type_,
+ ),
+ ),
+ pof_loc: Location.none,
+ pof_attributes: [],
+ },
+ ...acc,
+ ]
+ | Field({path: [], loc}) =>
+ // I don't think this should ever happen but we need to
+ // cover this case, perhaps we can constrain the type
+ raise(
+ Location.Error(
+ Location.error(~loc=loc |> conv_loc, "No path"),
+ ),
+ ),
+ [],
+ )
+ |> List.rev;
+
+ let object_fields =
+ // if this is a variant in the parsed type and __typename is not explicitly
+ // requested, still add it (because the printer is added)
+ if (raw && is_variant && !already_has__typename(fields)) {
+ [
+ {
+ pof_desc:
+ Otag(
+ {txt: to_valid_ident("__typename"), loc: Location.none},
+ base_type_name("string"),
+ ),
+ pof_loc: Location.none,
+ pof_attributes: [],
+ },
+ ...object_fields,
+ ];
+ } else {
+ object_fields;
+ };
+
+ raw && raw_opaque_object(fields)
+ ? generate_opaque(obj_path, loc)
+ : wrap_type_declaration(
+ ~manifest=
+ Ast_helper.(
+ Typ.constr(
+ {Location.txt: Longident.parse("Js.t"), loc: Location.none},
+ [Ast_helper.Typ.object_(object_fields, Closed)],
+ )
+ ),
+ Ptype_abstract,
+ loc,
+ obj_path,
+ );
+};
+
+let generate_graphql_object =
+ (
+ config: Generator_utils.output_config,
+ fields,
+ obj_path,
+ force_record,
+ raw,
+ loc,
+ is_variant,
+ ) => {
+ config.records || force_record
+ ? generate_record_type(config, fields, obj_path, raw, loc, is_variant)
+ : generate_object_type(config, fields, obj_path, raw, loc, is_variant);
+};
+
+// generate all the types necessary types that we later refer to by name.
+let generate_types =
+ (config: Generator_utils.output_config, res, raw, fragment_name) => {
+ let types =
+ extract(~path=[], ~raw, res)
+ |> List.map(
+ fun
+ | Object({fields, path: obj_path, force_record, loc, variant_parent}) =>
+ generate_graphql_object(
+ config,
+ fields,
+ obj_path,
+ force_record,
+ raw,
+ loc,
+ variant_parent,
+ )
+ | VariantSelection({loc, path, fields}) =>
+ generate_variant_selection(config, fields, path, loc, raw)
+ | VariantUnion({loc, path, fields, omit_future_value}) =>
+ generate_variant_union(
+ config,
+ fields,
+ omit_future_value,
+ path,
+ loc,
+ raw,
+ )
+ | VariantInterface({loc, path, base, fields}) =>
+ generate_variant_interface(config, fields, base, path, loc, raw)
+ | Enum({loc, path, fields, omit_future_value}) =>
+ generate_enum(config, fields, path, loc, raw, omit_future_value),
+ )
+ |> List.rev;
+
+ let types =
+ types |> List.map(type_ => Ast_helper.Str.type_(Recursive, [type_]));
+ switch (fragment_name) {
+ | Some((fragment_name, fragment_name_loc)) =>
+ List.append(
+ types,
+ [
+ Ast_helper.(
+ Str.type_(
+ Nonrecursive,
+ [
+ Type.mk(
+ ~manifest=
+ Typ.constr(
+ raw
+ ? Location.mknoloc(Longident.Lident("t"))
+ : Location.mkloc(
+ Longident.Lident("t"),
+ conv_loc(config.map_loc(fragment_name_loc)),
+ ),
+ [],
+ ),
+ Location.mknoloc("t_" ++ fragment_name),
+ ),
+ ],
+ )
+ ),
+ ],
+ )
+ | None => types
+ };
+};
+
+let rec generate_arg_type = (raw, originalLoc) => {
+ let loc = raw ? None : Some(conv_loc(originalLoc));
+ fun
+ | Type(Scalar({sm_name: "ID"}))
+ | Type(Scalar({sm_name: "String"})) => base_type(~loc?, "string")
+ | Type(Scalar({sm_name: "Int"})) => base_type(~loc?, "int")
+ | Type(Scalar({sm_name: "Float"})) => base_type(~loc?, "float")
+ | Type(Scalar({sm_name: "Boolean"})) => base_type(~loc?, "bool")
+ | Type(Scalar({sm_name: _})) => base_type(~loc?, "Js.Json.t")
+ | Type(Enum(enum_meta)) =>
+ if (raw) {
+ base_type("string");
+ } else {
+ Graphql_ppx_base__.Schema.(
+ Ast_helper.(
+ Typ.variant(
+ ~loc?,
+ enum_meta.em_values
+ |> List.map(({evm_name, _}) =>
+ {
+ prf_desc:
+ Rtag({txt: evm_name, loc: Location.none}, true, []),
+ prf_loc: Location.none,
+ prf_attributes: [],
+ }
+ ),
+ Closed,
+ None,
+ )
+ )
+ );
+ }
+ | Type(InputObject({iom_name})) =>
+ base_type(~loc?, generate_type_name(~prefix="t_variables", [iom_name]))
+ | Type(Object(_)) =>
+ raise(
+ Location.Error(
+ Location.error(
+ ~loc=originalLoc |> conv_loc,
+ "Object not allowed in args",
+ ),
+ ),
+ )
+ | Type(Union(_)) =>
+ raise(
+ Location.Error(
+ Location.error(
+ ~loc=originalLoc |> conv_loc,
+ "Union not allowed in args",
+ ),
+ ),
+ )
+ | Type(Interface(_)) =>
+ raise(
+ Location.Error(
+ Location.error(
+ ~loc=originalLoc |> conv_loc,
+ "Interface not allowed in args",
+ ),
+ ),
+ )
+ | Nullable(inner) =>
+ base_type(
+ ~loc?,
+ ~inner=[
+ generate_arg_type(raw, conv_loc_from_ast(Location.none), inner),
+ ],
+ raw ? "Js.Nullable.t" : "option",
+ )
+ | List(inner) =>
+ base_type(
+ ~loc?,
+ ~inner=[
+ generate_arg_type(raw, conv_loc_from_ast(Location.none), inner),
+ ],
+ "array",
+ )
+ | TypeNotFound(name) =>
+ raise(
+ Location.Error(
+ Location.error(
+ ~loc=originalLoc |> conv_loc,
+ "Type " ++ name ++ " not found!",
+ ),
+ ),
+ );
+};
+
+let generate_empty_input_object = () => {
+ Ast_helper.Type.mk(
+ ~manifest=base_type_name("unit"),
+ {loc: Location.none, txt: generate_type_name(~prefix="t_variables", [])},
+ );
+};
+
+let generate_record_input_object = (raw, input_obj_name, fields) => {
+ Ast_helper.Type.mk(
+ ~kind=
+ Ptype_record(
+ fields
+ |> List.map(
+ fun
+ | InputField({name, type_, loc}) => {
+ Ast_helper.Type.field(
+ {Location.txt: name, loc: Location.none},
+ generate_arg_type(
+ raw,
+ {
+ ...loc,
+ loc_ghost:
+ switch (input_obj_name) {
+ | None => false
+ | Some(_) => true
+ },
+ },
+ type_,
+ ),
+ );
+ },
+ ),
+ ),
+ {
+ loc: Location.none,
+ txt:
+ generate_type_name(
+ ~prefix="t_variables",
+ switch (input_obj_name) {
+ | None => []
+ | Some(name) => [name]
+ },
+ ),
+ },
+ );
+};
+
+let generate_object_input_object = (raw, input_obj_name, fields) => {
+ Ast_helper.(
+ Type.mk(
+ ~kind=Ptype_abstract,
+ ~manifest=
+ Typ.constr(
+ {Location.txt: Longident.parse("Js.t"), loc: Location.none},
+ [
+ Ast_helper.Typ.object_(
+ fields
+ |> List.map((InputField({name, type_, loc})) =>
+ {
+ pof_desc:
+ Otag(
+ {txt: name, loc: Location.none},
+ generate_arg_type(raw, loc, type_),
+ ),
+ pof_loc: Location.none,
+ pof_attributes: [],
+ }
+ ),
+ Closed,
+ ),
+ ],
+ ),
+ {
+ loc: Location.none,
+ txt:
+ generate_type_name(
+ ~prefix="t_variables",
+ switch (input_obj_name) {
+ | None => []
+ | Some(name) => [name]
+ },
+ ),
+ },
+ )
+ );
+};
+
+let generate_input_object =
+ (raw, config: Generator_utils.output_config, input_obj_name, fields) => {
+ config.records
+ ? generate_record_input_object(raw, input_obj_name, fields)
+ : generate_object_input_object(raw, input_obj_name, fields);
+};
+
+let generate_arg_types = (raw, config, variable_defs) => {
+ let input_objects = extract_args(config, variable_defs);
+
+ // Add to internal module
+ if (!raw) {
+ input_objects
+ |> List.iter(
+ fun
+ | NoVariables => ()
+ | InputObject({name, fields}) => {
+ switch (name) {
+ | None =>
+ fields
+ |> List.iter(field => {
+ Output_bucklescript_docstrings.for_input_constraint(
+ config,
+ field,
+ )
+ })
+ | Some(_) => ()
+ };
+ },
+ );
+ };
+
+ [
+ input_objects
+ |> List.map(
+ fun
+ | NoVariables => generate_empty_input_object()
+ | InputObject({name, fields}) => {
+ generate_input_object(raw, config, name, fields);
+ },
+ )
+ |> Ast_helper.Str.type_(Recursive),
+ ];
+};
diff --git a/src/bucklescript/output_bucklescript_unifier.re b/src/bucklescript/output_bucklescript_unifier.re
deleted file mode 100644
index 1831b4eb..00000000
--- a/src/bucklescript/output_bucklescript_unifier.re
+++ /dev/null
@@ -1,165 +0,0 @@
-open Migrate_parsetree;
-open Graphql_ppx_base;
-open Graphql_ast;
-open Source_pos;
-open Generator_utils;
-
-open Ast_408;
-open Parsetree;
-open Asttypes;
-
-open Type_utils;
-open Output_bucklescript_utils;
-
-exception Unimplemented(string);
-
-let make_make_fun = (config, variable_defs) => {
- let make_tuple = (_loc, _variables, compose) => [%expr
- (
- parse,
- ppx_printed_query,
- graphql_ppx_use_json_variables_fn => [%e compose],
- )
- ];
-
- let make_make_triple = (loc, variables) =>
- Ast_helper.Exp.extension(
- ~loc,
- (
- {txt: "bs.obj", loc},
- PStr([
- [@metaloc loc]
- [%stri
- {query: ppx_printed_query, variables: [%e variables], parse}
- ],
- ]),
- ),
- );
-
- switch (variable_defs) {
- | Some({item, span}) =>
- let rec make_labelled_function = (defs, body) =>
- switch (defs) {
- | [] =>
- [@metaloc config.map_loc(span) |> conv_loc] [%expr (() => [%e body])]
- | [(name, def), ...tl] =>
- let name_loc = config.map_loc(name.span) |> conv_loc;
- Ast_helper.(
- Exp.fun_(
- ~loc=name_loc,
- switch (def.vd_type.item) {
- | Tr_non_null_list(_)
- | Tr_non_null_named(_) => Labelled(name.item)
- | Tr_list(_)
- | Tr_named(_) => Optional(name.item)
- },
- None,
- Pat.var(~loc=name_loc, {txt: name.item, loc: name_loc}),
- make_labelled_function(tl, body),
- )
- );
- };
-
- let make_object_function = (defs, body) => {
- let rec generate_bindings = defs =>
- switch (defs) {
- | [] => body
- | [(name, _), ...tl] =>
- let name_loc = config.map_loc(name.span) |> conv_loc;
- Ast_helper.Exp.let_(
- ~loc=name_loc,
- Nonrecursive,
- [
- Ast_helper.(
- Vb.mk(
- ~loc=name_loc,
- Pat.var(~loc=name_loc, {txt: name.item, loc: name_loc}),
- [%expr
- variables##[%e
- Exp.ident({
- txt: Longident.Lident(name.item),
- loc: name_loc,
- })
- ]
- ],
- )
- ),
- ],
- generate_bindings(tl),
- );
- };
-
- %expr
- (variables => [%e generate_bindings(defs)]);
- };
-
- let make_var_ctor = defs =>
- defs
- |> List.map(((name, def)) => {
- let parser_ =
- Output_bucklescript_encoder.parser_for_type(
- config.schema,
- config.map_loc(name.span),
- to_native_type_ref(to_schema_type_ref(def.vd_type.item)),
- );
- let loc = config.map_loc(name.span) |> conv_loc;
- [@metaloc loc]
- [%expr
- (
- [%e
- Ast_helper.Exp.constant(
- ~loc,
- Pconst_string(name.item, None),
- )
- ],
- [%e parser_](
- [%e
- Ast_helper.Exp.ident(
- ~loc,
- {txt: Longident.parse(name.item), loc},
- )
- ],
- ),
- )
- ];
- })
- |> Ast_helper.Exp.array;
- let loc = config.map_loc(span) |> conv_loc;
- let variable_ctor_body =
- [@metaloc loc]
- [%expr
- Js.Json.object_(
- [%e make_var_ctor(item)]
- |> [%e Output_bucklescript_encoder.filter_out_null_values]
- |> Js.Dict.fromArray,
- )
- ];
-
- let user_function =
- make_labelled_function(
- item,
- [%expr graphql_ppx_use_json_variables_fn([%e variable_ctor_body])],
- );
-
- (
- make_labelled_function(item, make_make_triple(loc, variable_ctor_body)),
- make_object_function(item, make_make_triple(loc, variable_ctor_body)),
- make_labelled_function(item, variable_ctor_body),
- make_tuple(loc, variable_ctor_body, user_function),
- );
- | None => (
- [%expr
- (() => [%e make_make_triple(Location.none, [%expr Js.Json.null])])
- ],
- [%expr
- (
- (_: Js.t({.})) => [%e
- make_make_triple(Location.none, [%expr Js.Json.null])
- ]
- )
- ],
- [%expr (() => [%e [%expr Js.Json.null]])],
- [%expr [%e make_tuple(Location.none, [%expr Js.Json.null], [%expr 0])]],
- )
- };
-};
diff --git a/src/bucklescript/output_bucklescript_utils.re b/src/bucklescript/output_bucklescript_utils.re
index 45522d80..7cc2d197 100644
--- a/src/bucklescript/output_bucklescript_utils.re
+++ b/src/bucklescript/output_bucklescript_utils.re
@@ -1,4 +1,6 @@
open Graphql_ppx_base;
+open Migrate_parsetree;
+open Ast_408;
let conv_pos = pos => {
Lexing.pos_fname: pos.Source_pos.pos_fname,
@@ -25,3 +27,96 @@ let conv_loc_from_ast = loc => {
Source_pos.loc_end: conv_pos_from_ast(loc.Location.loc_end),
Source_pos.loc_ghost: loc.Location.loc_ghost,
};
+
+let extend_loc_from_start = (loc: Location.t, cnum) => {
+ {
+ ...loc,
+ loc_end: {
+ ...loc.loc_start,
+ pos_cnum: loc.loc_start.pos_cnum + cnum,
+ },
+ };
+};
+
+let base_type_name = name =>
+ Ast_helper.(
+ Typ.constr({txt: Longident.parse(name), loc: Location.none}, [])
+ );
+let const_str_expr = s => Ast_helper.(Exp.constant(Pconst_string(s, None)));
+let const_str_pat = s => Ast_helper.(Pat.constant(Pconst_string(s, None)));
+let ident_from_string = (~loc=Location.none, ident) =>
+ Ast_helper.(Exp.ident(~loc, {txt: Longident.parse(ident), loc}));
+
+let to_valid_ident = ident =>
+ if (ident.[0] >= '0' && ident.[0] <= '9') {
+ "_" ++ ident;
+ } else {
+ // from gist of sgrove, source:
+ // https://gist.github.com/sgrove/335bf1759d8d2f685dfea80d4e6afac7
+ [
+ "and",
+ "as",
+ "asr",
+ "assert",
+ "begin",
+ "class",
+ "constraint",
+ "do",
+ "done",
+ "downto",
+ "else",
+ "end",
+ "esfun",
+ "exception",
+ "external",
+ "false",
+ "for",
+ "fun",
+ "function",
+ "functor",
+ "if",
+ "in",
+ "include",
+ "inherit",
+ "initializer",
+ "land",
+ "lazy",
+ "let",
+ "lor",
+ "lsl",
+ "lsr",
+ "lxor",
+ "match",
+ "method",
+ "mod",
+ "module",
+ "mutable",
+ "new",
+ "nonrec",
+ "object",
+ "of",
+ "open",
+ "open!",
+ "or",
+ "pri",
+ "private",
+ "pub",
+ "public",
+ "rec",
+ "sig",
+ "struct",
+ "switch",
+ "then",
+ "to",
+ "true",
+ "try",
+ "type",
+ "val",
+ "virtual",
+ "when",
+ "while",
+ "with",
+ ]
+ |> List.exists(reserved_word => ident == reserved_word)
+ ? ident ++ "_" : ident;
+ };
diff --git a/src/bucklescript_bin/Bin.re b/src/bucklescript_bin/Bin.re
index fdfabfa2..8eda5fff 100644
--- a/src/bucklescript_bin/Bin.re
+++ b/src/bucklescript_bin/Bin.re
@@ -1,5 +1,3 @@
-open Migrate_parsetree;
-
let argv =
switch (Sys.argv |> Array.to_list) {
| [program, ...rest] =>
diff --git a/src/native/dune b/src/native/dune
index 24186daa..157d8696 100644
--- a/src/native/dune
+++ b/src/native/dune
@@ -3,5 +3,7 @@
(public_name graphql_ppx)
(kind ppx_rewriter)
(libraries reason ocaml-migrate-parsetree graphql_ppx_base)
+ (flags
+ (:standard -w -9))
(preprocess
(pps ppx_tools_versioned.metaquot_408)))
diff --git a/src/native/graphql_ppx.re b/src/native/graphql_ppx.re
index 2bda8c50..236b60d6 100644
--- a/src/native/graphql_ppx.re
+++ b/src/native/graphql_ppx.re
@@ -6,22 +6,37 @@ open Output_native_utils;
let argv = Sys.argv |> Array.to_list;
-let add_pos = (delimLength, base, pos) => {
- pos_fname: base.pos_fname,
- pos_lnum: base.pos_lnum + pos.line,
- pos_bol: 0,
- pos_cnum:
- if (pos.line == 0) {
- delimLength + pos.col;
- } else {
- pos.col;
- },
-};
-
let add_loc = (delimLength, base, span) => {
- loc_start: add_pos(delimLength, base.loc_start, fst(span)),
- loc_end: add_pos(delimLength, base.loc_start, snd(span)),
- loc_ghost: false,
+ let (_, _, col) = Location.get_pos_info(conv_pos(base.loc_start));
+ let pos_bol_start =
+ base.loc_start.pos_bol
+ + col
+ + delimLength
+ + fst(span).index
+ - fst(span).col;
+ let pos_bol_end =
+ base.loc_start.pos_bol
+ + col
+ + delimLength
+ + snd(span).index
+ - snd(span).col;
+ let start = pos_bol_start + fst(span).col;
+ let end_ = pos_bol_end + snd(span).col;
+ {
+ loc_start: {
+ pos_fname: base.loc_start.pos_fname,
+ pos_lnum: base.loc_start.pos_lnum + fst(span).line,
+ pos_bol: pos_bol_start,
+ pos_cnum: start,
+ },
+ loc_end: {
+ pos_fname: base.loc_start.pos_fname,
+ pos_lnum: base.loc_start.pos_lnum + snd(span).line,
+ pos_bol: pos_bol_end,
+ pos_cnum: end_,
+ },
+ loc_ghost: false,
+ };
};
let fmt_lex_err = err =>
@@ -111,9 +126,15 @@ let rewrite_query = (~schema=?, ~loc, ~delim, ~query, ()) => {
full_document: document,
/* the only call site of schema, make it lazy! */
schema: Lazy.force(Read_schema.get_schema(schema)),
+ template_tag: (None, None, None),
+ records: false,
+ inline: false,
+ legacy: false,
+ future_added_value: Ppx_config.future_added_value(),
+ extend: None,
};
switch (Validations.run_validators(config, document)) {
- | Some(errs) =>
+ | (Some(errs), _) =>
Ast_helper.Mod.mk(
Pmod_structure(
List.map(
@@ -126,7 +147,16 @@ let rewrite_query = (~schema=?, ~loc, ~delim, ~query, ()) => {
),
),
)
- | None =>
+ | (None, warnings) =>
+ warnings
+ |> List.iter(((loc, message)) => {
+ let loc = conv_loc(loc);
+ Location.print_warning(
+ loc,
+ Location.formatter_for_warnings^,
+ Warnings.Preprocessor(message),
+ );
+ });
let parts = Result_decoder.unify_document_schema(config, document);
Output_native_module.generate_modules(config, parts);
};
@@ -185,7 +215,20 @@ let () =
let loc = conv_loc(loc);
raise(Location.Error(Location.error(~loc, message)));
},
- lean_parse: false,
+ records: false,
+ legacy: true,
+ template_tag: None,
+ template_tag_location: None,
+ template_tag_import: None,
+ custom_fields: Hashtbl.create(0),
+ future_added_value: true,
+ extend_query: None,
+ extend_query_no_required_variables: None,
+ extend_mutation: None,
+ extend_mutation_no_required_variables: None,
+ extend_subscription: None,
+ extend_subscription_no_required_variables: None,
+ extend_fragment: None,
})
);
@@ -269,7 +312,20 @@ let mapper = (_config, _cookies) => {
);
};
+let argKey = ref("");
let args = [
+ (
+ "-custom-field",
+ Arg.Tuple([
+ Arg.String(key => {argKey := key}),
+ Arg.String(
+ moduleKey => {
+ Hashtbl.add(Ppx_config.custom_fields(), argKey^, moduleKey)
+ },
+ ),
+ ]),
+ "Adds a global custom field decoder/serializer (format: -custom-field ScalarType Module)",
+ ),
(
"-verbose",
Arg.Unit(
@@ -296,6 +352,14 @@ let args = [
),
"",
),
+ (
+ "-future-added-value",
+ Arg.Bool(
+ future_added_value =>
+ Ppx_config.update_config(current => {...current, future_added_value}),
+ ),
+ "Omits the `FutureAddedValue variant for enums if set to false",
+ ),
(
"-ast-out",
Arg.Bool(
diff --git a/src/native/output_native_decoder.re b/src/native/output_native_decoder.re
index 454b0146..ebe70741 100644
--- a/src/native/output_native_decoder.re
+++ b/src/native/output_native_decoder.re
@@ -15,7 +15,7 @@ let const_str_expr = s => Ast_helper.(Exp.constant(Pconst_string(s, None)));
let make_error_raiser = message =>
if (Ppx_config.verbose_error_handling()) {
%expr
- raise(Failure("graphql_ppx: " ++ [%e message]));
+ raise(Failure("graphql-ppx: " ++ [%e message]));
} else {
%expr
raise(Failure("Unexpected GraphQL query response"));
@@ -168,17 +168,17 @@ let rec generate_decoder = config =>
| Res_float(loc) => float_decoder(conv_loc(loc))
| Res_boolean(loc) => boolean_decoder(conv_loc(loc))
| Res_raw_scalar(_loc) => [%expr value]
- | Res_poly_enum(loc, enum_meta) =>
+ | Res_poly_enum(loc, enum_meta, _) =>
generate_poly_enum_decoder(conv_loc(loc), enum_meta)
| Res_custom_decoder(loc, ident, inner) =>
generate_custom_decoder(config, conv_loc(loc), ident, inner)
- | Res_record(loc, name, fields) =>
+ | Res_record(loc, name, fields, _) =>
generate_record_decoder(config, conv_loc(loc), name, fields)
- | Res_object(loc, name, fields) =>
+ | Res_object(loc, name, fields, _) =>
generate_object_decoder(config, conv_loc(loc), name, fields)
| Res_poly_variant_selection_set(loc, name, fields) =>
generate_poly_variant_selection_set(config, conv_loc(loc), name, fields)
- | Res_poly_variant_union(loc, name, fragments, exhaustive) =>
+ | Res_poly_variant_union(loc, name, fragments, exhaustive, _) =>
generate_poly_variant_union(
config,
conv_loc(loc),
@@ -194,7 +194,7 @@ let rec generate_decoder = config =>
base,
fragments,
)
- | Res_solo_fragment_spread(loc, name) =>
+ | Res_solo_fragment_spread(loc, name, _arguments) =>
generate_solo_fragment_spread(conv_loc(loc), name)
| Res_error(loc, message) => generate_error(conv_loc(loc), message)
and generate_nullable_decoder = (config, loc, inner) =>
@@ -229,7 +229,10 @@ and generate_array_decoder = (config, loc, inner) =>
and generate_custom_decoder = (config, loc, ident, inner) => {
let fn_expr =
Ast_helper.(
- Exp.ident({loc: Location.none, txt: Longident.parse(ident)})
+ Exp.ident({
+ loc: Location.none,
+ txt: Longident.parse(ident ++ ".parse"),
+ })
);
[@metaloc loc] [%expr [%e fn_expr]([%e generate_decoder(config, inner)])];
}
@@ -256,8 +259,8 @@ and generate_record_decoder = (config, loc, name, fields) => {
fields
|> filter_map(
fun
- | Fr_named_field(field, _, _) =>
- Some(Pat.var({loc, txt: "field_" ++ field}))
+ | Fr_named_field({name}) =>
+ Some(Pat.var({loc, txt: "field_" ++ name}))
| Fr_fragment_spread(_) => None,
)
|> Pat.tuple
@@ -268,7 +271,7 @@ and generate_record_decoder = (config, loc, name, fields) => {
fields
|> filter_map(
fun
- | Fr_named_field(field, loc, inner) => {
+ | Fr_named_field({name as field, loc, type_: inner}) => {
let loc = conv_loc(loc);
[@metaloc loc]
Some(
@@ -304,7 +307,7 @@ and generate_record_decoder = (config, loc, name, fields) => {
fields
|> List.map(
fun
- | Fr_named_field(field, loc, _) => {
+ | Fr_named_field({name: field, loc}) => {
let loc = conv_loc(loc);
(
{Location.loc, txt: Longident.Lident(field)},
@@ -314,7 +317,7 @@ and generate_record_decoder = (config, loc, name, fields) => {
),
);
}
- | Fr_fragment_spread(field, loc, name) => {
+ | Fr_fragment_spread(field, loc, name, _, _arguments) => {
let loc = conv_loc(loc);
(
{Location.loc, txt: Longident.Lident(field)},
@@ -347,7 +350,7 @@ and generate_record_decoder = (config, loc, name, fields) => {
)
};
}
-and generate_object_decoder = (config, loc, name, fields) =>
+and generate_object_decoder = (config, loc, _name, fields) =>
[@metaloc loc]
(
switch%expr (value) {
@@ -359,7 +362,7 @@ and generate_object_decoder = (config, loc, name, fields) =>
Pat.any(),
List.map(
fun
- | Fr_named_field(key, _, inner) =>
+ | Fr_named_field({name as key, type_: inner}) =>
Cf.method(
{txt: key, loc: Location.none},
Public,
@@ -387,7 +390,7 @@ and generate_object_decoder = (config, loc, name, fields) =>
},
),
)
- | Fr_fragment_spread(key, loc, name) => {
+ | Fr_fragment_spread(key, loc, name, _, _) => {
let loc = conv_loc(loc);
Cf.method(
{txt: key, loc: Location.none},
@@ -415,7 +418,7 @@ and generate_object_decoder = (config, loc, name, fields) =>
and generate_poly_variant_selection_set = (config, loc, name, fields) => {
let rec generator_loop =
fun
- | [(field, inner), ...next] => {
+ | [({item: field}: Result_structure.name, inner), ...next] => {
let variant_decoder =
Ast_helper.(
Exp.variant(
@@ -459,7 +462,7 @@ and generate_poly_variant_selection_set = (config, loc, name, fields) => {
Ast_helper.(
Typ.variant(
List.map(
- ((name, _)) =>
+ (({item: name}: Result_structure.name, _)) =>
{
prf_desc:
Rtag(
@@ -599,7 +602,7 @@ and generate_poly_variant_union =
let fragment_cases =
Ast_helper.(
fragments
- |> List.map(((type_name, inner)) => {
+ |> List.map((({item: type_name}: Result_structure.name, inner)) => {
let name_pattern = Pat.constant(Pconst_string(type_name, None));
let variant =
Ast_helper.(
@@ -639,7 +642,7 @@ and generate_poly_variant_union =
);
let fragment_case_tys =
List.map(
- ((name, _)) =>
+ (({item: name}: Result_structure.name, _)) =>
{
prf_desc:
Rtag(
diff --git a/src/native/output_native_module.re b/src/native/output_native_module.re
index 4efc0869..923a37b9 100644
--- a/src/native/output_native_module.re
+++ b/src/native/output_native_module.re
@@ -48,7 +48,6 @@ let emit_printed_query = parts => {
open Graphql_printer;
let generate_expr = acc =>
fun
- | Empty => acc
| String(s) =>
Ast_helper.(
Exp.apply(
@@ -279,9 +278,9 @@ let generate_fragment_module =
let generate_operation = config =>
fun
- | Mod_default_operation(vdefs, has_error, operation, structure) =>
+ | Def_operation(vdefs, has_error, operation, structure) =>
generate_default_operation(config, vdefs, has_error, operation, structure)
- | Mod_fragment(name, req_vars, has_error, fragment, structure) =>
+ | Def_fragment(name, req_vars, has_error, fragment, structure) =>
generate_fragment_module(
config,
name,
diff --git a/tests_bucklescript/.gitignore b/tests_bucklescript/.gitignore
index 988f4cb9..0be12593 100755
--- a/tests_bucklescript/.gitignore
+++ b/tests_bucklescript/.gitignore
@@ -7,3 +7,5 @@ node_modules
/build/
bs-ppx-css
*.bs.js
+test*.re
+test*.ml
diff --git a/tests_bucklescript/.vscode b/tests_bucklescript/.vscode
new file mode 100644
index 00000000..3952d9ea
--- /dev/null
+++ b/tests_bucklescript/.vscode
@@ -0,0 +1,6 @@
+{
+ "ocaml.sandbox": {
+ "switch": "4.06.1",
+ "kind": "opam"
+ }
+}
diff --git a/tests_bucklescript/__tests__/__snapshots__/snapshots.bs.js.snap b/tests_bucklescript/__tests__/__snapshots__/snapshots.bs.js.snap
new file mode 100644
index 00000000..c073a85e
--- /dev/null
+++ b/tests_bucklescript/__tests__/__snapshots__/snapshots.bs.js.snap
@@ -0,0 +1,50291 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Apollo argNamedQuery.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {argNamedQuery: int};
+ type t_variables = {query: int};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($query: Int!) {\\\\nargNamedQuery(query: $query) \\\\n}\\\\n\\";
+ type t = {argNamedQuery: int};
+ type t_variables = {query: int};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ argNamedQuery: {
+ let value = (value: Raw.t).argNamedQuery;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let argNamedQuery = {
+ let value = (value: t).argNamedQuery;
+ value;
+ };
+ {argNamedQuery: argNamedQuery};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {query: (a => a)((inp: t_variables).query)};
+ let makeVariables = (~query, ()) =>
+ serializeVariables({query: query}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_query_82;
+ /**Variable **$query** has the following graphql type:
+
+\`\`\`
+Int!
+\`\`\`*/
+ let _graphql_query_82: _graphql_query_82 = Obj.magic(0);
+ type nonrec _graphql_query_75;
+ /**Argument **query** on field **argNamedQuery** has the following graphql type:
+
+\`\`\`
+Int!
+\`\`\`*/
+ let _graphql_query_75: _graphql_query_75 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo comment.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | \`FIRST | \`SECOND | \`THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nonrecursiveInput: {
+ let value = (value: Raw.t).nonrecursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nonrecursiveInput = {
+ let value = (value: t).nonrecursiveInput;
+ value;
+ };
+ {nonrecursiveInput: nonrecursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_100;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_100: _graphql_arg_100 = Obj.magic(0);
+ type nonrec _graphql_arg_95;
+ /**Argument **arg** on field **nonrecursiveInput** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_95: _graphql_arg_95 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo customDecoder.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module StringOfInt = {
+ let parse = string_of_int;
+ let serialize = int_of_string;
+ type t = string;
+};
+module IntOfString = {
+ let parse = int_of_string;
+ let serialize = string_of_int;
+ type t = int;
+};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ string,
+ int,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\n__typename \\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ __typename: string,
+ string: IntOfString.t,
+ int: StringOfInt.t,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ IntOfString.parse(value);
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ StringOfInt.parse(value);
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let int = {
+ let value = (value: t_variousScalars).int;
+ StringOfInt.serialize(value);
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ IntOfString.serialize(value);
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {__typename, string, int};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo customScalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_customScalarField = {
+ __typename: string,
+ nullable: Js.Nullable.t(Js.Json.t),
+ nonNullable: Js.Json.t,
+ };
+ type t = {customScalarField: t_customScalarField};
+ type t_variables = {
+ opt: Js.Nullable.t(Js.Json.t),
+ req: Js.Json.t,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($opt: CustomScalar, $req: CustomScalar!) {\\\\ncustomScalarField(argOptional: $opt, argRequired: $req) {\\\\n__typename \\\\nnullable \\\\nnonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_customScalarField = {
+ __typename: string,
+ nullable: option(Js.Json.t),
+ nonNullable: Js.Json.t,
+ };
+ type t = {customScalarField: t_customScalarField};
+ type t_variables = {
+ opt: option(Js.Json.t),
+ req: Js.Json.t,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ customScalarField: {
+ let value = (value: Raw.t).customScalarField;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_customScalarField).__typename;
+ value;
+ },
+ nullable: {
+ let value = (value: Raw.t_customScalarField).nullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ nonNullable: {
+ let value = (value: Raw.t_customScalarField).nonNullable;
+ value;
+ },
+ }: t_customScalarField
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let customScalarField = {
+ let value = (value: t).customScalarField;
+ (
+ {
+ let nonNullable = {
+ let value = (value: t_customScalarField).nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = (value: t_customScalarField).nullable;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_customScalarField).__typename;
+ value;
+ };
+ {__typename, nullable, nonNullable};
+ }: Raw.t_customScalarField
+ );
+ };
+ {customScalarField: customScalarField};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ opt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).opt,
+ ),
+ req: (a => a)((inp: t_variables).req),
+ };
+ let makeVariables = (~opt=?, ~req, ()) =>
+ serializeVariables({opt, req}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_opt_119;
+ /**Variable **$opt** has the following graphql type:
+
+\`\`\`
+CustomScalar
+\`\`\`*/
+ let _graphql_opt_119: _graphql_opt_119 = Obj.magic(0);
+ type nonrec _graphql_argOptional_106;
+ /**Argument **argOptional** on field **customScalarField** has the following graphql type:
+
+\`\`\`
+CustomScalar
+\`\`\`*/
+ let _graphql_argOptional_106: _graphql_argOptional_106 = Obj.magic(0);
+ type nonrec _graphql_req_138;
+ /**Variable **$req** has the following graphql type:
+
+\`\`\`
+CustomScalar!
+\`\`\`*/
+ let _graphql_req_138: _graphql_req_138 = Obj.magic(0);
+ type nonrec _graphql_argRequired_125;
+ /**Argument **argRequired** on field **customScalarField** has the following graphql type:
+
+\`\`\`
+CustomScalar!
+\`\`\`*/
+ let _graphql_argRequired_125: _graphql_argRequired_125 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo customTypes.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Color = {
+ type t =
+ | Red
+ | Green
+ | Blue;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(\\"green\\") => Green
+ | Some(\\"blue\\") => Blue
+ | Some(\\"red\\")
+ | Some(_)
+ | None => Red
+ };
+ let serialize = color =>
+ (
+ switch (color) {
+ | Red => \\"red\\"
+ | Green => \\"green\\"
+ | Blue => \\"blue\\"
+ }
+ )
+ |> Js.Json.string;
+};
+module DateTime = {
+ type t = Js.Date.t;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(str) => str |> Js.Date.fromString
+ | None => Js.Date.make()
+ };
+ let serialize = date => date |> Js.Date.toISOString |> Js.Json.string;
+};
+module MyQuery = {
+ module Raw = {
+ type t_customFields = {
+ __typename: string,
+ currentTime: Js.Json.t,
+ favoriteColor: Js.Json.t,
+ futureTime: Js.Nullable.t(Js.Json.t),
+ nullableColor: Js.Nullable.t(Js.Json.t),
+ };
+ type t = {customFields: t_customFields};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ncustomFields {\\\\n__typename \\\\ncurrentTime \\\\nfavoriteColor \\\\nfutureTime \\\\nnullableColor \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_customFields = {
+ __typename: string,
+ currentTime: DateTime.t,
+ favoriteColor: Color.t,
+ futureTime: option(DateTime.t),
+ nullableColor: option(Color.t),
+ };
+ type t = {customFields: t_customFields};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ customFields: {
+ let value = (value: Raw.t).customFields;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_customFields).__typename;
+ value;
+ },
+ currentTime: {
+ let value = (value: Raw.t_customFields).currentTime;
+ DateTime.parse(value);
+ },
+ favoriteColor: {
+ let value = (value: Raw.t_customFields).favoriteColor;
+ Color.parse(value);
+ },
+ futureTime: {
+ let value = (value: Raw.t_customFields).futureTime;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(DateTime.parse(value))
+ | None => None
+ };
+ },
+ nullableColor: {
+ let value = (value: Raw.t_customFields).nullableColor;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(Color.parse(value))
+ | None => None
+ };
+ },
+ }: t_customFields
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let customFields = {
+ let value = (value: t).customFields;
+ (
+ {
+ let nullableColor = {
+ let value = (value: t_customFields).nullableColor;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(Color.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and futureTime = {
+ let value = (value: t_customFields).futureTime;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(DateTime.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and favoriteColor = {
+ let value = (value: t_customFields).favoriteColor;
+ Color.serialize(value);
+ }
+ and currentTime = {
+ let value = (value: t_customFields).currentTime;
+ DateTime.serialize(value);
+ }
+ and __typename = {
+ let value = (value: t_customFields).__typename;
+ value;
+ };
+ {
+ __typename,
+ currentTime,
+ favoriteColor,
+ futureTime,
+ nullableColor,
+ };
+ }: Raw.t_customFields
+ );
+ };
+ {customFields: customFields};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo defaultObjectValueOnScalar.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {defaultObjectValueOnScalar: string};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndefaultObjectValueOnScalar(filter: {some: {json: \\\\\\"value\\\\\\"}}, arg: {field: \\\\\\"otherValue\\\\\\"}) \\\\n}\\\\n\\";
+ type t = {defaultObjectValueOnScalar: string};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ defaultObjectValueOnScalar: {
+ let value = (value: Raw.t).defaultObjectValueOnScalar;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let defaultObjectValueOnScalar = {
+ let value = (value: t).defaultObjectValueOnScalar;
+ value;
+ };
+ {defaultObjectValueOnScalar: defaultObjectValueOnScalar};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_filter_92;
+ /**Argument **filter** on field **defaultObjectValueOnScalar** has the following graphql type:
+
+\`\`\`
+JsonScalar!
+\`\`\`*/
+ let _graphql_filter_92: _graphql_filter_92 = Obj.magic(0);
+ type nonrec _graphql_arg_140;
+ /**Argument **arg** on field **defaultObjectValueOnScalar** has the following graphql type:
+
+\`\`\`
+EmbeddedInput {
+ field: String
+}!
+\`\`\`*/
+ let _graphql_arg_140: _graphql_arg_140 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo enumInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {enumInput: string};
+ type t_variables = {arg: string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: SampleField!) {\\\\nenumInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {enumInput: string};
+ type t_variables = {arg: [ | \`FIRST | \`SECOND | \`THIRD]};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ enumInput: {
+ let value = (value: Raw.t).enumInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let enumInput = {
+ let value = (value: t).enumInput;
+ value;
+ };
+ {enumInput: enumInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ (inp: t_variables).arg,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_82;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}!
+\`\`\`*/
+ let _graphql_arg_82: _graphql_arg_82 = Obj.magic(0);
+ type nonrec _graphql_arg_77;
+ /**Argument **arg** on field **enumInput** has the following graphql type:
+
+\`\`\`
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}!
+\`\`\`*/
+ let _graphql_arg_77: _graphql_arg_77 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_SampleField_47;
+ /**\`\`\`
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}
+\`\`\`*/
+ let _graphql_SampleField_47: _graphql_SampleField_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo explicit_object_record.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module RecordsQuery = {
+ module Raw = {
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\n__typename \\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_lists).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_lists).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 RecordsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ObjectsQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ \\"__typename\\": string,
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\n__typename \\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ .
+ \\"__typename\\": string,
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {
+ \\"__typename\\": __typename,
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {
+ \\"__typename\\": __typename,
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ObjectsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo extensions.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ type t_variables;
+ };
+ type t;
+ type t_variables;
+
+ let query: string;
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+};
+
+module Parent = {
+ module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => ();
+ };
+};
+module Bla' = {
+ module Raw = {
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query Bla {\\\\nlists {\\\\n__typename \\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_lists).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_lists).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Bla = {
+ include Bla';
+ include Parent.ExtendQuery(Bla');
+};
+"
+`;
+
+exports[`Apollo fragmentDefinition.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module GraphQL_PPX = {
+ let deepMerge = (json1, _) => json1;
+};
+module ListFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment ListFragment on Lists {\\\\n__typename \\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, nullableOfNullable, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = \\"ListFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Another = {
+ /**The GraphQL query string*/
+ let query = \\"fragment Another on Lists {\\\\n__typename \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ __typename: string,
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ __typename: string,
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = \\"Another\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module FragmentWithArgs = {
+ /**The GraphQL query string*/
+ let query = \\"fragment FragmentWithArgs on Lists {\\\\n__typename \\\\nlistWithArg(arg1: $arg1) \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ __typename: string,
+ listWithArg: Js.Nullable.t(array(Js.Nullable.t(string))),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ __typename: string,
+ listWithArg: option(array(option(string))),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ listWithArg: {
+ let value = (value: Raw.t).listWithArg;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (~arg1 as _arg1: [ | \`String], value: Raw.t) =>
+ parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listWithArg = {
+ let value = (value: t).listWithArg;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, listWithArg};
+ }: Raw.t
+ );
+ let name = \\"FragmentWithArgs\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+
+module InlineFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment InlineListFragment on Lists {\\\\n__typename \\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, nullableOfNullable, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = \\"InlineListFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery = {
+ module Raw = {
+ type t_l2;
+ type t_l3;
+ type t_l4;
+ type t = {
+ l1: ListFragment.Raw.t,
+ l2: t_l2,
+ l3: t_l3,
+ l4: t_l4,
+ l5: FragmentWithArgs.Raw.t,
+ };
+ type t_variables = {arg1: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ \\"query MyQuery($arg1: String) {\\\\nl1: lists {\\\\n...\\"
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl2: lists {\\\\n__typename \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl3: lists {\\\\n__typename \\\\nnullableOfNullable \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl4: lists {\\\\n__typename \\\\nnullableOfNullable \\\\n...\\"
+ )
+ ++ InlineFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl5: lists {\\\\n...\\"
+ )
+ ++ FragmentWithArgs.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ FragmentWithArgs.query
+ )
+ ++ InlineFragment.query
+ )
+ ++ ListFragment.query;
+ type t_l2 = {
+ __typename: string,
+ frag1: ListFragment.t_Lists,
+ frag2: ListFragment.t_Lists,
+ };
+ type t_l3 = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ frag1: ListFragment.t_Lists,
+ frag2: ListFragment.t_Lists,
+ };
+ type t_l4 = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ inlineFragment: InlineFragment.t_Lists,
+ };
+ type t = {
+ l1: ListFragment.t,
+ l2: t_l2,
+ l3: t_l3,
+ l4: t_l4,
+ l5: FragmentWithArgs.t,
+ };
+ type t_variables = {arg1: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ l1: {
+ let value = (value: Raw.t).l1;
+ ListFragment.verifyArgsAndParse(value);
+ },
+ l2: {
+ let value = (value: Raw.t).l2;
+ (
+ {
+ __typename: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"),
+ );
+ value;
+ },
+ frag1: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ frag2: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t_l2
+ );
+ },
+ l3: {
+ let value = (value: Raw.t).l3;
+ (
+ {
+ __typename: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"),
+ );
+ value;
+ },
+ nullableOfNullable: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"nullableOfNullable\\"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ frag1: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ frag2: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t_l3
+ );
+ },
+ l4: {
+ let value = (value: Raw.t).l4;
+ (
+ {
+ __typename: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"),
+ );
+ value;
+ },
+ nullableOfNullable: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"nullableOfNullable\\"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ inlineFragment: {
+ let value: InlineFragment.Raw.t = Obj.magic(value);
+ InlineFragment.verifyArgsAndParse(value);
+ },
+ }: t_l4
+ );
+ },
+ l5: {
+ let value = (value: Raw.t).l5;
+ FragmentWithArgs.verifyArgsAndParse(~arg1=\`String, value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let l5 = {
+ let value = (value: t).l5;
+ FragmentWithArgs.serialize(value);
+ }
+ and l4 = {
+ let value = (value: t).l4;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = (value: t_l4).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_l4).__typename;
+ value;
+ };
+ {
+ \\"__typename\\": __typename,
+ \\"nullableOfNullable\\": nullableOfNullable,
+ };
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(
+ InlineFragment.serialize((value: t_l4).inlineFragment),
+ ): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l4
+ );
+ }
+ and l3 = {
+ let value = (value: t).l3;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = (value: t_l3).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_l3).__typename;
+ value;
+ };
+ {
+ \\"__typename\\": __typename,
+ \\"nullableOfNullable\\": nullableOfNullable,
+ };
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(ListFragment.serialize((value: t_l3).frag1)): Js.Json.t
+ ),
+ (
+ Obj.magic(ListFragment.serialize((value: t_l3).frag2)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l3
+ );
+ }
+ and l2 = {
+ let value = (value: t).l2;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let __typename = {
+ let value = (value: t_l2).__typename;
+ value;
+ };
+ {\\"__typename\\": __typename};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(ListFragment.serialize((value: t_l2).frag1)): Js.Json.t
+ ),
+ (
+ Obj.magic(ListFragment.serialize((value: t_l2).frag2)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l2
+ );
+ }
+ and l1 = {
+ let value = (value: t).l1;
+ ListFragment.serialize(value);
+ };
+ {l1, l2, l3, l4, l5};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg1:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).arg1,
+ ),
+ };
+ let makeVariables = (~arg1=?, ()) =>
+ serializeVariables({arg1: arg1}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {lists: ListFragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ ((\\"query {\\\\nlists {\\\\n...\\" ++ ListFragment.name) ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\")
+ ++ ListFragment.query;
+ type t = {lists: ListFragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ ListFragment.serialize(value);
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo interface.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+"
+`;
+
+exports[`Apollo lists.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\n__typename \\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_lists).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_lists).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo listsArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {listsInput: string};
+ type t_variables = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\\\\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \\\\n}\\\\n\\";
+ type t = {listsInput: string};
+ type t_variables = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listsInput: {
+ let value = (value: Raw.t).listsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listsInput = {
+ let value = (value: t).listsInput;
+ value;
+ };
+ {listsInput: listsInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ nullableOfNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables).nullableOfNullable,
+ ),
+ nullableOfNonNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ (inp: t_variables).nullableOfNonNullable,
+ ),
+ nonNullableOfNullable:
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ (inp: t_variables).nonNullableOfNullable,
+ ),
+ nonNullableOfNonNullable:
+ (a => Array.map(b => (a => a)(b), a))(
+ (inp: t_variables).nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_219;
+ /**Argument **arg** on field **listsInput** has the following graphql type:
+
+\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+\`\`\`*/
+ let _graphql_arg_219: _graphql_arg_219 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo listsInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {listsInput: string};
+ type t_variables = {arg: t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: ListsInput!) {\\\\nlistsInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {listsInput: string};
+ type t_variables = {arg: t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listsInput: {
+ let value = (value: Raw.t).listsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listsInput = {
+ let value = (value: t).listsInput;
+ value;
+ };
+ {listsInput: listsInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg: (a => serializeInputObjectListsInput(a))((inp: t_variables).arg),
+ }
+ and serializeInputObjectListsInput:
+ t_variables_ListsInput => Raw.t_variables_ListsInput =
+ inp => {
+ nullableOfNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_ListsInput).nullableOfNullable,
+ ),
+ nullableOfNonNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ (inp: t_variables_ListsInput).nullableOfNonNullable,
+ ),
+ nonNullableOfNullable:
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ (inp: t_variables_ListsInput).nonNullableOfNullable,
+ ),
+ nonNullableOfNonNullable:
+ (a => Array.map(b => (a => a)(b), a))(
+ (inp: t_variables_ListsInput).nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectListsInput =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ )
+ : t_variables_ListsInput => {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_82;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+\`\`\`*/
+ let _graphql_arg_82: _graphql_arg_82 = Obj.magic(0);
+ type nonrec _graphql_arg_77;
+ /**Argument **arg** on field **listsInput** has the following graphql type:
+
+\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+\`\`\`*/
+ let _graphql_arg_77: _graphql_arg_77 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_ListsInput_47;
+ /**\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}
+\`\`\`*/
+ let _graphql_ListsInput_47: _graphql_ListsInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo mutation.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationWithError_value = {
+ __typename: string,
+ stringField: string,
+ };
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ __typename: string,
+ field: t_mutationWithError_errors_field,
+ message: string,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ value: Js.Nullable.t(t_mutationWithError_value),
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\n__typename \\\\nvalue {\\\\n__typename \\\\nstringField \\\\n}\\\\n\\\\nerrors {\\\\n__typename \\\\nfield \\\\nmessage \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_value = {
+ __typename: string,
+ stringField: string,
+ };
+ type t_mutationWithError_errors_field = [
+ | \`FutureAddedValue(string)
+ | \`FIRST
+ | \`SECOND
+ | \`THIRD
+ ];
+ type t_mutationWithError_errors = {
+ __typename: string,
+ field: t_mutationWithError_errors_field,
+ message: string,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ value: option(t_mutationWithError_value),
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_mutationWithError).__typename;
+ value;
+ },
+ value: {
+ let value = (value: Raw.t_mutationWithError).value;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_value).__typename;
+ value;
+ },
+ stringField: {
+ let value =
+ (value: Raw.t_mutationWithError_value).stringField;
+ value;
+ },
+ }: t_mutationWithError_value,
+ )
+ | None => None
+ };
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).
+ __typename;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | other => \`FutureAddedValue(other)
+ };
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ | \`FutureAddedValue(other) => other
+ };
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_errors).__typename;
+ value;
+ };
+ {__typename, field, message};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and value = {
+ let value = (value: t_mutationWithError).value;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let stringField = {
+ let value =
+ (value: t_mutationWithError_value).stringField;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_value).__typename;
+ value;
+ };
+ {__typename, stringField};
+ }: Raw.t_mutationWithError_value,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_mutationWithError).__typename;
+ value;
+ };
+ {__typename, value, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo mutationWithArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {optionalInputArgs: string};
+ type t_variables = {required: string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\";
+ type t = {optionalInputArgs: string};
+ type t_variables = {required: string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ optionalInputArgs: {
+ let value = (value: Raw.t).optionalInputArgs;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let optionalInputArgs = {
+ let value = (value: t).optionalInputArgs;
+ value;
+ };
+ {optionalInputArgs: optionalInputArgs};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {required: (a => a)((inp: t_variables).required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({required: required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo mutationWithArgsAndNoRecords.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\";
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"required\\": (a => a)(inp##required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({\\"required\\": required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo nested.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type record = {
+ f1: string,
+ f2: string,
+};
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner),
+ };
+ type t_second_inner_inner = {
+ __typename: string,
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_second_inner_inner),
+ };
+ type t_second = {
+ __typename: string,
+ inner: Js.Nullable.t(t_second_inner),
+ };
+ type t_let_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_let_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_let_inner_inner),
+ };
+ type t_let = {
+ __typename: string,
+ inner: Js.Nullable.t(t_let_inner),
+ };
+ type t = {
+ first: t_first,
+ second: t_second,
+ let_: t_let,
+ };
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nfirst: nestedObject {\\\\n__typename \\\\ninner {\\\\n__typename \\\\ninner {\\\\n__typename \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nsecond: nestedObject {\\\\n__typename \\\\ninner {\\\\n__typename \\\\ninner {\\\\n__typename \\\\nf1: field \\\\nf2: field \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nlet: nestedObject {\\\\n__typename \\\\ninner {\\\\n__typename \\\\ninner {\\\\n__typename \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: option(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: option(t_first_inner),
+ };
+ type t_second_inner_inner = {
+ __typename: string,
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {
+ __typename: string,
+ inner: option(t_second_inner_inner),
+ };
+ type t_second = {
+ __typename: string,
+ inner: option(t_second_inner),
+ };
+ type t_let_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_let_inner = {
+ __typename: string,
+ inner: option(t_let_inner_inner),
+ };
+ type t_let = {
+ __typename: string,
+ inner: option(t_let_inner),
+ };
+ type t = {
+ first: t_first,
+ second: t_second,
+ let_: t_let,
+ };
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ first: {
+ let value = (value: Raw.t).first;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_first).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_first_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_first_inner_inner).__typename;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_first_inner_inner).field;
+ value;
+ },
+ }: t_first_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first
+ );
+ },
+ second: {
+ let value = (value: Raw.t).second;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_second).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_second).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_second_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_second_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_second_inner_inner).__typename;
+ value;
+ },
+ f1: {
+ let value = (value: Raw.t_second_inner_inner).f1;
+ value;
+ },
+ f2: {
+ let value = (value: Raw.t_second_inner_inner).f2;
+ value;
+ },
+ }: t_second_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_second_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_second
+ );
+ },
+ let_: {
+ let value = (value: Raw.t).let_;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_let).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_let).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_let_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_let_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_let_inner_inner).__typename;
+ value;
+ },
+ field: {
+ let value = (value: Raw.t_let_inner_inner).field;
+ value;
+ },
+ }: t_let_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_let_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_let
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let let_ = {
+ let value = (value: t).let_;
+ (
+ {
+ let inner = {
+ let value = (value: t_let).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_let_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_let_inner_inner).field;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_let_inner_inner).__typename;
+ value;
+ };
+ {__typename, field};
+ }: Raw.t_let_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_let_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_let_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_let).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_let
+ );
+ }
+ and second = {
+ let value = (value: t).second;
+ (
+ {
+ let inner = {
+ let value = (value: t_second).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_second_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let f2 = {
+ let value = (value: t_second_inner_inner).f2;
+ value;
+ }
+ and f1 = {
+ let value = (value: t_second_inner_inner).f1;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_second_inner_inner).__typename;
+ value;
+ };
+ {__typename, f1, f2};
+ }: Raw.t_second_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_second_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_second_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_second).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_second
+ );
+ }
+ and first = {
+ let value = (value: t).first;
+ (
+ {
+ let inner = {
+ let value = (value: t_first).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_first_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_first_inner_inner).field;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_first_inner_inner).__typename;
+ value;
+ };
+ {__typename, field};
+ }: Raw.t_first_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first
+ );
+ };
+ {first, second, let_};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo nonrecursiveInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | \`FIRST | \`SECOND | \`THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nonrecursiveInput: {
+ let value = (value: Raw.t).nonrecursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nonrecursiveInput = {
+ let value = (value: t).nonrecursiveInput;
+ value;
+ };
+ {nonrecursiveInput: nonrecursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_100;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_100: _graphql_arg_100 = Obj.magic(0);
+ type nonrec _graphql_arg_95;
+ /**Argument **arg** on field **nonrecursiveInput** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_95: _graphql_arg_95 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {
+ scalarsInput: string,
+ more: string,
+ };
+ type t_variables = {
+ arg: t_variables_NonrecursiveInput,
+ arg2: t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\\\\nscalarsInput(arg: $arg) \\\\nmore: scalarsInput(arg: $arg2) \\\\n}\\\\n\\";
+ type t = {
+ scalarsInput: string,
+ more: string,
+ };
+ type t_variables = {
+ arg: t_variables_NonrecursiveInput,
+ arg2: t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | \`FIRST | \`SECOND | \`THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ more: {
+ let value = (value: Raw.t).more;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let more = {
+ let value = (value: t).more;
+ value;
+ }
+ and scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput, more};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ arg2:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg2,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ~arg2, ()) =>
+ serializeVariables({arg, arg2}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_240;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_240: _graphql_arg_240 = Obj.magic(0);
+ type nonrec _graphql_arg_235;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+\`\`\`*/
+ let _graphql_arg_235: _graphql_arg_235 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_169;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_169: _graphql_NonrecursiveInput_169 =
+ Obj.magic(0);
+ type nonrec _graphql_NonrecursiveInput_196;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_196: _graphql_NonrecursiveInput_196 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo omitFutureValueEnum.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\n__typename \\\\nerrors {\\\\n__typename \\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [
+ | \`FutureAddedValue(string)
+ | \`FIRST
+ | \`SECOND
+ | \`THIRD
+ ];
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_mutationWithError).__typename;
+ value;
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).
+ __typename;
+ value;
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | other => \`FutureAddedValue(other)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ | \`FutureAddedValue(other) => other
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_errors).__typename;
+ value;
+ };
+ {__typename, message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_mutationWithError).__typename;
+ value;
+ };
+ {__typename, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\n__typename \\\\nerrors {\\\\n__typename \\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [ | \`FIRST | \`SECOND | \`THIRD];
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_mutationWithError).__typename;
+ value;
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).
+ __typename;
+ value;
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | _ => raise(Not_found)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_errors).__typename;
+ value;
+ };
+ {__typename, message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_mutationWithError).__typename;
+ value;
+ };
+ {__typename, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\n__typename \\\\nerrors {\\\\n__typename \\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [ | \`FIRST | \`SECOND | \`THIRD];
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_mutationWithError).__typename;
+ value;
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).
+ __typename;
+ value;
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | _ => raise(Not_found)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_errors).__typename;
+ value;
+ };
+ {__typename, message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_mutationWithError).__typename;
+ value;
+ };
+ {__typename, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo omitFutureValueUnion.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\n__typename \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\n__typename \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\n__typename \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo pokedexApolloMode.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ __typename: string,
+ id: string,
+ name: Js.Nullable.t(string),
+ };
+ type t = {pokemon: Js.Nullable.t(t_pokemon)};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\npokemon(name: \\\\\\"Pikachu\\\\\\") {\\\\n__typename \\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_pokemon = {
+ __typename: string,
+ id: string,
+ name: option(string),
+ };
+ type t = {pokemon: option(t_pokemon)};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ pokemon: {
+ let value = (value: Raw.t).pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_pokemon).__typename;
+ value;
+ },
+ id: {
+ let value = (value: Raw.t_pokemon).id;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_pokemon).name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_pokemon,
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let pokemon = {
+ let value = (value: t).pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = (value: t_pokemon).name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = (value: t_pokemon).id;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_pokemon).__typename;
+ value;
+ };
+ {__typename, id, name};
+ }: Raw.t_pokemon,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {pokemon: pokemon};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_name_52;
+ /**Argument **name** on field **pokemon** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_name_52: _graphql_name_52 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo pokedexScalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ __typename: string,
+ id: string,
+ name: Js.Nullable.t(string),
+ };
+ type t = {pokemon: Js.Nullable.t(t_pokemon)};
+ type t_variables = {
+ id: Js.Nullable.t(string),
+ name: Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query pokemon($id: String, $name: String) {\\\\npokemon(name: $name, id: $id) {\\\\n__typename \\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_pokemon = {
+ __typename: string,
+ id: string,
+ name: option(string),
+ };
+ type t = {pokemon: option(t_pokemon)};
+ type t_variables = {
+ id: option(string),
+ name: option(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ pokemon: {
+ let value = (value: Raw.t).pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_pokemon).__typename;
+ value;
+ },
+ id: {
+ let value = (value: Raw.t_pokemon).id;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_pokemon).name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_pokemon,
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let pokemon = {
+ let value = (value: t).pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = (value: t_pokemon).name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = (value: t_pokemon).id;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_pokemon).__typename;
+ value;
+ };
+ {__typename, id, name};
+ }: Raw.t_pokemon,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {pokemon: pokemon};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ id:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).id,
+ ),
+ name:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).name,
+ ),
+ };
+ let makeVariables = (~id=?, ~name=?, ()) =>
+ serializeVariables({id, name}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_name_100;
+ /**Variable **$name** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_name_100: _graphql_name_100 = Obj.magic(0);
+ type nonrec _graphql_name_94;
+ /**Argument **name** on field **pokemon** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_name_94: _graphql_name_94 = Obj.magic(0);
+ type nonrec _graphql_id_111;
+ /**Variable **$id** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_id_111: _graphql_id_111 = Obj.magic(0);
+ type nonrec _graphql_id_107;
+ /**Argument **id** on field **pokemon** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_id_107: _graphql_id_107 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo record.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type scalars = {
+ string,
+ int,
+};
+
+type dog = {
+ name: string,
+ barkVolume: float,
+};
+
+type oneFieldQuery = {nullableString: option(string)};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ string,
+ int,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\n__typename \\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t = {variousScalars: scalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ }: scalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let int = {
+ let value = (value: scalars).int;
+ value;
+ }
+ and string = {
+ let value = (value: scalars).string;
+ value;
+ }
+ and __typename = {
+ let value = (value: scalars).__typename;
+ value;
+ };
+ {__typename, string, int};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module OneFieldQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\n__typename \\\\nnullableString \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {__typename, nullableString};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 OneFieldQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ExternalFragmentQuery = {
+ module Fragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment Fragment on VariousScalars {\\\\n__typename \\\\nstring \\\\nint \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ __typename: string,
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ };
+ type t = {
+ __typename: string,
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ string: {
+ let value = (value: Raw.t).string;
+ value;
+ },
+ int: {
+ let value = (value: Raw.t).int;
+ value;
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let int = {
+ let value = (value: t).int;
+ value;
+ }
+ and string = {
+ let value = (value: t).string;
+ value;
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, string, int};
+ }: Raw.t
+ );
+ let name = \\"Fragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+VariousScalars {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t = {variousScalars: Fragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (\\"query {\\\\nvariousScalars {\\\\n...\\" ++ Fragment.name)
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ Fragment.query;
+ type t = {variousScalars: Fragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ Fragment.verifyArgsAndParse(value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ Fragment.serialize(value);
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+module InlineFragmentQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 InlineFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module UnionExternalFragmentQuery = {
+ module DogFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment DogFragment on Dog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ };
+ type t = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t).barkVolume;
+ value;
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let barkVolume = {
+ let value = (value: t).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, name, barkVolume};
+ }: Raw.t
+ );
+ let name = \\"DogFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Dog {
+ name: String!
+ barkVolume: Float!
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n...\\"
+ ++ DogFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ DogFragment.query;
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(DogFragment.t)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: DogFragment.Raw.t = Obj.magic(value);
+ DogFragment.verifyArgsAndParse(value);
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(DogFragment.serialize(value)): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+"
+`;
+
+exports[`Apollo recursiveInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {recursiveInput: string};
+ type t_variables = {arg: t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ otherField: Js.Nullable.t(string),
+ inner: Js.Nullable.t(t_variables_RecursiveInput),
+ enum: Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: RecursiveInput!) {\\\\nrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {recursiveInput: string};
+ type t_variables = {arg: t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ otherField: option(string),
+ inner: option(t_variables_RecursiveInput),
+ enum: option([ | \`FIRST | \`SECOND | \`THIRD]),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ recursiveInput: {
+ let value = (value: Raw.t).recursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let recursiveInput = {
+ let value = (value: t).recursiveInput;
+ value;
+ };
+ {recursiveInput: recursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectRecursiveInput(a))((inp: t_variables).arg),
+ }
+ and serializeInputObjectRecursiveInput:
+ t_variables_RecursiveInput => Raw.t_variables_RecursiveInput =
+ inp => {
+ otherField:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_RecursiveInput).otherField,
+ ),
+ inner:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectRecursiveInput(a))(b),
+ )
+ }
+ )(
+ (inp: t_variables_RecursiveInput).inner,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_RecursiveInput).enum,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectRecursiveInput =
+ (~otherField=?, ~inner=?, ~enum=?, ()): t_variables_RecursiveInput => {
+ otherField,
+ inner,
+ enum,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_90;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}!
+\`\`\`*/
+ let _graphql_arg_90: _graphql_arg_90 = Obj.magic(0);
+ type nonrec _graphql_arg_85;
+ /**Argument **arg** on field **recursiveInput** has the following graphql type:
+
+\`\`\`
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}!
+\`\`\`*/
+ let _graphql_arg_85: _graphql_arg_85 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_RecursiveInput_47;
+ /**\`\`\`
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}
+\`\`\`*/
+ let _graphql_RecursiveInput_47: _graphql_RecursiveInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo scalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\n__typename \\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo scalarsArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {scalarsInput: string};
+ type t_variables = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\\\\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \\\\n}\\\\n\\";
+ type t = {scalarsInput: string};
+ type t_variables = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput: scalarsInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ nullableString:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableString,
+ ),
+ string: (a => a)((inp: t_variables).string),
+ nullableInt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableInt,
+ ),
+ int: (a => a)((inp: t_variables).int),
+ nullableFloat:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableFloat,
+ ),
+ float: (a => a)((inp: t_variables).float),
+ nullableBoolean:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableBoolean,
+ ),
+ boolean: (a => a)((inp: t_variables).boolean),
+ nullableID:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableID,
+ ),
+ id: (a => a)((inp: t_variables).id),
+ };
+ let makeVariables =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_292;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+\`\`\`*/
+ let _graphql_arg_292: _graphql_arg_292 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo scalarsInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {scalarsInput: string};
+ type t_variables = {arg: t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: VariousScalarsInput!) {\\\\nscalarsInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {scalarsInput: string};
+ type t_variables = {arg: t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput: scalarsInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectVariousScalarsInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectVariousScalarsInput:
+ t_variables_VariousScalarsInput => Raw.t_variables_VariousScalarsInput =
+ inp => {
+ nullableString:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableString,
+ ),
+ string: (a => a)((inp: t_variables_VariousScalarsInput).string),
+ nullableInt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableInt,
+ ),
+ int: (a => a)((inp: t_variables_VariousScalarsInput).int),
+ nullableFloat:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableFloat,
+ ),
+ float: (a => a)((inp: t_variables_VariousScalarsInput).float),
+ nullableBoolean:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableBoolean,
+ ),
+ boolean: (a => a)((inp: t_variables_VariousScalarsInput).boolean),
+ nullableID:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableID,
+ ),
+ id: (a => a)((inp: t_variables_VariousScalarsInput).id),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectVariousScalarsInput =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ )
+ : t_variables_VariousScalarsInput => {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_93;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+\`\`\`*/
+ let _graphql_arg_93: _graphql_arg_93 = Obj.magic(0);
+ type nonrec _graphql_arg_88;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+\`\`\`*/
+ let _graphql_arg_88: _graphql_arg_88 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_VariousScalarsInput_47;
+ /**\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+\`\`\`*/
+ let _graphql_VariousScalarsInput_47: _graphql_VariousScalarsInput_47 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo skipDirectives.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_v1 = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string: Js.Nullable.t(string),
+ };
+ type t_v2 = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string: Js.Nullable.t(string),
+ };
+ type t = {
+ v1: t_v1,
+ v2: t_v2,
+ };
+ type t_variables = {var: bool};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($var: Boolean!) {\\\\nv1: variousScalars {\\\\n__typename \\\\nnullableString @skip(if: $var) \\\\nstring @skip(if: $var) \\\\n}\\\\n\\\\nv2: variousScalars {\\\\n__typename \\\\nnullableString @include(if: $var) \\\\nstring @include(if: $var) \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_v1 = {
+ __typename: string,
+ nullableString: option(string),
+ string: option(string),
+ };
+ type t_v2 = {
+ __typename: string,
+ nullableString: option(string),
+ string: option(string),
+ };
+ type t = {
+ v1: t_v1,
+ v2: t_v2,
+ };
+ type t_variables = {var: bool};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ v1: {
+ let value = (value: Raw.t).v1;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_v1).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_v1).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_v1).string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_v1
+ );
+ },
+ v2: {
+ let value = (value: Raw.t).v2;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_v2).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_v2).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_v2).string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_v2
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let v2 = {
+ let value = (value: t).v2;
+ (
+ {
+ let string = {
+ let value = (value: t_v2).string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = (value: t_v2).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_v2).__typename;
+ value;
+ };
+ {__typename, nullableString, string};
+ }: Raw.t_v2
+ );
+ }
+ and v1 = {
+ let value = (value: t).v1;
+ (
+ {
+ let string = {
+ let value = (value: t_v1).string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = (value: t_v1).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_v1).__typename;
+ value;
+ };
+ {__typename, nullableString, string};
+ }: Raw.t_v1
+ );
+ };
+ {v1, v2};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {var: (a => a)((inp: t_variables).var)};
+ let makeVariables = (~var, ()) =>
+ serializeVariables({var: var}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo subscription.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_simpleSubscription_Dog = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription;
+ type t = {simpleSubscription: t_simpleSubscription};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"subscription {\\\\nsimpleSubscription {\\\\n__typename\\\\n...on Dog {\\\\n__typename \\\\nname \\\\n}\\\\n\\\\n...on Human {\\\\n__typename \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_simpleSubscription_Dog = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_simpleSubscription_Dog)
+ | \`Human(t_simpleSubscription_Human)
+ ];
+ type t = {simpleSubscription: t_simpleSubscription};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ simpleSubscription: {
+ let value = (value: Raw.t).simpleSubscription;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_simpleSubscription_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_simpleSubscription_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_simpleSubscription_Dog).name;
+ value;
+ },
+ }: t_simpleSubscription_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_simpleSubscription_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_simpleSubscription_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_simpleSubscription_Human).name;
+ value;
+ },
+ }: t_simpleSubscription_Human
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_simpleSubscription
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let simpleSubscription = {
+ let value = (value: t).simpleSubscription;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_simpleSubscription_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_simpleSubscription_Dog).__typename;
+ value;
+ };
+ {__typename: \\"Dog\\", name};
+ }: Raw.t_simpleSubscription_Dog,
+ ): Raw.t_simpleSubscription
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_simpleSubscription_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_simpleSubscription_Human).__typename;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_simpleSubscription_Human,
+ ): Raw.t_simpleSubscription
+ )
+ | \`FutureAddedValue(value) => (
+ Obj.magic(value): Raw.t_simpleSubscription
+ )
+ };
+ };
+ {simpleSubscription: simpleSubscription};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo tagged_template.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\n__typename \\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let { graphql } = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n __typename\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery3 = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let { graphql } = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n __typename\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery3 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery4 = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let graphql = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n __typename\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery4 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo typename.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner),
+ };
+ type t = {first: t_first};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nfirst: nestedObject {\\\\n__typename \\\\ninner {\\\\n__typename \\\\ninner {\\\\n__typename \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: option(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: option(t_first_inner),
+ };
+ type t = {first: t_first};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ first: {
+ let value = (value: Raw.t).first;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_first).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_first_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_first_inner_inner).__typename;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_first_inner_inner).field;
+ value;
+ },
+ }: t_first_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let first = {
+ let value = (value: t).first;
+ (
+ {
+ let inner = {
+ let value = (value: t_first).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_first_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_first_inner_inner).field;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_first_inner_inner).__typename;
+ value;
+ };
+ {__typename, field};
+ }: Raw.t_first_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first
+ );
+ };
+ {first: first};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo union.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\n__typename \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQueryNoError = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\n__typename \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQueryNoError {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo unionPartial.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Apollo variant.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationForVariant_dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman;
+ type t_mutationForVariant;
+ type t = {mutationForVariant: t_mutationForVariant};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationForVariant {\\\\nbaseType \\\\nbaseTypeList \\\\ndog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\nhuman {\\\\n__typename \\\\nname \\\\n}\\\\n\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n__typename \\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\n__typename \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationForVariant_dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_mutationForVariant_dogOrHuman_Dog)
+ | \`Human(t_mutationForVariant_dogOrHuman_Human)
+ ];
+ type t_mutationForVariant = [
+ | \`BaseType(string)
+ | \`BaseTypeList(array(string))
+ | \`Dog(t_mutationForVariant_dog)
+ | \`Human(t_mutationForVariant_human)
+ | \`DogOrHuman(t_mutationForVariant_dogOrHuman)
+ ];
+ type t = {mutationForVariant: t_mutationForVariant};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationForVariant: {
+ let value = (value: Raw.t).mutationForVariant;
+ switch (Js.Json.decodeObject(Obj.magic(value): Js.Json.t)) {
+ | None =>
+ Js.Exn.raiseError(
+ \\"graphql-ppx: \\"
+ ++ \\"Expected type \\"
+ ++ \\"VariantTestResult\\"
+ ++ \\" to be an object\\",
+ )
+ | Some(value) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"baseType\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`BaseType(value);
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"baseTypeList\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`BaseTypeList(value |> Js.Array.map(value => value));
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"dog\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`Dog(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationForVariant_dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_mutationForVariant_dog).name;
+ value;
+ },
+ barkVolume: {
+ let value =
+ (value: Raw.t_mutationForVariant_dog).barkVolume;
+ value;
+ },
+ }: t_mutationForVariant_dog,
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"human\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`Human(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationForVariant_human).__typename;
+ value;
+ },
+ name: {
+ let value =
+ (value: Raw.t_mutationForVariant_human).name;
+ value;
+ },
+ }: t_mutationForVariant_human,
+ );
+ | Some(_) =>
+ let temp =
+ Js.Dict.unsafeGet(Obj.magic(value), \\"dogOrHuman\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`DogOrHuman(
+ {
+ let typename: string =
+ Obj.magic(
+ Js.Dict.unsafeGet(
+ Obj.magic(value),
+ \\"__typename\\",
+ ),
+ );
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Dog =
+ Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ __typename;
+ value;
+ },
+ name: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ name;
+ value;
+ },
+ barkVolume: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ barkVolume;
+ value;
+ },
+ }: t_mutationForVariant_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Human =
+ Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Human
+ ).
+ __typename;
+ value;
+ },
+ name: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Human
+ ).
+ name;
+ value;
+ },
+ }: t_mutationForVariant_dogOrHuman_Human
+ );
+ },
+ )
+ | _ =>
+ \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_mutationForVariant_dogOrHuman
+ );
+ },
+ );
+ | Some(_) =>
+ Js.Exn.raiseError(
+ \\"graphql-ppx: \\"
+ ++ \\"All fields on variant selection set on type \\"
+ ++ \\"VariantTestResult\\"
+ ++ \\" were null\\",
+ )
+ };
+ };
+ };
+ };
+ };
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationForVariant = {
+ let value = (value: t).mutationForVariant;
+ Obj.magic(Js.Json.null);
+ };
+ {mutationForVariant: mutationForVariant};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Compilation (Objects) argNamedQuery.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ argNamedQuery: value.argNamedQuery
+ };
+}
+
+function serialize(value) {
+ return {
+ argNamedQuery: value.argNamedQuery
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ query: inp.query
+ };
+}
+
+function makeVariables(query, param) {
+ return serializeVariables({
+ query: query
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($query: Int!) {\\\\nargNamedQuery(query: $query) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) comment.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require(\\"bs-platform/lib/js/array.js\\");
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serialize(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serializeInputObjectEmbeddedInput(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput(Caml_option.valFromOption(b));
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectNonrecursiveInput(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_NonrecursiveInput_49: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput,
+ makeVariables: makeVariables,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) customDecoder.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_format = require(\\"bs-platform/lib/js/caml_format.js\\");
+
+function parse(prim) {
+ return String(prim);
+}
+
+var serialize = Caml_format.caml_int_of_string;
+
+var StringOfInt = {
+ parse: parse,
+ serialize: serialize
+};
+
+var parse$1 = Caml_format.caml_int_of_string;
+
+function serialize$1(prim) {
+ return String(prim);
+}
+
+var IntOfString = {
+ parse: parse$1,
+ serialize: serialize$1
+};
+
+var Raw = { };
+
+function parse$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var $$int = String(value$2);
+ var value$3 = value$1.string;
+ var string = Caml_format.caml_int_of_string(value$3);
+ return {
+ variousScalars: {
+ string: string,
+ int: $$int
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var $$int = Caml_format.caml_int_of_string(value$2);
+ var value$3 = value$1.string;
+ var string = String(value$3);
+ return {
+ variousScalars: {
+ string: string,
+ int: $$int
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.StringOfInt = StringOfInt;
+exports.IntOfString = IntOfString;
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) customScalars.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.customScalarField;
+ var value$2 = value$1.nonNullable;
+ var value$3 = value$1.nullable;
+ var nullable = !(value$3 == null) ? Caml_option.some(value$3) : undefined;
+ return {
+ customScalarField: {
+ nullable: nullable,
+ nonNullable: value$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.customScalarField;
+ var value$2 = value$1.nonNullable;
+ var value$3 = value$1.nullable;
+ var nullable = value$3 !== undefined ? Caml_option.valFromOption(value$3) : null;
+ return {
+ customScalarField: {
+ nullable: nullable,
+ nonNullable: value$2
+ }
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.opt;
+ return {
+ opt: a !== undefined ? Caml_option.valFromOption(a) : undefined,
+ req: inp.req
+ };
+}
+
+function makeVariables(opt, req, param) {
+ return serializeVariables({
+ opt: opt,
+ req: req
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($opt: CustomScalar, $req: CustomScalar!) {\\\\ncustomScalarField(argOptional: $opt, argRequired: $req) {\\\\nnullable \\\\nnonNullable \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) customTypes.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Js_json = require(\\"bs-platform/lib/js/js_json.js\\");
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+function parse(json) {
+ var match = Js_json.decodeString(json);
+ if (match === undefined) {
+ return /* Red */0;
+ }
+ switch (match) {
+ case \\"blue\\" :
+ return /* Blue */2;
+ case \\"green\\" :
+ return /* Green */1;
+ case \\"red\\" :
+ return /* Red */0;
+ default:
+ return /* Red */0;
+ }
+}
+
+function serialize(color) {
+ switch (color) {
+ case /* Red */0 :
+ return \\"red\\";
+ case /* Green */1 :
+ return \\"green\\";
+ case /* Blue */2 :
+ return \\"blue\\";
+
+ }
+}
+
+var Color = {
+ parse: parse,
+ serialize: serialize
+};
+
+function parse$1(json) {
+ var str = Js_json.decodeString(json);
+ if (str !== undefined) {
+ return new Date(str);
+ } else {
+ return new Date();
+ }
+}
+
+function serialize$1(date) {
+ return date.toISOString();
+}
+
+var DateTime = {
+ parse: parse$1,
+ serialize: serialize$1
+};
+
+var Raw = { };
+
+function parse$2(value) {
+ var value$1 = value.customFields;
+ var value$2 = value$1.nullableColor;
+ var nullableColor = !(value$2 == null) ? parse(value$2) : undefined;
+ var value$3 = value$1.futureTime;
+ var futureTime = !(value$3 == null) ? Caml_option.some(parse$1(value$3)) : undefined;
+ var value$4 = value$1.favoriteColor;
+ var favoriteColor = parse(value$4);
+ var value$5 = value$1.currentTime;
+ var currentTime = parse$1(value$5);
+ return {
+ customFields: {
+ currentTime: currentTime,
+ favoriteColor: favoriteColor,
+ futureTime: futureTime,
+ nullableColor: nullableColor
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.customFields;
+ var value$2 = value$1.nullableColor;
+ var nullableColor = value$2 !== undefined ? serialize(value$2) : null;
+ var value$3 = value$1.futureTime;
+ var futureTime = value$3 !== undefined ? Caml_option.valFromOption(value$3).toISOString() : null;
+ var value$4 = value$1.favoriteColor;
+ var favoriteColor = serialize(value$4);
+ var value$5 = value$1.currentTime;
+ var currentTime = value$5.toISOString();
+ return {
+ customFields: {
+ currentTime: currentTime,
+ favoriteColor: favoriteColor,
+ futureTime: futureTime,
+ nullableColor: nullableColor
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\ncustomFields {\\\\ncurrentTime \\\\nfavoriteColor \\\\nfutureTime \\\\nnullableColor \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.Color = Color;
+exports.DateTime = DateTime;
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) defaultObjectValueOnScalar.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ defaultObjectValueOnScalar: value.defaultObjectValueOnScalar
+ };
+}
+
+function serialize(value) {
+ return {
+ defaultObjectValueOnScalar: value.defaultObjectValueOnScalar
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\ndefaultObjectValueOnScalar(filter: {some: {json: \\\\\\"value\\\\\\"}}, arg: {field: \\\\\\"otherValue\\\\\\"}) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) enumInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ enumInput: value.enumInput
+ };
+}
+
+function serialize(value) {
+ return {
+ enumInput: value.enumInput
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.arg;
+ return {
+ arg: a !== 225952583 ? (
+ a >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_SampleField_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: SampleField!) {\\\\nenumInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) explicit_object_record.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nullableOfNullable;
+ var value$3 = value$1.nullableOfNonNullable;
+ var value$4 = value$1.nonNullableOfNullable;
+ var value$5 = value$1.nonNullableOfNonNullable;
+ return {
+ lists: {
+ nullableOfNullable: !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$3 == null) ? value$3.map((function (value) {
+ return value;
+ })) : undefined,
+ nonNullableOfNullable: value$4.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })),
+ nonNullableOfNonNullable: value$5.map((function (value) {
+ return value;
+ }))
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ var lists = {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var RecordsQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$4 == null) ? value$4.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ObjectsQuery = {
+ Raw: Raw$1,
+ query: \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.RecordsQuery = RecordsQuery;
+exports.ObjectsQuery = ObjectsQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) extensions.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+function ExtendQuery(M) {
+ var use = function (param) {
+
+ };
+ return {
+ use: use
+ };
+}
+
+var Parent = {
+ ExtendQuery: ExtendQuery
+};
+
+var Raw = { };
+
+var query = \\"query Bla {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$4 == null) ? value$4.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Bla$prime = {
+ Raw: Raw,
+ query: query,
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+function use(param) {
+
+}
+
+var Bla = {
+ Raw: Raw,
+ query: query,
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL,
+ use: use
+};
+
+exports.Parent = Parent;
+exports.Bla$prime = Bla$prime;
+exports.Bla = Bla;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) fragmentDefinition.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+function deepMerge(json1, param) {
+ return json1;
+}
+
+var GraphQL_PPX = {
+ deepMerge: deepMerge
+};
+
+var query = \\"fragment ListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$1 == null) ? value$1.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var verifyArgsAndParse = parse;
+
+function serialize(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = value$2 !== undefined ? value$2.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var name = \\"ListFragment\\";
+
+var Z__INTERNAL = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var ListFragment = {
+ query: query,
+ Raw: Raw,
+ parse: parse,
+ verifyArgsAndParse: verifyArgsAndParse,
+ serialize: serialize,
+ name: name,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.nullableOfNonNullable;
+ return {
+ nullableOfNonNullable: !(value$1 == null) ? value$1.map((function (value) {
+ return value;
+ })) : undefined
+ };
+}
+
+var verifyArgsAndParse$1 = parse$1;
+
+function serialize$1(value) {
+ var value$1 = value.nullableOfNonNullable;
+ return {
+ nullableOfNonNullable: value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null
+ };
+}
+
+var Z__INTERNAL$1 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var Another = {
+ query: \\"fragment Another on Lists {\\\\nnullableOfNonNullable \\\\n}\\\\n\\",
+ Raw: Raw$1,
+ parse: parse$1,
+ verifyArgsAndParse: verifyArgsAndParse$1,
+ serialize: serialize$1,
+ name: \\"Another\\",
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var query$1 = \\"fragment FragmentWithArgs on Lists {\\\\nlistWithArg(arg1: $arg1) \\\\n}\\\\n\\";
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.listWithArg;
+ return {
+ listWithArg: !(value$1 == null) ? value$1.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined
+ };
+}
+
+function verifyArgsAndParse$2(_arg1, value) {
+ return parse$2(value);
+}
+
+function serialize$2(value) {
+ var value$1 = value.listWithArg;
+ return {
+ listWithArg: value$1 !== undefined ? value$1.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ };
+}
+
+var name$1 = \\"FragmentWithArgs\\";
+
+var Z__INTERNAL$2 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var FragmentWithArgs = {
+ query: query$1,
+ Raw: Raw$2,
+ parse: parse$2,
+ verifyArgsAndParse: verifyArgsAndParse$2,
+ serialize: serialize$2,
+ name: name$1,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var query$2 = \\"fragment InlineListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+
+var Raw$3 = { };
+
+function parse$3(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$1 == null) ? value$1.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var verifyArgsAndParse$3 = parse$3;
+
+function serialize$3(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = value$2 !== undefined ? value$2.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var name$2 = \\"InlineListFragment\\";
+
+var Z__INTERNAL$3 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var InlineFragment = {
+ query: query$2,
+ Raw: Raw$3,
+ parse: parse$3,
+ verifyArgsAndParse: verifyArgsAndParse$3,
+ serialize: serialize$3,
+ name: name$2,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+var Raw$4 = { };
+
+var query$3 = \\"query MyQuery($arg1: String) {\\\\nl1: lists {\\\\n...ListFragment \\\\n}\\\\n\\\\nl2: lists {\\\\n...ListFragment \\\\n...ListFragment \\\\n}\\\\n\\\\nl3: lists {\\\\nnullableOfNullable \\\\n...ListFragment \\\\n...ListFragment \\\\n}\\\\n\\\\nl4: lists {\\\\nnullableOfNullable \\\\n...InlineListFragment \\\\n}\\\\n\\\\nl5: lists {\\\\n...FragmentWithArgs \\\\n}\\\\n\\\\n}\\\\nfragment FragmentWithArgs on Lists {\\\\nlistWithArg(arg1: $arg1) \\\\n}\\\\nfragment InlineListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\nfragment ListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+
+function parse$4(value) {
+ var value$1 = value.l5;
+ var l5 = parse$2(value$1);
+ var value$2 = value.l4;
+ var inlineFragment = parse$3(value$2);
+ var value$3 = value$2[\\"nullableOfNullable\\"];
+ var nullableOfNullable = !(value$3 == null) ? value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ var l4 = {
+ nullableOfNullable: nullableOfNullable,
+ inlineFragment: inlineFragment
+ };
+ var value$4 = value.l3;
+ var frag2 = parse(value$4);
+ var frag1 = parse(value$4);
+ var value$5 = value$4[\\"nullableOfNullable\\"];
+ var nullableOfNullable$1 = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ var l3 = {
+ nullableOfNullable: nullableOfNullable$1,
+ frag1: frag1,
+ frag2: frag2
+ };
+ var value$6 = value.l2;
+ var frag2$1 = parse(value$6);
+ var frag1$1 = parse(value$6);
+ var l2 = {
+ frag1: frag1$1,
+ frag2: frag2$1
+ };
+ var value$7 = value.l1;
+ var l1 = parse(value$7);
+ return {
+ l1: l1,
+ l2: l2,
+ l3: l3,
+ l4: l4,
+ l5: l5
+ };
+}
+
+function serialize$4(value) {
+ var value$1 = value.l5;
+ var l5 = serialize$2(value$1);
+ var value$2 = value.l4;
+ var value$3 = value$2.nullableOfNullable;
+ var l4 = [serialize$3(value$2.inlineFragment)].reduce(deepMerge, {
+ nullableOfNullable: value$3 !== undefined ? value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ });
+ var value$4 = value.l3;
+ var value$5 = value$4.nullableOfNullable;
+ var l3 = [
+ serialize(value$4.frag1),
+ serialize(value$4.frag2)
+ ].reduce(deepMerge, {
+ nullableOfNullable: value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ });
+ var value$6 = value.l2;
+ var l2 = [
+ serialize(value$6.frag1),
+ serialize(value$6.frag2)
+ ].reduce(deepMerge, (function (prim) {
+ return { };
+ }));
+ var value$7 = value.l1;
+ var l1 = serialize(value$7);
+ return {
+ l1: l1,
+ l2: l2,
+ l3: l3,
+ l4: l4,
+ l5: l5
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.arg1;
+ return {
+ arg1: a !== undefined ? a : undefined
+ };
+}
+
+function makeVariables(arg1, param) {
+ return serializeVariables({
+ arg1: arg1
+ });
+}
+
+function makeDefaultVariables(param) {
+ return makeVariables(undefined, undefined);
+}
+
+var Z__INTERNAL$4 = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw$4,
+ query: query$3,
+ parse: parse$4,
+ serialize: serialize$4,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL$4
+};
+
+var Raw$5 = { };
+
+var query$4 = \\"query {\\\\nlists {\\\\n...ListFragment \\\\n}\\\\n\\\\n}\\\\nfragment ListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+
+function parse$5(value) {
+ var value$1 = value.lists;
+ return {
+ lists: parse(value$1)
+ };
+}
+
+function serialize$5(value) {
+ var value$1 = value.lists;
+ return {
+ lists: serialize(value$1)
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$5 = {
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$5,
+ query: query$4,
+ parse: parse$5,
+ serialize: serialize$5,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$5
+};
+
+exports.GraphQL_PPX = GraphQL_PPX;
+exports.ListFragment = ListFragment;
+exports.Another = Another;
+exports.FragmentWithArgs = FragmentWithArgs;
+exports.InlineFragment = InlineFragment;
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) interface.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
+"
+`;
+
+exports[`Compilation (Objects) lists.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$4 == null) ? value$4.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) listsArgs.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require(\\"bs-platform/lib/js/array.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serialize(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.nullableOfNullable;
+ var a$1 = inp.nullableOfNonNullable;
+ var a$2 = inp.nonNullableOfNullable;
+ var a$3 = inp.nonNullableOfNonNullable;
+ return {
+ nullableOfNullable: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ nullableOfNonNullable: a$1 !== undefined ? $$Array.map((function (b) {
+ return b;
+ }), a$1) : undefined,
+ nonNullableOfNullable: $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a$2),
+ nonNullableOfNonNullable: $$Array.map((function (b) {
+ return b;
+ }), a$3)
+ };
+}
+
+function makeVariables(nullableOfNullable, nullableOfNonNullable, nonNullableOfNullable, nonNullableOfNonNullable, param) {
+ return serializeVariables({
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\\\\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) listsInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require(\\"bs-platform/lib/js/array.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serialize(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serializeInputObjectListsInput(inp) {
+ var a = inp.nullableOfNullable;
+ var a$1 = inp.nullableOfNonNullable;
+ var a$2 = inp.nonNullableOfNullable;
+ var a$3 = inp.nonNullableOfNonNullable;
+ return {
+ nullableOfNullable: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ nullableOfNonNullable: a$1 !== undefined ? $$Array.map((function (b) {
+ return b;
+ }), a$1) : undefined,
+ nonNullableOfNullable: $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a$2),
+ nonNullableOfNonNullable: $$Array.map((function (b) {
+ return b;
+ }), a$3)
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectListsInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectListsInput(nullableOfNullable, nullableOfNonNullable, nonNullableOfNullable, nonNullableOfNonNullable, param) {
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_ListsInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: ListsInput!) {\\\\nlistsInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectListsInput: serializeInputObjectListsInput,
+ makeVariables: makeVariables,
+ makeInputObjectListsInput: makeInputObjectListsInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) mutation.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.message;
+ var value$2 = value.field;
+ var field;
+ switch (value$2) {
+ case \\"FIRST\\" :
+ field = /* FIRST */-24399856;
+ break;
+ case \\"SECOND\\" :
+ field = /* SECOND */382368628;
+ break;
+ case \\"THIRD\\" :
+ field = /* THIRD */225952583;
+ break;
+ default:
+ field = /* \`FutureAddedValue */[
+ -31101740,
+ value$2
+ ];
+ }
+ return {
+ field: field,
+ message: value$1
+ };
+ })) : undefined;
+ var value$3 = value$1.value;
+ var value$4 = !(value$3 == null) ? ({
+ stringField: value$3.stringField
+ }) : undefined;
+ return {
+ mutationWithError: {
+ value: value$4,
+ errors: errors
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.message;
+ var value$2 = value.field;
+ var field = typeof value$2 === \\"number\\" ? (
+ value$2 !== 225952583 ? (
+ value$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : value$2[1];
+ return {
+ field: field,
+ message: value$1
+ };
+ })) : null;
+ var value$3 = value$1.value;
+ var value$4 = value$3 !== undefined ? ({
+ stringField: Caml_option.valFromOption(value$3).stringField
+ }) : null;
+ return {
+ mutationWithError: {
+ value: value$4,
+ errors: errors
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"mutation {\\\\nmutationWithError {\\\\nvalue {\\\\nstringField \\\\n}\\\\n\\\\nerrors {\\\\nfield \\\\nmessage \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) mutationWithArgs.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serialize(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ required: inp.required
+ };
+}
+
+function makeVariables(required, param) {
+ return serializeVariables({
+ required: required
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) mutationWithArgsAndNoRecords.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serialize(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ required: inp.required
+ };
+}
+
+function makeVariables(required, param) {
+ return serializeVariables({
+ required: required
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) nested.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.let_;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 == null) {
+ inner = undefined;
+ } else {
+ var value$3 = value$2.inner;
+ inner = {
+ inner: !(value$3 == null) ? ({
+ field: value$3.field
+ }) : undefined
+ };
+ }
+ var let_ = {
+ inner: inner
+ };
+ var value$4 = value.second;
+ var value$5 = value$4.inner;
+ var inner$1;
+ if (value$5 == null) {
+ inner$1 = undefined;
+ } else {
+ var value$6 = value$5.inner;
+ var tmp;
+ if (value$6 == null) {
+ tmp = undefined;
+ } else {
+ var value$7 = value$6.f2;
+ var value$8 = value$6.f1;
+ tmp = {
+ f1: value$8,
+ f2: value$7
+ };
+ }
+ inner$1 = {
+ inner: tmp
+ };
+ }
+ var second = {
+ inner: inner$1
+ };
+ var value$9 = value.first;
+ var value$10 = value$9.inner;
+ var inner$2;
+ if (value$10 == null) {
+ inner$2 = undefined;
+ } else {
+ var value$11 = value$10.inner;
+ inner$2 = {
+ inner: !(value$11 == null) ? ({
+ field: value$11.field
+ }) : undefined
+ };
+ }
+ var first = {
+ inner: inner$2
+ };
+ return {
+ first: first,
+ second: second,
+ let_: let_
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.let_;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 !== undefined) {
+ var value$3 = Caml_option.valFromOption(value$2).inner;
+ inner = {
+ inner: value$3 !== undefined ? ({
+ field: Caml_option.valFromOption(value$3).field
+ }) : null
+ };
+ } else {
+ inner = null;
+ }
+ var let_ = {
+ inner: inner
+ };
+ var value$4 = value.second;
+ var value$5 = value$4.inner;
+ var inner$1;
+ if (value$5 !== undefined) {
+ var value$6 = Caml_option.valFromOption(value$5).inner;
+ var tmp;
+ if (value$6 !== undefined) {
+ var value$7 = value$6.f2;
+ var value$8 = value$6.f1;
+ tmp = {
+ f1: value$8,
+ f2: value$7
+ };
+ } else {
+ tmp = null;
+ }
+ inner$1 = {
+ inner: tmp
+ };
+ } else {
+ inner$1 = null;
+ }
+ var second = {
+ inner: inner$1
+ };
+ var value$9 = value.first;
+ var value$10 = value$9.inner;
+ var inner$2;
+ if (value$10 !== undefined) {
+ var value$11 = Caml_option.valFromOption(value$10).inner;
+ inner$2 = {
+ inner: value$11 !== undefined ? ({
+ field: Caml_option.valFromOption(value$11).field
+ }) : null
+ };
+ } else {
+ inner$2 = null;
+ }
+ var first = {
+ inner: inner$2
+ };
+ return {
+ first: first,
+ second: second,
+ let_: let_
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nfirst: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nsecond: nestedObject {\\\\ninner {\\\\ninner {\\\\nf1: field \\\\nf2: field \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nlet: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) nonrecursiveInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require(\\"bs-platform/lib/js/array.js\\");
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serialize(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serializeInputObjectEmbeddedInput(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput(Caml_option.valFromOption(b));
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectNonrecursiveInput(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_NonrecursiveInput_49: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput,
+ makeVariables: makeVariables,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.more;
+ var value$2 = value.scalarsInput;
+ return {
+ scalarsInput: value$2,
+ more: value$1
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.more;
+ var value$2 = value.scalarsInput;
+ return {
+ scalarsInput: value$2,
+ more: value$1
+ };
+}
+
+function serializeInputObjectEmbeddedInput$1(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput$1(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput$1(Caml_option.valFromOption(b));
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables$1(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput$1(inp.arg),
+ arg2: serializeInputObjectNonrecursiveInput$1(inp.arg2)
+ };
+}
+
+function makeVariables$1(arg, arg2, param) {
+ return serializeVariables$1({
+ arg: arg,
+ arg2: arg2
+ });
+}
+
+function makeInputObjectNonrecursiveInput$1(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput$1(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL$1 = {
+ _graphql_NonrecursiveInput_169: 0,
+ _graphql_NonrecursiveInput_196: 0,
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$1,
+ query: \\"query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\\\\nscalarsInput(arg: $arg) \\\\nmore: scalarsInput(arg: $arg2) \\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput$1,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput$1,
+ makeVariables: makeVariables$1,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput$1,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) omitFutureValueEnum.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_builtin_exceptions = require(\\"bs-platform/lib/js/caml_builtin_exceptions.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field;
+ switch (value$1) {
+ case \\"FIRST\\" :
+ field = /* FIRST */-24399856;
+ break;
+ case \\"SECOND\\" :
+ field = /* SECOND */382368628;
+ break;
+ case \\"THIRD\\" :
+ field = /* THIRD */225952583;
+ break;
+ default:
+ field = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : undefined;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = typeof value$1 === \\"number\\" ? (
+ value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : value$1[1];
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Normal = {
+ Raw: Raw,
+ query: \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field;
+ switch (value$1) {
+ case \\"FIRST\\" :
+ field = /* FIRST */-24399856;
+ break;
+ case \\"SECOND\\" :
+ field = /* SECOND */382368628;
+ break;
+ case \\"THIRD\\" :
+ field = /* THIRD */225952583;
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : undefined;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\";
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ByConfig = {
+ Raw: Raw$1,
+ query: \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field;
+ switch (value$1) {
+ case \\"FIRST\\" :
+ field = /* FIRST */-24399856;
+ break;
+ case \\"SECOND\\" :
+ field = /* SECOND */382368628;
+ break;
+ case \\"THIRD\\" :
+ field = /* THIRD */225952583;
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : undefined;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\";
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var ByDirective = {
+ Raw: Raw$2,
+ query: \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+exports.Normal = Normal;
+exports.ByConfig = ByConfig;
+exports.ByDirective = ByDirective;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) omitFutureValueUnion.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_builtin_exceptions = require(\\"bs-platform/lib/js/caml_builtin_exceptions.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var tmp;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Normal = {
+ Raw: Raw,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.dogOrHuman;
+ var tmp;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ByConfig = {
+ Raw: Raw$1,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.dogOrHuman;
+ var tmp;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var ByDirective = {
+ Raw: Raw$2,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+exports.Normal = Normal;
+exports.ByConfig = ByConfig;
+exports.ByDirective = ByDirective;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) pokedexApolloMode.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 == null) {
+ tmp = undefined;
+ } else {
+ var value$2 = value$1.name;
+ var name = !(value$2 == null) ? value$2 : undefined;
+ var value$3 = value$1.id;
+ tmp = {
+ id: value$3,
+ name: name
+ };
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 !== undefined) {
+ var value$2 = Caml_option.valFromOption(value$1);
+ var value$3 = value$2.name;
+ var name = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$2.id;
+ tmp = {
+ id: value$4,
+ name: name
+ };
+ } else {
+ tmp = null;
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\npokemon(name: \\\\\\"Pikachu\\\\\\") {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) pokedexScalars.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 == null) {
+ tmp = undefined;
+ } else {
+ var value$2 = value$1.name;
+ var name = !(value$2 == null) ? value$2 : undefined;
+ var value$3 = value$1.id;
+ tmp = {
+ id: value$3,
+ name: name
+ };
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 !== undefined) {
+ var value$2 = Caml_option.valFromOption(value$1);
+ var value$3 = value$2.name;
+ var name = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$2.id;
+ tmp = {
+ id: value$4,
+ name: name
+ };
+ } else {
+ tmp = null;
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.id;
+ var a$1 = inp.name;
+ return {
+ id: a !== undefined ? a : undefined,
+ name: a$1 !== undefined ? a$1 : undefined
+ };
+}
+
+function makeVariables(id, name, param) {
+ return serializeVariables({
+ id: id,
+ name: name
+ });
+}
+
+function makeDefaultVariables(param) {
+ return makeVariables(undefined, undefined, undefined);
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query pokemon($id: String, $name: String) {\\\\npokemon(name: $name, id: $id) {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) record.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var value$3 = value$1.string;
+ return {
+ variousScalars: {
+ string: value$3,
+ int: value$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var value$3 = value$1.string;
+ return {
+ variousScalars: {
+ string: value$3,
+ int: value$2
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var nullableString = !(value$2 == null) ? value$2 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var nullableString = value$2 !== undefined ? value$2 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var OneFieldQuery = {
+ Raw: Raw$1,
+ query: \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var query = \\"fragment Fragment on VariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\";
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.int;
+ var value$2 = value.string;
+ return {
+ string: value$2,
+ int: value$1
+ };
+}
+
+var verifyArgsAndParse = parse$2;
+
+function serialize$2(value) {
+ var value$1 = value.int;
+ var value$2 = value.string;
+ return {
+ string: value$2,
+ int: value$1
+ };
+}
+
+var name = \\"Fragment\\";
+
+var Z__INTERNAL$2 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var Fragment = {
+ query: query,
+ Raw: Raw$2,
+ parse: parse$2,
+ verifyArgsAndParse: verifyArgsAndParse,
+ serialize: serialize$2,
+ name: name,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var Raw$3 = { };
+
+var query$1 = \\"query {\\\\nvariousScalars {\\\\n...Fragment \\\\n}\\\\n\\\\n}\\\\nfragment Fragment on VariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\";
+
+function parse$3(value) {
+ var value$1 = value.variousScalars;
+ return {
+ variousScalars: parse$2(value$1)
+ };
+}
+
+function serialize$3(value) {
+ var value$1 = value.variousScalars;
+ return {
+ variousScalars: serialize$2(value$1)
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$3 = {
+ graphql_module: 0
+};
+
+var Untitled1 = {
+ Raw: Raw$3,
+ query: query$1,
+ parse: parse$3,
+ serialize: serialize$3,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+var ExternalFragmentQuery = {
+ Fragment: Fragment,
+ Untitled1: Untitled1
+};
+
+var Raw$4 = { };
+
+function parse$4(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ if (typename === \\"Dog\\") {
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ } else {
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$4(value) {
+ var value$1 = value.dogOrHuman;
+ var tmp;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables$3(param) {
+
+}
+
+function makeVariables$3(param) {
+
+}
+
+function makeDefaultVariables$3(param) {
+
+}
+
+var Z__INTERNAL$4 = {
+ graphql_module: 0
+};
+
+var InlineFragmentQuery = {
+ Raw: Raw$4,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$4,
+ serialize: serialize$4,
+ serializeVariables: serializeVariables$3,
+ makeVariables: makeVariables$3,
+ makeDefaultVariables: makeDefaultVariables$3,
+ Z__INTERNAL: Z__INTERNAL$4
+};
+
+var query$2 = \\"fragment DogFragment on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\";
+
+var Raw$5 = { };
+
+function parse$5(value) {
+ var value$1 = value.barkVolume;
+ var value$2 = value.name;
+ return {
+ name: value$2,
+ barkVolume: value$1
+ };
+}
+
+var verifyArgsAndParse$1 = parse$5;
+
+function serialize$5(value) {
+ var value$1 = value.barkVolume;
+ var value$2 = value.name;
+ return {
+ name: value$2,
+ barkVolume: value$1
+ };
+}
+
+var name$1 = \\"DogFragment\\";
+
+var Z__INTERNAL$5 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var DogFragment = {
+ query: query$2,
+ Raw: Raw$5,
+ parse: parse$5,
+ verifyArgsAndParse: verifyArgsAndParse$1,
+ serialize: serialize$5,
+ name: name$1,
+ Z__INTERNAL: Z__INTERNAL$5
+};
+
+var Raw$6 = { };
+
+var query$3 = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n...DogFragment \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\nfragment DogFragment on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\";
+
+function parse$6(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp = typename === \\"Dog\\" ? /* \`Dog */[
+ 3406428,
+ parse$5(value$1)
+ ] : /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$6(value) {
+ var value$1 = value.dogOrHuman;
+ return {
+ dogOrHuman: value$1[0] >= 3406428 ? serialize$5(value$1[1]) : value$1[1]
+ };
+}
+
+function serializeVariables$4(param) {
+
+}
+
+function makeVariables$4(param) {
+
+}
+
+function makeDefaultVariables$4(param) {
+
+}
+
+var Z__INTERNAL$6 = {
+ graphql_module: 0
+};
+
+var Untitled1$1 = {
+ Raw: Raw$6,
+ query: query$3,
+ parse: parse$6,
+ serialize: serialize$6,
+ serializeVariables: serializeVariables$4,
+ makeVariables: makeVariables$4,
+ makeDefaultVariables: makeDefaultVariables$4,
+ Z__INTERNAL: Z__INTERNAL$6
+};
+
+var UnionExternalFragmentQuery = {
+ DogFragment: DogFragment,
+ Untitled1: Untitled1$1
+};
+
+exports.MyQuery = MyQuery;
+exports.OneFieldQuery = OneFieldQuery;
+exports.ExternalFragmentQuery = ExternalFragmentQuery;
+exports.InlineFragmentQuery = InlineFragmentQuery;
+exports.UnionExternalFragmentQuery = UnionExternalFragmentQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) recursiveInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ recursiveInput: value.recursiveInput
+ };
+}
+
+function serialize(value) {
+ return {
+ recursiveInput: value.recursiveInput
+ };
+}
+
+function serializeInputObjectRecursiveInput(inp) {
+ var a = inp.otherField;
+ var a$1 = inp.inner;
+ var a$2 = inp.enum;
+ return {
+ otherField: a !== undefined ? a : undefined,
+ inner: a$1 !== undefined ? serializeInputObjectRecursiveInput(Caml_option.valFromOption(a$1)) : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectRecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectRecursiveInput(otherField, inner, $$enum, param) {
+ return {
+ otherField: otherField,
+ inner: inner,
+ enum: $$enum
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_RecursiveInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: RecursiveInput!) {\\\\nrecursiveInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectRecursiveInput: serializeInputObjectRecursiveInput,
+ makeVariables: makeVariables,
+ makeInputObjectRecursiveInput: makeInputObjectRecursiveInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) scalars.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) scalarsArgs.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serialize(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.nullableString;
+ var a$1 = inp.nullableInt;
+ var a$2 = inp.nullableFloat;
+ var a$3 = inp.nullableBoolean;
+ var a$4 = inp.nullableID;
+ return {
+ nullableString: a !== undefined ? a : undefined,
+ string: inp.string,
+ nullableInt: a$1 !== undefined ? a$1 : undefined,
+ int: inp.int,
+ nullableFloat: a$2 !== undefined ? a$2 : undefined,
+ float: inp.float,
+ nullableBoolean: a$3 !== undefined ? a$3 : undefined,
+ boolean: inp.boolean,
+ nullableID: a$4 !== undefined ? a$4 : undefined,
+ id: inp.id
+ };
+}
+
+function makeVariables(nullableString, string, nullableInt, $$int, nullableFloat, $$float, nullableBoolean, $$boolean, nullableID, id, param) {
+ return serializeVariables({
+ nullableString: nullableString,
+ string: string,
+ nullableInt: nullableInt,
+ int: $$int,
+ nullableFloat: nullableFloat,
+ float: $$float,
+ nullableBoolean: nullableBoolean,
+ boolean: $$boolean,
+ nullableID: nullableID,
+ id: id
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\\\\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) scalarsInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serialize(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serializeInputObjectVariousScalarsInput(inp) {
+ var a = inp.nullableString;
+ var a$1 = inp.nullableInt;
+ var a$2 = inp.nullableFloat;
+ var a$3 = inp.nullableBoolean;
+ var a$4 = inp.nullableID;
+ return {
+ nullableString: a !== undefined ? a : undefined,
+ string: inp.string,
+ nullableInt: a$1 !== undefined ? a$1 : undefined,
+ int: inp.int,
+ nullableFloat: a$2 !== undefined ? a$2 : undefined,
+ float: inp.float,
+ nullableBoolean: a$3 !== undefined ? a$3 : undefined,
+ boolean: inp.boolean,
+ nullableID: a$4 !== undefined ? a$4 : undefined,
+ id: inp.id
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectVariousScalarsInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectVariousScalarsInput(nullableString, string, nullableInt, $$int, nullableFloat, $$float, nullableBoolean, $$boolean, nullableID, id, param) {
+ return {
+ nullableString: nullableString,
+ string: string,
+ nullableInt: nullableInt,
+ int: $$int,
+ nullableFloat: nullableFloat,
+ float: $$float,
+ nullableBoolean: nullableBoolean,
+ boolean: $$boolean,
+ nullableID: nullableID,
+ id: id
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_VariousScalarsInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: VariousScalarsInput!) {\\\\nscalarsInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectVariousScalarsInput: serializeInputObjectVariousScalarsInput,
+ makeVariables: makeVariables,
+ makeInputObjectVariousScalarsInput: makeInputObjectVariousScalarsInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) skipDirectives.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.v2;
+ var value$2 = value$1.string;
+ var string = !(value$2 == null) ? value$2 : undefined;
+ var value$3 = value$1.nullableString;
+ var nullableString = !(value$3 == null) ? value$3 : undefined;
+ var v2 = {
+ nullableString: nullableString,
+ string: string
+ };
+ var value$4 = value.v1;
+ var value$5 = value$4.string;
+ var string$1 = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$4.nullableString;
+ var nullableString$1 = !(value$6 == null) ? value$6 : undefined;
+ var v1 = {
+ nullableString: nullableString$1,
+ string: string$1
+ };
+ return {
+ v1: v1,
+ v2: v2
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.v2;
+ var value$2 = value$1.string;
+ var string = value$2 !== undefined ? value$2 : null;
+ var value$3 = value$1.nullableString;
+ var nullableString = value$3 !== undefined ? value$3 : null;
+ var v2 = {
+ nullableString: nullableString,
+ string: string
+ };
+ var value$4 = value.v1;
+ var value$5 = value$4.string;
+ var string$1 = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$4.nullableString;
+ var nullableString$1 = value$6 !== undefined ? value$6 : null;
+ var v1 = {
+ nullableString: nullableString$1,
+ string: string$1
+ };
+ return {
+ v1: v1,
+ v2: v2
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ var: inp.var
+ };
+}
+
+function makeVariables($$var, param) {
+ return serializeVariables({
+ var: $$var
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($var: Boolean!) {\\\\nv1: variousScalars {\\\\nnullableString @skip(if: $var) \\\\nstring @skip(if: $var) \\\\n}\\\\n\\\\nv2: variousScalars {\\\\nnullableString @include(if: $var) \\\\nstring @include(if: $var) \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) subscription.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.simpleSubscription;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ simpleSubscription: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.simpleSubscription;
+ var variant = value$1[0];
+ var tmp;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1].name;
+ tmp = {
+ __typename: \\"Dog\\",
+ name: value$2
+ };
+ } else {
+ var value$3 = value$1[1].name;
+ tmp = {
+ __typename: \\"Human\\",
+ name: value$3
+ };
+ }
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ simpleSubscription: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"subscription {\\\\nsimpleSubscription {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) tagged_template.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+let { graphql } = require(\\"gatsby\\")
+;
+
+var query = (graphql\`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+\`);
+
+function parse$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$1,
+ query: query,
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+let { graphql } = require(\\"gatsby\\")
+;
+
+var query$1 = (graphql\`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+\`);
+
+function parse$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var MyQuery3 = {
+ Raw: Raw$2,
+ query: query$1,
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var Raw$3 = { };
+
+let graphql = require(\\"gatsby\\")
+;
+
+var query$2 = (graphql\`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+\`);
+
+function parse$3(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize$3(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables$3(param) {
+
+}
+
+function makeVariables$3(param) {
+
+}
+
+function makeDefaultVariables$3(param) {
+
+}
+
+var Z__INTERNAL$3 = {
+ graphql_module: 0
+};
+
+var MyQuery4 = {
+ Raw: Raw$3,
+ query: query$2,
+ parse: parse$3,
+ serialize: serialize$3,
+ serializeVariables: serializeVariables$3,
+ makeVariables: makeVariables$3,
+ makeDefaultVariables: makeDefaultVariables$3,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+exports.MyQuery3 = MyQuery3;
+exports.MyQuery4 = MyQuery4;
+/* Not a pure module */
+"
+`;
+
+exports[`Compilation (Objects) typename.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 == null) {
+ inner = undefined;
+ } else {
+ var value$3 = value$2.inner;
+ var inner$1;
+ if (value$3 == null) {
+ inner$1 = undefined;
+ } else {
+ var value$4 = value$3.field;
+ var value$5 = value$3.__typename;
+ inner$1 = {
+ __typename: value$5,
+ field: value$4
+ };
+ }
+ var value$6 = value$2.__typename;
+ inner = {
+ __typename: value$6,
+ inner: inner$1
+ };
+ }
+ var value$7 = value$1.__typename;
+ return {
+ first: {
+ __typename: value$7,
+ inner: inner
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 !== undefined) {
+ var value$3 = Caml_option.valFromOption(value$2);
+ var value$4 = value$3.inner;
+ var inner$1;
+ if (value$4 !== undefined) {
+ var value$5 = Caml_option.valFromOption(value$4);
+ var value$6 = value$5.field;
+ var value$7 = value$5.__typename;
+ inner$1 = {
+ __typename: value$7,
+ field: value$6
+ };
+ } else {
+ inner$1 = null;
+ }
+ var value$8 = value$3.__typename;
+ inner = {
+ __typename: value$8,
+ inner: inner$1
+ };
+ } else {
+ inner = null;
+ }
+ var value$9 = value$1.__typename;
+ return {
+ first: {
+ __typename: value$9,
+ inner: inner
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nfirst: nestedObject {\\\\n__typename \\\\ninner {\\\\n__typename \\\\ninner {\\\\n__typename \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) union.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var tmp;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var tmp;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var MyQueryNoError = {
+ Raw: Raw$1,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQueryNoError = MyQueryNoError;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) unionPartial.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ if (typename === \\"Dog\\") {
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ } else {
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var tmp;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Objects) variant.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Js_exn = require(\\"bs-platform/lib/js/js_exn.js\\");
+var Js_json = require(\\"bs-platform/lib/js/js_json.js\\");
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationForVariant;
+ var value$2 = Js_json.decodeObject(value$1);
+ var tmp;
+ if (value$2 !== undefined) {
+ var value$3 = Caml_option.valFromOption(value$2);
+ var temp = value$3[\\"baseType\\"];
+ var match = Js_json.decodeNull(temp);
+ if (match !== undefined) {
+ var temp$1 = value$3[\\"baseTypeList\\"];
+ var match$1 = Js_json.decodeNull(temp$1);
+ if (match$1 !== undefined) {
+ var temp$2 = value$3[\\"dog\\"];
+ var match$2 = Js_json.decodeNull(temp$2);
+ if (match$2 !== undefined) {
+ var temp$3 = value$3[\\"human\\"];
+ var match$3 = Js_json.decodeNull(temp$3);
+ if (match$3 !== undefined) {
+ var temp$4 = value$3[\\"dogOrHuman\\"];
+ var match$4 = Js_json.decodeNull(temp$4);
+ if (match$4 !== undefined) {
+ tmp = Js_exn.raiseError(\\"graphql-ppx: All fields on variant selection set on type VariantTestResult were null\\");
+ } else {
+ var typename = temp$4[\\"__typename\\"];
+ var tmp$1;
+ switch (typename) {
+ case \\"Dog\\" :
+ var value$4 = temp$4.barkVolume;
+ var value$5 = temp$4.name;
+ tmp$1 = /* \`Dog */[
+ 3406428,
+ {
+ name: value$5,
+ barkVolume: value$4
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp$1 = /* \`Human */[
+ -1031617139,
+ {
+ name: temp$4.name
+ }
+ ];
+ break;
+ default:
+ tmp$1 = /* \`FutureAddedValue */[
+ -31101740,
+ temp$4
+ ];
+ }
+ tmp = /* \`DogOrHuman */[
+ 974247566,
+ tmp$1
+ ];
+ }
+ } else {
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: temp$3.name
+ }
+ ];
+ }
+ } else {
+ var value$6 = temp$2.barkVolume;
+ var value$7 = temp$2.name;
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$7,
+ barkVolume: value$6
+ }
+ ];
+ }
+ } else {
+ tmp = /* \`BaseTypeList */[
+ -259847799,
+ temp$1.map((function (value) {
+ return value;
+ }))
+ ];
+ }
+ } else {
+ tmp = /* \`BaseType */[
+ -620191861,
+ temp
+ ];
+ }
+ } else {
+ tmp = Js_exn.raiseError(\\"graphql-ppx: Expected type VariantTestResult to be an object\\");
+ }
+ return {
+ mutationForVariant: tmp
+ };
+}
+
+function serialize(value) {
+ value.mutationForVariant;
+ return {
+ mutationForVariant: null
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"mutation {\\\\nmutationForVariant {\\\\nbaseType \\\\nbaseTypeList \\\\ndog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\nhuman {\\\\nname \\\\n}\\\\n\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) argNamedQuery.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ argNamedQuery: value.argNamedQuery
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.argNamedQuery;
+ return {
+ argNamedQuery: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ query: inp.query
+ };
+}
+
+function makeVariables(query, param) {
+ return {
+ query: query
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_query_82: 0,
+ _graphql_query_75: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($query: Int!) {\\\\nargNamedQuery(query: $query) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) comment.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require(\\"bs-platform/lib/js/array.js\\");
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.nonrecursiveInput;
+ return {
+ nonrecursiveInput: value$1
+ };
+}
+
+function serializeInputObjectEmbeddedInput(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput(b);
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(arg)
+ };
+}
+
+function makeInputObjectNonrecursiveInput(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_100: 0,
+ _graphql_arg_95: 0,
+ _graphql_NonrecursiveInput_49: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput,
+ makeVariables: makeVariables,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) customDecoder.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_format = require(\\"bs-platform/lib/js/caml_format.js\\");
+
+function parse(prim) {
+ return String(prim);
+}
+
+var serialize = Caml_format.caml_int_of_string;
+
+var StringOfInt = {
+ parse: parse,
+ serialize: serialize
+};
+
+var parse$1 = Caml_format.caml_int_of_string;
+
+function serialize$1(prim) {
+ return String(prim);
+}
+
+var IntOfString = {
+ parse: parse$1,
+ serialize: serialize$1
+};
+
+var Raw = { };
+
+function parse$2(value) {
+ var value$1 = value.variousScalars;
+ return {
+ variousScalars: {
+ string: Caml_format.caml_int_of_string(value$1.string),
+ int: String(value$1.int)
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var $$int = Caml_format.caml_int_of_string(value$2);
+ var value$3 = value$1.string;
+ var string = String(value$3);
+ var variousScalars = {
+ string: string,
+ int: $$int
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.StringOfInt = StringOfInt;
+exports.IntOfString = IntOfString;
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) customScalars.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.customScalarField;
+ var value$2 = value$1.nullable;
+ return {
+ customScalarField: {
+ nullable: !(value$2 == null) ? Caml_option.some(value$2) : undefined,
+ nonNullable: value$1.nonNullable
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.customScalarField;
+ var value$2 = value$1.nonNullable;
+ var value$3 = value$1.nullable;
+ var nullable = value$3 !== undefined ? Caml_option.valFromOption(value$3) : null;
+ var customScalarField = {
+ nullable: nullable,
+ nonNullable: value$2
+ };
+ return {
+ customScalarField: customScalarField
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.opt;
+ return {
+ opt: a !== undefined ? Caml_option.valFromOption(a) : undefined,
+ req: inp.req
+ };
+}
+
+function makeVariables(opt, req, param) {
+ return serializeVariables({
+ opt: opt,
+ req: req
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_opt_119: 0,
+ _graphql_argOptional_106: 0,
+ _graphql_req_138: 0,
+ _graphql_argRequired_125: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($opt: CustomScalar, $req: CustomScalar!) {\\\\ncustomScalarField(argOptional: $opt, argRequired: $req) {\\\\nnullable \\\\nnonNullable \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) customTypes.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Js_json = require(\\"bs-platform/lib/js/js_json.js\\");
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+function parse(json) {
+ var match = Js_json.decodeString(json);
+ if (match === undefined) {
+ return /* Red */0;
+ }
+ switch (match) {
+ case \\"blue\\" :
+ return /* Blue */2;
+ case \\"green\\" :
+ return /* Green */1;
+ case \\"red\\" :
+ return /* Red */0;
+ default:
+ return /* Red */0;
+ }
+}
+
+function serialize(color) {
+ switch (color) {
+ case /* Red */0 :
+ return \\"red\\";
+ case /* Green */1 :
+ return \\"green\\";
+ case /* Blue */2 :
+ return \\"blue\\";
+
+ }
+}
+
+var Color = {
+ parse: parse,
+ serialize: serialize
+};
+
+function parse$1(json) {
+ var str = Js_json.decodeString(json);
+ if (str !== undefined) {
+ return new Date(str);
+ } else {
+ return new Date();
+ }
+}
+
+function serialize$1(date) {
+ return date.toISOString();
+}
+
+var DateTime = {
+ parse: parse$1,
+ serialize: serialize$1
+};
+
+var Raw = { };
+
+function parse$2(value) {
+ var value$1 = value.customFields;
+ var value$2 = value$1.futureTime;
+ var value$3 = value$1.nullableColor;
+ return {
+ customFields: {
+ currentTime: parse$1(value$1.currentTime),
+ favoriteColor: parse(value$1.favoriteColor),
+ futureTime: !(value$2 == null) ? Caml_option.some(parse$1(value$2)) : undefined,
+ nullableColor: !(value$3 == null) ? parse(value$3) : undefined
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.customFields;
+ var value$2 = value$1.nullableColor;
+ var nullableColor = value$2 !== undefined ? serialize(value$2) : null;
+ var value$3 = value$1.futureTime;
+ var futureTime = value$3 !== undefined ? Caml_option.valFromOption(value$3).toISOString() : null;
+ var value$4 = value$1.favoriteColor;
+ var favoriteColor = serialize(value$4);
+ var value$5 = value$1.currentTime;
+ var currentTime = value$5.toISOString();
+ var customFields = {
+ currentTime: currentTime,
+ favoriteColor: favoriteColor,
+ futureTime: futureTime,
+ nullableColor: nullableColor
+ };
+ return {
+ customFields: customFields
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\ncustomFields {\\\\ncurrentTime \\\\nfavoriteColor \\\\nfutureTime \\\\nnullableColor \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.Color = Color;
+exports.DateTime = DateTime;
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) defaultObjectValueOnScalar.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ defaultObjectValueOnScalar: value.defaultObjectValueOnScalar
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.defaultObjectValueOnScalar;
+ return {
+ defaultObjectValueOnScalar: value$1
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ _graphql_filter_92: 0,
+ _graphql_arg_140: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\ndefaultObjectValueOnScalar(filter: {some: {json: \\\\\\"value\\\\\\"}}, arg: {field: \\\\\\"otherValue\\\\\\"}) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) enumInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ enumInput: value.enumInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.enumInput;
+ return {
+ enumInput: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.arg;
+ return {
+ arg: a !== 225952583 ? (
+ a >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_82: 0,
+ _graphql_arg_77: 0,
+ _graphql_SampleField_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: SampleField!) {\\\\nenumInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) explicit_object_record.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nullableOfNullable;
+ var value$3 = value$1.nullableOfNonNullable;
+ var value$4 = value$1.nonNullableOfNullable;
+ var value$5 = value$1.nonNullableOfNonNullable;
+ return {
+ lists: {
+ nullableOfNullable: !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$3 == null) ? value$3.map((function (value) {
+ return value;
+ })) : undefined,
+ nonNullableOfNullable: value$4.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })),
+ nonNullableOfNonNullable: value$5.map((function (value) {
+ return value;
+ }))
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ var lists = {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var RecordsQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$4 == null) ? value$4.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ObjectsQuery = {
+ Raw: Raw$1,
+ query: \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.RecordsQuery = RecordsQuery;
+exports.ObjectsQuery = ObjectsQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) extensions.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+function ExtendQuery(M) {
+ var use = function (param) {
+
+ };
+ return {
+ use: use
+ };
+}
+
+var Parent = {
+ ExtendQuery: ExtendQuery
+};
+
+var Raw = { };
+
+var query = \\"query Bla {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nullableOfNullable;
+ var value$3 = value$1.nullableOfNonNullable;
+ var value$4 = value$1.nonNullableOfNullable;
+ var value$5 = value$1.nonNullableOfNonNullable;
+ return {
+ lists: {
+ nullableOfNullable: !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$3 == null) ? value$3.map((function (value) {
+ return value;
+ })) : undefined,
+ nonNullableOfNullable: value$4.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })),
+ nonNullableOfNonNullable: value$5.map((function (value) {
+ return value;
+ }))
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ var lists = {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Bla$prime = {
+ Raw: Raw,
+ query: query,
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+function use(param) {
+
+}
+
+var Bla = {
+ Raw: Raw,
+ query: query,
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL,
+ use: use
+};
+
+exports.Parent = Parent;
+exports.Bla$prime = Bla$prime;
+exports.Bla = Bla;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) fragmentDefinition.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+function deepMerge(json1, param) {
+ return json1;
+}
+
+var GraphQL_PPX = {
+ deepMerge: deepMerge
+};
+
+var query = \\"fragment ListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.nullableOfNullable;
+ var value$2 = value.nullableOfNonNullable;
+ return {
+ nullableOfNullable: !(value$1 == null) ? value$1.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$2 == null) ? value$2.map((function (value) {
+ return value;
+ })) : undefined
+ };
+}
+
+var verifyArgsAndParse = parse;
+
+function serialize(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = value$2 !== undefined ? value$2.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var name = \\"ListFragment\\";
+
+var Z__INTERNAL = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var ListFragment = {
+ query: query,
+ Raw: Raw,
+ parse: parse,
+ verifyArgsAndParse: verifyArgsAndParse,
+ serialize: serialize,
+ name: name,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.nullableOfNonNullable;
+ return {
+ nullableOfNonNullable: !(value$1 == null) ? value$1.map((function (value) {
+ return value;
+ })) : undefined
+ };
+}
+
+var verifyArgsAndParse$1 = parse$1;
+
+function serialize$1(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ return {
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var Z__INTERNAL$1 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var Another = {
+ query: \\"fragment Another on Lists {\\\\nnullableOfNonNullable \\\\n}\\\\n\\",
+ Raw: Raw$1,
+ parse: parse$1,
+ verifyArgsAndParse: verifyArgsAndParse$1,
+ serialize: serialize$1,
+ name: \\"Another\\",
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var query$1 = \\"fragment FragmentWithArgs on Lists {\\\\nlistWithArg(arg1: $arg1) \\\\n}\\\\n\\";
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.listWithArg;
+ return {
+ listWithArg: !(value$1 == null) ? value$1.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined
+ };
+}
+
+function verifyArgsAndParse$2(_arg1, value) {
+ return parse$2(value);
+}
+
+function serialize$2(value) {
+ var value$1 = value.listWithArg;
+ var listWithArg = value$1 !== undefined ? value$1.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ listWithArg: listWithArg
+ };
+}
+
+var name$1 = \\"FragmentWithArgs\\";
+
+var Z__INTERNAL$2 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var FragmentWithArgs = {
+ query: query$1,
+ Raw: Raw$2,
+ parse: parse$2,
+ verifyArgsAndParse: verifyArgsAndParse$2,
+ serialize: serialize$2,
+ name: name$1,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var query$2 = \\"fragment InlineListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+
+var Raw$3 = { };
+
+function parse$3(value) {
+ var value$1 = value.nullableOfNullable;
+ var value$2 = value.nullableOfNonNullable;
+ return {
+ nullableOfNullable: !(value$1 == null) ? value$1.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$2 == null) ? value$2.map((function (value) {
+ return value;
+ })) : undefined
+ };
+}
+
+var verifyArgsAndParse$3 = parse$3;
+
+function serialize$3(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = value$2 !== undefined ? value$2.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var name$2 = \\"InlineListFragment\\";
+
+var Z__INTERNAL$3 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var InlineFragment = {
+ query: query$2,
+ Raw: Raw$3,
+ parse: parse$3,
+ verifyArgsAndParse: verifyArgsAndParse$3,
+ serialize: serialize$3,
+ name: name$2,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+var Raw$4 = { };
+
+var query$3 = \\"query MyQuery($arg1: String) {\\\\nl1: lists {\\\\n...ListFragment \\\\n}\\\\n\\\\nl2: lists {\\\\n...ListFragment \\\\n...ListFragment \\\\n}\\\\n\\\\nl3: lists {\\\\nnullableOfNullable \\\\n...ListFragment \\\\n...ListFragment \\\\n}\\\\n\\\\nl4: lists {\\\\nnullableOfNullable \\\\n...InlineListFragment \\\\n}\\\\n\\\\nl5: lists {\\\\n...FragmentWithArgs \\\\n}\\\\n\\\\n}\\\\nfragment FragmentWithArgs on Lists {\\\\nlistWithArg(arg1: $arg1) \\\\n}\\\\nfragment InlineListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\nfragment ListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+
+function parse$4(value) {
+ var value$1 = value.l2;
+ var value$2 = value.l3;
+ var value$3 = value$2[\\"nullableOfNullable\\"];
+ var value$4 = value.l4;
+ var value$5 = value$4[\\"nullableOfNullable\\"];
+ return {
+ l1: parse(value.l1),
+ l2: {
+ frag1: parse(value$1),
+ frag2: parse(value$1)
+ },
+ l3: {
+ nullableOfNullable: !(value$3 == null) ? value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ frag1: parse(value$2),
+ frag2: parse(value$2)
+ },
+ l4: {
+ nullableOfNullable: !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ inlineFragment: parse$3(value$4)
+ },
+ l5: parse$2(value.l5)
+ };
+}
+
+function serialize$4(value) {
+ var value$1 = value.l5;
+ var l5 = serialize$2(value$1);
+ var value$2 = value.l4;
+ var value$3 = value$2.nullableOfNullable;
+ var l4 = [serialize$3(value$2.inlineFragment)].reduce(deepMerge, {
+ nullableOfNullable: value$3 !== undefined ? value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ });
+ var value$4 = value.l3;
+ var value$5 = value$4.nullableOfNullable;
+ var l3 = [
+ serialize(value$4.frag1),
+ serialize(value$4.frag2)
+ ].reduce(deepMerge, {
+ nullableOfNullable: value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ });
+ var value$6 = value.l2;
+ var l2 = [
+ serialize(value$6.frag1),
+ serialize(value$6.frag2)
+ ].reduce(deepMerge, (function (prim) {
+ return { };
+ }));
+ var value$7 = value.l1;
+ var l1 = serialize(value$7);
+ return {
+ l1: l1,
+ l2: l2,
+ l3: l3,
+ l4: l4,
+ l5: l5
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.arg1;
+ return {
+ arg1: a !== undefined ? a : undefined
+ };
+}
+
+function makeVariables(arg1, param) {
+ return serializeVariables({
+ arg1: arg1
+ });
+}
+
+function makeDefaultVariables(param) {
+ return serializeVariables({
+ arg1: undefined
+ });
+}
+
+var Z__INTERNAL$4 = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw$4,
+ query: query$3,
+ parse: parse$4,
+ serialize: serialize$4,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL$4
+};
+
+var Raw$5 = { };
+
+var query$4 = \\"query {\\\\nlists {\\\\n...ListFragment \\\\n}\\\\n\\\\n}\\\\nfragment ListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+
+function parse$5(value) {
+ return {
+ lists: parse(value.lists)
+ };
+}
+
+function serialize$5(value) {
+ var value$1 = value.lists;
+ var lists = serialize(value$1);
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$5 = {
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$5,
+ query: query$4,
+ parse: parse$5,
+ serialize: serialize$5,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$5
+};
+
+exports.GraphQL_PPX = GraphQL_PPX;
+exports.ListFragment = ListFragment;
+exports.Another = Another;
+exports.FragmentWithArgs = FragmentWithArgs;
+exports.InlineFragment = InlineFragment;
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) interface.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
+"
+`;
+
+exports[`Compilation (Records) lists.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nullableOfNullable;
+ var value$3 = value$1.nullableOfNonNullable;
+ var value$4 = value$1.nonNullableOfNullable;
+ var value$5 = value$1.nonNullableOfNonNullable;
+ return {
+ lists: {
+ nullableOfNullable: !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$3 == null) ? value$3.map((function (value) {
+ return value;
+ })) : undefined,
+ nonNullableOfNullable: value$4.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })),
+ nonNullableOfNonNullable: value$5.map((function (value) {
+ return value;
+ }))
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ var lists = {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) listsArgs.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require(\\"bs-platform/lib/js/array.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.listsInput;
+ return {
+ listsInput: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.nullableOfNullable;
+ var a$1 = inp.nullableOfNonNullable;
+ var a$2 = inp.nonNullableOfNullable;
+ var a$3 = inp.nonNullableOfNonNullable;
+ return {
+ nullableOfNullable: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ nullableOfNonNullable: a$1 !== undefined ? $$Array.map((function (b) {
+ return b;
+ }), a$1) : undefined,
+ nonNullableOfNullable: $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a$2),
+ nonNullableOfNonNullable: $$Array.map((function (b) {
+ return b;
+ }), a$3)
+ };
+}
+
+function makeVariables(nullableOfNullable, nullableOfNonNullable, nonNullableOfNullable, nonNullableOfNonNullable, param) {
+ return serializeVariables({
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_219: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\\\\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) listsInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require(\\"bs-platform/lib/js/array.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.listsInput;
+ return {
+ listsInput: value$1
+ };
+}
+
+function serializeInputObjectListsInput(inp) {
+ var a = inp.nullableOfNullable;
+ var a$1 = inp.nullableOfNonNullable;
+ var a$2 = inp.nonNullableOfNullable;
+ var a$3 = inp.nonNullableOfNonNullable;
+ return {
+ nullableOfNullable: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ nullableOfNonNullable: a$1 !== undefined ? $$Array.map((function (b) {
+ return b;
+ }), a$1) : undefined,
+ nonNullableOfNullable: $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a$2),
+ nonNullableOfNonNullable: $$Array.map((function (b) {
+ return b;
+ }), a$3)
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectListsInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectListsInput(arg)
+ };
+}
+
+function makeInputObjectListsInput(nullableOfNullable, nullableOfNonNullable, nonNullableOfNullable, nonNullableOfNonNullable, param) {
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_82: 0,
+ _graphql_arg_77: 0,
+ _graphql_ListsInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: ListsInput!) {\\\\nlistsInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectListsInput: serializeInputObjectListsInput,
+ makeVariables: makeVariables,
+ makeInputObjectListsInput: makeInputObjectListsInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) mutation.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.value;
+ var value$3 = value$1.errors;
+ return {
+ mutationWithError: {
+ value: !(value$2 == null) ? ({
+ stringField: value$2.stringField
+ }) : undefined,
+ errors: !(value$3 == null) ? value$3.map((function (value) {
+ var value$1 = value.field;
+ var tmp;
+ switch (value$1) {
+ case \\"FIRST\\" :
+ tmp = /* FIRST */-24399856;
+ break;
+ case \\"SECOND\\" :
+ tmp = /* SECOND */382368628;
+ break;
+ case \\"THIRD\\" :
+ tmp = /* THIRD */225952583;
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ field: tmp,
+ message: value.message
+ };
+ })) : undefined
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.message;
+ var value$2 = value.field;
+ var field = typeof value$2 === \\"number\\" ? (
+ value$2 !== 225952583 ? (
+ value$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : value$2[1];
+ return {
+ field: field,
+ message: value$1
+ };
+ })) : null;
+ var value$3 = value$1.value;
+ var value$4;
+ if (value$3 !== undefined) {
+ var value$5 = value$3.stringField;
+ value$4 = {
+ stringField: value$5
+ };
+ } else {
+ value$4 = null;
+ }
+ var mutationWithError = {
+ value: value$4,
+ errors: errors
+ };
+ return {
+ mutationWithError: mutationWithError
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"mutation {\\\\nmutationWithError {\\\\nvalue {\\\\nstringField \\\\n}\\\\n\\\\nerrors {\\\\nfield \\\\nmessage \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) mutationWithArgs.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.optionalInputArgs;
+ return {
+ optionalInputArgs: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ required: inp.required
+ };
+}
+
+function makeVariables(required, param) {
+ return {
+ required: required
+ };
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) mutationWithArgsAndNoRecords.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serialize(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ required: inp.required
+ };
+}
+
+function makeVariables(required, param) {
+ return serializeVariables({
+ required: required
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) nested.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var tmp;
+ if (value$2 == null) {
+ tmp = undefined;
+ } else {
+ var value$3 = value$2.inner;
+ tmp = {
+ inner: !(value$3 == null) ? ({
+ field: value$3.field
+ }) : undefined
+ };
+ }
+ var value$4 = value.second;
+ var value$5 = value$4.inner;
+ var tmp$1;
+ if (value$5 == null) {
+ tmp$1 = undefined;
+ } else {
+ var value$6 = value$5.inner;
+ tmp$1 = {
+ inner: !(value$6 == null) ? ({
+ f1: value$6.f1,
+ f2: value$6.f2
+ }) : undefined
+ };
+ }
+ var value$7 = value.let_;
+ var value$8 = value$7.inner;
+ var tmp$2;
+ if (value$8 == null) {
+ tmp$2 = undefined;
+ } else {
+ var value$9 = value$8.inner;
+ tmp$2 = {
+ inner: !(value$9 == null) ? ({
+ field: value$9.field
+ }) : undefined
+ };
+ }
+ return {
+ first: {
+ inner: tmp
+ },
+ second: {
+ inner: tmp$1
+ },
+ let_: {
+ inner: tmp$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.let_;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 !== undefined) {
+ var value$3 = value$2.inner;
+ var inner$1;
+ if (value$3 !== undefined) {
+ var value$4 = value$3.field;
+ inner$1 = {
+ field: value$4
+ };
+ } else {
+ inner$1 = null;
+ }
+ inner = {
+ inner: inner$1
+ };
+ } else {
+ inner = null;
+ }
+ var let_ = {
+ inner: inner
+ };
+ var value$5 = value.second;
+ var value$6 = value$5.inner;
+ var inner$2;
+ if (value$6 !== undefined) {
+ var value$7 = value$6.inner;
+ var inner$3;
+ if (value$7 !== undefined) {
+ var value$8 = value$7.f2;
+ var value$9 = value$7.f1;
+ inner$3 = {
+ f1: value$9,
+ f2: value$8
+ };
+ } else {
+ inner$3 = null;
+ }
+ inner$2 = {
+ inner: inner$3
+ };
+ } else {
+ inner$2 = null;
+ }
+ var second = {
+ inner: inner$2
+ };
+ var value$10 = value.first;
+ var value$11 = value$10.inner;
+ var inner$4;
+ if (value$11 !== undefined) {
+ var value$12 = value$11.inner;
+ var inner$5;
+ if (value$12 !== undefined) {
+ var value$13 = value$12.field;
+ inner$5 = {
+ field: value$13
+ };
+ } else {
+ inner$5 = null;
+ }
+ inner$4 = {
+ inner: inner$5
+ };
+ } else {
+ inner$4 = null;
+ }
+ var first = {
+ inner: inner$4
+ };
+ return {
+ first: first,
+ second: second,
+ let_: let_
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nfirst: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nsecond: nestedObject {\\\\ninner {\\\\ninner {\\\\nf1: field \\\\nf2: field \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nlet: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) nonrecursiveInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require(\\"bs-platform/lib/js/array.js\\");
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.nonrecursiveInput;
+ return {
+ nonrecursiveInput: value$1
+ };
+}
+
+function serializeInputObjectEmbeddedInput(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput(b);
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(arg)
+ };
+}
+
+function makeInputObjectNonrecursiveInput(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_100: 0,
+ _graphql_arg_95: 0,
+ _graphql_NonrecursiveInput_49: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput,
+ makeVariables: makeVariables,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ return {
+ scalarsInput: value.scalarsInput,
+ more: value.more
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.more;
+ var value$2 = value.scalarsInput;
+ return {
+ scalarsInput: value$2,
+ more: value$1
+ };
+}
+
+function serializeInputObjectEmbeddedInput$1(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput$1(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput$1(b);
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables$1(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput$1(inp.arg),
+ arg2: serializeInputObjectNonrecursiveInput$1(inp.arg2)
+ };
+}
+
+function makeVariables$1(arg, arg2, param) {
+ return serializeVariables$1({
+ arg: arg,
+ arg2: arg2
+ });
+}
+
+function makeInputObjectNonrecursiveInput$1(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput$1(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL$1 = {
+ _graphql_arg_240: 0,
+ _graphql_arg_235: 0,
+ _graphql_NonrecursiveInput_169: 0,
+ _graphql_NonrecursiveInput_196: 0,
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$1,
+ query: \\"query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\\\\nscalarsInput(arg: $arg) \\\\nmore: scalarsInput(arg: $arg2) \\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput$1,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput$1,
+ makeVariables: makeVariables$1,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput$1,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) omitFutureValueEnum.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_builtin_exceptions = require(\\"bs-platform/lib/js/caml_builtin_exceptions.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ return {
+ mutationWithError: {
+ errors: !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var tmp;
+ switch (value$1) {
+ case \\"FIRST\\" :
+ tmp = /* FIRST */-24399856;
+ break;
+ case \\"SECOND\\" :
+ tmp = /* SECOND */382368628;
+ break;
+ case \\"THIRD\\" :
+ tmp = /* THIRD */225952583;
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ message: value.message,
+ field: tmp
+ };
+ })) : undefined
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = typeof value$1 === \\"number\\" ? (
+ value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : value$1[1];
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ var mutationWithError = {
+ errors: errors
+ };
+ return {
+ mutationWithError: mutationWithError
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Normal = {
+ Raw: Raw,
+ query: \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ return {
+ mutationWithError: {
+ errors: !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var tmp;
+ switch (value$1) {
+ case \\"FIRST\\" :
+ tmp = /* FIRST */-24399856;
+ break;
+ case \\"SECOND\\" :
+ tmp = /* SECOND */382368628;
+ break;
+ case \\"THIRD\\" :
+ tmp = /* THIRD */225952583;
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ message: value.message,
+ field: tmp
+ };
+ })) : undefined
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\";
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ var mutationWithError = {
+ errors: errors
+ };
+ return {
+ mutationWithError: mutationWithError
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ByConfig = {
+ Raw: Raw$1,
+ query: \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ return {
+ mutationWithError: {
+ errors: !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var tmp;
+ switch (value$1) {
+ case \\"FIRST\\" :
+ tmp = /* FIRST */-24399856;
+ break;
+ case \\"SECOND\\" :
+ tmp = /* SECOND */382368628;
+ break;
+ case \\"THIRD\\" :
+ tmp = /* THIRD */225952583;
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ message: value.message,
+ field: tmp
+ };
+ })) : undefined
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\";
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ var mutationWithError = {
+ errors: errors
+ };
+ return {
+ mutationWithError: mutationWithError
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var ByDirective = {
+ Raw: Raw$2,
+ query: \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+exports.Normal = Normal;
+exports.ByConfig = ByConfig;
+exports.ByDirective = ByDirective;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) omitFutureValueUnion.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_builtin_exceptions = require(\\"bs-platform/lib/js/caml_builtin_exceptions.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var dogOrHuman;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Normal = {
+ Raw: Raw,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ByConfig = {
+ Raw: Raw$1,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var ByDirective = {
+ Raw: Raw$2,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+exports.Normal = Normal;
+exports.ByConfig = ByConfig;
+exports.ByDirective = ByDirective;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) pokedexApolloMode.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 == null) {
+ tmp = undefined;
+ } else {
+ var value$2 = value$1.name;
+ tmp = {
+ id: value$1.id,
+ name: !(value$2 == null) ? value$2 : undefined
+ };
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.pokemon;
+ var pokemon;
+ if (value$1 !== undefined) {
+ var value$2 = value$1.name;
+ var name = value$2 !== undefined ? value$2 : null;
+ var value$3 = value$1.id;
+ pokemon = {
+ id: value$3,
+ name: name
+ };
+ } else {
+ pokemon = null;
+ }
+ return {
+ pokemon: pokemon
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ _graphql_name_52: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\npokemon(name: \\\\\\"Pikachu\\\\\\") {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) pokedexScalars.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 == null) {
+ tmp = undefined;
+ } else {
+ var value$2 = value$1.name;
+ tmp = {
+ id: value$1.id,
+ name: !(value$2 == null) ? value$2 : undefined
+ };
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.pokemon;
+ var pokemon;
+ if (value$1 !== undefined) {
+ var value$2 = value$1.name;
+ var name = value$2 !== undefined ? value$2 : null;
+ var value$3 = value$1.id;
+ pokemon = {
+ id: value$3,
+ name: name
+ };
+ } else {
+ pokemon = null;
+ }
+ return {
+ pokemon: pokemon
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.id;
+ var a$1 = inp.name;
+ return {
+ id: a !== undefined ? a : undefined,
+ name: a$1 !== undefined ? a$1 : undefined
+ };
+}
+
+function makeVariables(id, name, param) {
+ return serializeVariables({
+ id: id,
+ name: name
+ });
+}
+
+function makeDefaultVariables(param) {
+ return serializeVariables({
+ id: undefined,
+ name: undefined
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_name_100: 0,
+ _graphql_name_94: 0,
+ _graphql_id_111: 0,
+ _graphql_id_107: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query pokemon($id: String, $name: String) {\\\\npokemon(name: $name, id: $id) {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) record.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ return {
+ variousScalars: {
+ string: value$1.string,
+ int: value$1.int
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var value$3 = value$1.string;
+ var variousScalars = {
+ string: value$3,
+ int: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var nullableString = value$2 !== undefined ? value$2 : null;
+ var variousScalars = {
+ nullableString: nullableString
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var OneFieldQuery = {
+ Raw: Raw$1,
+ query: \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var query = \\"fragment Fragment on VariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\";
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ return {
+ string: value.string,
+ int: value.int
+ };
+}
+
+var verifyArgsAndParse = parse$2;
+
+function serialize$2(value) {
+ var value$1 = value.int;
+ var value$2 = value.string;
+ return {
+ string: value$2,
+ int: value$1
+ };
+}
+
+var name = \\"Fragment\\";
+
+var Z__INTERNAL$2 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var Fragment = {
+ query: query,
+ Raw: Raw$2,
+ parse: parse$2,
+ verifyArgsAndParse: verifyArgsAndParse,
+ serialize: serialize$2,
+ name: name,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var Raw$3 = { };
+
+var query$1 = \\"query {\\\\nvariousScalars {\\\\n...Fragment \\\\n}\\\\n\\\\n}\\\\nfragment Fragment on VariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\";
+
+function parse$3(value) {
+ return {
+ variousScalars: parse$2(value.variousScalars)
+ };
+}
+
+function serialize$3(value) {
+ var value$1 = value.variousScalars;
+ var variousScalars = serialize$2(value$1);
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$3 = {
+ graphql_module: 0
+};
+
+var Untitled1 = {
+ Raw: Raw$3,
+ query: query$1,
+ parse: parse$3,
+ serialize: serialize$3,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+var ExternalFragmentQuery = {
+ Fragment: Fragment,
+ Untitled1: Untitled1
+};
+
+var Raw$4 = { };
+
+function parse$4(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp = typename === \\"Dog\\" ? /* \`Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ] : /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$4(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$3(param) {
+
+}
+
+function makeVariables$3(param) {
+
+}
+
+function makeDefaultVariables$3(param) {
+
+}
+
+var Z__INTERNAL$4 = {
+ graphql_module: 0
+};
+
+var InlineFragmentQuery = {
+ Raw: Raw$4,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$4,
+ serialize: serialize$4,
+ serializeVariables: serializeVariables$3,
+ makeVariables: makeVariables$3,
+ makeDefaultVariables: makeDefaultVariables$3,
+ Z__INTERNAL: Z__INTERNAL$4
+};
+
+var query$2 = \\"fragment DogFragment on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\";
+
+var Raw$5 = { };
+
+function parse$5(value) {
+ return {
+ name: value.name,
+ barkVolume: value.barkVolume
+ };
+}
+
+var verifyArgsAndParse$1 = parse$5;
+
+function serialize$5(value) {
+ var value$1 = value.barkVolume;
+ var value$2 = value.name;
+ return {
+ name: value$2,
+ barkVolume: value$1
+ };
+}
+
+var name$1 = \\"DogFragment\\";
+
+var Z__INTERNAL$5 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var DogFragment = {
+ query: query$2,
+ Raw: Raw$5,
+ parse: parse$5,
+ verifyArgsAndParse: verifyArgsAndParse$1,
+ serialize: serialize$5,
+ name: name$1,
+ Z__INTERNAL: Z__INTERNAL$5
+};
+
+var Raw$6 = { };
+
+var query$3 = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n...DogFragment \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\nfragment DogFragment on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\";
+
+function parse$6(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp = typename === \\"Dog\\" ? /* \`Dog */[
+ 3406428,
+ parse$5(value$1)
+ ] : /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$6(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman = value$1[0] >= 3406428 ? serialize$5(value$1[1]) : value$1[1];
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$4(param) {
+
+}
+
+function makeVariables$4(param) {
+
+}
+
+function makeDefaultVariables$4(param) {
+
+}
+
+var Z__INTERNAL$6 = {
+ graphql_module: 0
+};
+
+var Untitled1$1 = {
+ Raw: Raw$6,
+ query: query$3,
+ parse: parse$6,
+ serialize: serialize$6,
+ serializeVariables: serializeVariables$4,
+ makeVariables: makeVariables$4,
+ makeDefaultVariables: makeDefaultVariables$4,
+ Z__INTERNAL: Z__INTERNAL$6
+};
+
+var UnionExternalFragmentQuery = {
+ DogFragment: DogFragment,
+ Untitled1: Untitled1$1
+};
+
+exports.MyQuery = MyQuery;
+exports.OneFieldQuery = OneFieldQuery;
+exports.ExternalFragmentQuery = ExternalFragmentQuery;
+exports.InlineFragmentQuery = InlineFragmentQuery;
+exports.UnionExternalFragmentQuery = UnionExternalFragmentQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) recursiveInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ recursiveInput: value.recursiveInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.recursiveInput;
+ return {
+ recursiveInput: value$1
+ };
+}
+
+function serializeInputObjectRecursiveInput(inp) {
+ var a = inp.otherField;
+ var a$1 = inp.inner;
+ var a$2 = inp.enum;
+ return {
+ otherField: a !== undefined ? a : undefined,
+ inner: a$1 !== undefined ? serializeInputObjectRecursiveInput(a$1) : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? \\"SECOND\\" : \\"FIRST\\"
+ ) : \\"THIRD\\"
+ ) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectRecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectRecursiveInput(arg)
+ };
+}
+
+function makeInputObjectRecursiveInput(otherField, inner, $$enum, param) {
+ return {
+ otherField: otherField,
+ inner: inner,
+ enum: $$enum
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_90: 0,
+ _graphql_arg_85: 0,
+ _graphql_RecursiveInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: RecursiveInput!) {\\\\nrecursiveInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectRecursiveInput: serializeInputObjectRecursiveInput,
+ makeVariables: makeVariables,
+ makeInputObjectRecursiveInput: makeInputObjectRecursiveInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) scalars.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) scalarsArgs.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.scalarsInput;
+ return {
+ scalarsInput: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.nullableString;
+ var a$1 = inp.nullableInt;
+ var a$2 = inp.nullableFloat;
+ var a$3 = inp.nullableBoolean;
+ var a$4 = inp.nullableID;
+ return {
+ nullableString: a !== undefined ? a : undefined,
+ string: inp.string,
+ nullableInt: a$1 !== undefined ? a$1 : undefined,
+ int: inp.int,
+ nullableFloat: a$2 !== undefined ? a$2 : undefined,
+ float: inp.float,
+ nullableBoolean: a$3 !== undefined ? a$3 : undefined,
+ boolean: inp.boolean,
+ nullableID: a$4 !== undefined ? a$4 : undefined,
+ id: inp.id
+ };
+}
+
+function makeVariables(nullableString, string, nullableInt, $$int, nullableFloat, $$float, nullableBoolean, $$boolean, nullableID, id, param) {
+ return serializeVariables({
+ nullableString: nullableString,
+ string: string,
+ nullableInt: nullableInt,
+ int: $$int,
+ nullableFloat: nullableFloat,
+ float: $$float,
+ nullableBoolean: nullableBoolean,
+ boolean: $$boolean,
+ nullableID: nullableID,
+ id: id
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_292: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\\\\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) scalarsInput.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.scalarsInput;
+ return {
+ scalarsInput: value$1
+ };
+}
+
+function serializeInputObjectVariousScalarsInput(inp) {
+ var a = inp.nullableString;
+ var a$1 = inp.nullableInt;
+ var a$2 = inp.nullableFloat;
+ var a$3 = inp.nullableBoolean;
+ var a$4 = inp.nullableID;
+ return {
+ nullableString: a !== undefined ? a : undefined,
+ string: inp.string,
+ nullableInt: a$1 !== undefined ? a$1 : undefined,
+ int: inp.int,
+ nullableFloat: a$2 !== undefined ? a$2 : undefined,
+ float: inp.float,
+ nullableBoolean: a$3 !== undefined ? a$3 : undefined,
+ boolean: inp.boolean,
+ nullableID: a$4 !== undefined ? a$4 : undefined,
+ id: inp.id
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectVariousScalarsInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectVariousScalarsInput(arg)
+ };
+}
+
+function makeInputObjectVariousScalarsInput(nullableString, string, nullableInt, $$int, nullableFloat, $$float, nullableBoolean, $$boolean, nullableID, id, param) {
+ return {
+ nullableString: nullableString,
+ string: string,
+ nullableInt: nullableInt,
+ int: $$int,
+ nullableFloat: nullableFloat,
+ float: $$float,
+ nullableBoolean: nullableBoolean,
+ boolean: $$boolean,
+ nullableID: nullableID,
+ id: id
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_93: 0,
+ _graphql_arg_88: 0,
+ _graphql_VariousScalarsInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($arg: VariousScalarsInput!) {\\\\nscalarsInput(arg: $arg) \\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectVariousScalarsInput: serializeInputObjectVariousScalarsInput,
+ makeVariables: makeVariables,
+ makeInputObjectVariousScalarsInput: makeInputObjectVariousScalarsInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) skipDirectives.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.v1;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.string;
+ var value$4 = value.v2;
+ var value$5 = value$4.nullableString;
+ var value$6 = value$4.string;
+ return {
+ v1: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: !(value$3 == null) ? value$3 : undefined
+ },
+ v2: {
+ nullableString: !(value$5 == null) ? value$5 : undefined,
+ string: !(value$6 == null) ? value$6 : undefined
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.v2;
+ var value$2 = value$1.string;
+ var string = value$2 !== undefined ? value$2 : null;
+ var value$3 = value$1.nullableString;
+ var nullableString = value$3 !== undefined ? value$3 : null;
+ var v2 = {
+ nullableString: nullableString,
+ string: string
+ };
+ var value$4 = value.v1;
+ var value$5 = value$4.string;
+ var string$1 = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$4.nullableString;
+ var nullableString$1 = value$6 !== undefined ? value$6 : null;
+ var v1 = {
+ nullableString: nullableString$1,
+ string: string$1
+ };
+ return {
+ v1: v1,
+ v2: v2
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ var: inp.var
+ };
+}
+
+function makeVariables($$var, param) {
+ return {
+ var: $$var
+ };
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query ($var: Boolean!) {\\\\nv1: variousScalars {\\\\nnullableString @skip(if: $var) \\\\nstring @skip(if: $var) \\\\n}\\\\n\\\\nv2: variousScalars {\\\\nnullableString @include(if: $var) \\\\nstring @include(if: $var) \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) subscription.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.simpleSubscription;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ simpleSubscription: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.simpleSubscription;
+ var variant = value$1[0];
+ var simpleSubscription;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1].name;
+ simpleSubscription = {
+ __typename: \\"Dog\\",
+ name: value$2
+ };
+ } else {
+ var value$3 = value$1[1].name;
+ simpleSubscription = {
+ __typename: \\"Human\\",
+ name: value$3
+ };
+ }
+ } else {
+ simpleSubscription = value$1[1];
+ }
+ return {
+ simpleSubscription: simpleSubscription
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"subscription {\\\\nsimpleSubscription {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) tagged_template.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+let { graphql } = require(\\"gatsby\\")
+;
+
+var query = (graphql\`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+\`);
+
+function parse$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$1,
+ query: query,
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+let { graphql } = require(\\"gatsby\\")
+;
+
+var query$1 = (graphql\`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+\`);
+
+function parse$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var MyQuery3 = {
+ Raw: Raw$2,
+ query: query$1,
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var Raw$3 = { };
+
+let graphql = require(\\"gatsby\\")
+;
+
+var query$2 = (graphql\`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+\`);
+
+function parse$3(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize$3(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$3(param) {
+
+}
+
+function makeVariables$3(param) {
+
+}
+
+function makeDefaultVariables$3(param) {
+
+}
+
+var Z__INTERNAL$3 = {
+ graphql_module: 0
+};
+
+var MyQuery4 = {
+ Raw: Raw$3,
+ query: query$2,
+ parse: parse$3,
+ serialize: serialize$3,
+ serializeVariables: serializeVariables$3,
+ makeVariables: makeVariables$3,
+ makeDefaultVariables: makeDefaultVariables$3,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+exports.MyQuery3 = MyQuery3;
+exports.MyQuery4 = MyQuery4;
+/* Not a pure module */
+"
+`;
+
+exports[`Compilation (Records) typename.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var tmp;
+ if (value$2 == null) {
+ tmp = undefined;
+ } else {
+ var value$3 = value$2.inner;
+ tmp = {
+ __typename: value$2.__typename,
+ inner: !(value$3 == null) ? ({
+ __typename: value$3.__typename,
+ field: value$3.field
+ }) : undefined
+ };
+ }
+ return {
+ first: {
+ __typename: value$1.__typename,
+ inner: tmp
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 !== undefined) {
+ var value$3 = value$2.inner;
+ var inner$1;
+ if (value$3 !== undefined) {
+ var value$4 = value$3.field;
+ var value$5 = value$3.__typename;
+ inner$1 = {
+ __typename: value$5,
+ field: value$4
+ };
+ } else {
+ inner$1 = null;
+ }
+ var value$6 = value$2.__typename;
+ inner = {
+ __typename: value$6,
+ inner: inner$1
+ };
+ } else {
+ inner = null;
+ }
+ var value$7 = value$1.__typename;
+ var first = {
+ __typename: value$7,
+ inner: inner
+ };
+ return {
+ first: first
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\nfirst: nestedObject {\\\\n__typename \\\\ninner {\\\\n__typename \\\\ninner {\\\\n__typename \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) union.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var dogOrHuman;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp;
+ switch (typename) {
+ case \\"Dog\\" :
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var dogOrHuman;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: \\"Human\\",
+ name: value$5
+ };
+ }
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var MyQueryNoError = {
+ Raw: Raw$1,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQueryNoError = MyQueryNoError;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) unionPartial.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1[\\"__typename\\"];
+ var tmp = typename === \\"Dog\\" ? /* \`Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ] : /* \`FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: \\"Dog\\",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Compilation (Records) variant.re 1`] = `
+"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Js_exn = require(\\"bs-platform/lib/js/js_exn.js\\");
+var Js_json = require(\\"bs-platform/lib/js/js_json.js\\");
+var Caml_option = require(\\"bs-platform/lib/js/caml_option.js\\");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationForVariant;
+ var value$2 = Js_json.decodeObject(value$1);
+ var tmp;
+ if (value$2 !== undefined) {
+ var value$3 = Caml_option.valFromOption(value$2);
+ var temp = value$3[\\"baseType\\"];
+ var match = Js_json.decodeNull(temp);
+ if (match !== undefined) {
+ var temp$1 = value$3[\\"baseTypeList\\"];
+ var match$1 = Js_json.decodeNull(temp$1);
+ if (match$1 !== undefined) {
+ var temp$2 = value$3[\\"dog\\"];
+ var match$2 = Js_json.decodeNull(temp$2);
+ if (match$2 !== undefined) {
+ var temp$3 = value$3[\\"human\\"];
+ var match$3 = Js_json.decodeNull(temp$3);
+ if (match$3 !== undefined) {
+ var temp$4 = value$3[\\"dogOrHuman\\"];
+ var match$4 = Js_json.decodeNull(temp$4);
+ if (match$4 !== undefined) {
+ tmp = Js_exn.raiseError(\\"graphql-ppx: All fields on variant selection set on type VariantTestResult were null\\");
+ } else {
+ var typename = temp$4[\\"__typename\\"];
+ var tmp$1;
+ switch (typename) {
+ case \\"Dog\\" :
+ tmp$1 = /* \`Dog */[
+ 3406428,
+ {
+ name: temp$4.name,
+ barkVolume: temp$4.barkVolume
+ }
+ ];
+ break;
+ case \\"Human\\" :
+ tmp$1 = /* \`Human */[
+ -1031617139,
+ {
+ name: temp$4.name
+ }
+ ];
+ break;
+ default:
+ tmp$1 = /* \`FutureAddedValue */[
+ -31101740,
+ temp$4
+ ];
+ }
+ tmp = /* \`DogOrHuman */[
+ 974247566,
+ tmp$1
+ ];
+ }
+ } else {
+ tmp = /* \`Human */[
+ -1031617139,
+ {
+ name: temp$3.name
+ }
+ ];
+ }
+ } else {
+ tmp = /* \`Dog */[
+ 3406428,
+ {
+ name: temp$2.name,
+ barkVolume: temp$2.barkVolume
+ }
+ ];
+ }
+ } else {
+ tmp = /* \`BaseTypeList */[
+ -259847799,
+ temp$1.map((function (value) {
+ return value;
+ }))
+ ];
+ }
+ } else {
+ tmp = /* \`BaseType */[
+ -620191861,
+ temp
+ ];
+ }
+ } else {
+ tmp = Js_exn.raiseError(\\"graphql-ppx: Expected type VariantTestResult to be an object\\");
+ }
+ return {
+ mutationForVariant: tmp
+ };
+}
+
+function serialize(value) {
+ var mutationForVariant = null;
+ return {
+ mutationForVariant: mutationForVariant
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: \\"mutation {\\\\nmutationForVariant {\\\\nbaseType \\\\nbaseTypeList \\\\ndog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\nhuman {\\\\nname \\\\n}\\\\n\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
+"
+`;
+
+exports[`Errors (Objects) InvalidObjectValues2.re 1`] = `
+"We've found a bug for you!
+ operations/errors/InvalidObjectValues2.re 8:13-18
+
+ 6 ┆ query {
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nullableArray: [\\"\\"]
+ 10 ┆ field: \\"\\"
+
+ Invalid argument. The field \\"nonNullableField\\" on argument \\"nonRec\\" is missing."
+`;
+
+exports[`Errors (Objects) InvalidObjectValues3.re 1`] = `
+"We've found a bug for you!
+ operations/errors/InvalidObjectValues3.re 9:35
+
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: 5
+ 10 ┆ nullableArray: [\\"\\"]
+ 11 ┆ field: \\"\\"
+
+ Invalid argument. Expected \\"String!\\" but received \\"Int!\\"."
+`;
+
+exports[`Errors (Objects) InvalidObjectValues4.re 1`] = `
+"We've found a bug for you!
+ operations/errors/InvalidObjectValues4.re 10:32-34
+
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: \\"!\\"
+ 10 ┆ nullableArray: [2]
+ 11 ┆ field: \\"\\"
+ 12 ┆ enum: FIRST
+
+ Invalid argument. Expected \\"[String]\\" but received \\"[Int!]!\\"."
+`;
+
+exports[`Errors (Objects) InvalidObjectValues5.re 1`] = `
+"We've found a bug for you!
+ operations/errors/InvalidObjectValues5.re 20:23-24
+
+ 18 ┆ otherField: \\"\\"
+ 19 ┆ }
+ 20 ┆ enum: []
+ 21 ┆ }
+ 22 ┆ )
+
+ Invalid argument. Expected \\"Enum\\" but received \\"EmptyList!\\"."
+`;
+
+exports[`Errors (Objects) deprecatedFields.re 1`] = `
+"File \\"operations/errors/deprecatedFields.re\\", line 7, characters 6-21:
+7 | deprecatedField
+ ^^^^^^^^^^^^^^^
+Warning 22: Field \\"deprecatedField\\" has been deprecated. Reason: Use something else instead"
+`;
+
+exports[`Errors (Objects) invalidArgVariableType1.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType1.re 9:25-28
+
+ 7 ┆ query invalidArgValues {
+ 8 ┆ invalidArgValues(
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. The variable \\"$arg\\" on argument \\"stringRequired\\" is missing."
+`;
+
+exports[`Errors (Objects) invalidArgVariableType2.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType2.re 8:25-28
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable \\"$arg\\" to the required argument \\"stringRequired\\"."
+`;
+
+exports[`Errors (Objects) invalidArgVariableType3.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType3.re 9:17-21
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ string: $arg2
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Expected \\"String\\" but received \\"Int\\"."
+`;
+
+exports[`Errors (Objects) invalidArgVariableType4.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType4.re 10:14-18
+
+ 8 ┆ invalidArgValues(
+ 9 ┆ custom: $arg
+ 10 ┆ obj: $arg2
+ 11 ┆ stringRequired: \\"\\"
+ 12 ┆ )
+
+ Invalid argument. Expected \\"InputObject\\" but received \\"Int\\"."
+`;
+
+exports[`Errors (Objects) invalidArgVariableType5.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType5.re 9:25-28
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ id: $arg
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable \\"$arg\\" to the required argument \\"stringRequired\\"."
+`;
+
+exports[`Errors (Objects) invalidArgVariableType6.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType6.re 8:15-18
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ list: $arg
+ 9 ┆ stringRequired: \\"\\"
+ 10 ┆ )
+
+ Invalid argument. Expected \\"[String]\\" but received \\"String\\"."
+`;
+
+exports[`Errors (Objects) invalidDefaultValue1.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidDefaultValue1.re 21:14-26
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ int: \\"Some string\\"
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected \\"Int\\" but received \\"String!\\"."
+`;
+
+exports[`Errors (Objects) invalidDefaultValue2.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidDefaultValue2.re 8:14-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ int: {test: \\"xxx\\"}
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected \\"Int\\" but received \\"InputObject!\\"."
+`;
+
+exports[`Errors (Objects) invalidDefaultValue3.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidDefaultValue3.re 21:13
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ id: 5
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected \\"ID\\" but received \\"Int!\\"."
+`;
+
+exports[`Errors (Objects) invalidDefaultValue4.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidDefaultValue4.re 8:17-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ string: [\\"1\\", \\"2\\"]
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected \\"String\\" but received \\"List\\"."
+`;
+
+exports[`Errors (Objects) invalidObjectValues1.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidObjectValues1.re 19:37
+
+ 17 ┆ otherField: \\"\\"
+ 18 ┆ inner: {
+ 19 ┆ otherField: 5
+ 20 ┆ }
+ 21 ┆ }
+
+ Invalid argument. Expected \\"String\\" but received \\"Int!\\"."
+`;
+
+exports[`Errors (Objects) invalidObjectValues6.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidObjectValues6.re 20:27-37
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: {field: \\"\\"}
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected \\"[InputObject]!\\" but received \\"InputObject!\\"."
+`;
+
+exports[`Errors (Objects) invalidObjectValues7.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidObjectValues7.re 20:36
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: [{field: 5}]
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected \\"String!\\" but received \\"Int!\\"."
+`;
+
+exports[`Errors (Objects) missingField1.re 1`] = `
+"File \\"operations/errors/missingField1.re\\", line 6, characters 6-27:
+6 | thisFieldDoesNotExist
+ ^^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisFieldDoesNotExist' on type CustomScalarObject
+
+ We've found a bug for you!
+ operations/errors/missingField1.re"
+`;
+
+exports[`Errors (Objects) missingField2.re 1`] = `
+"File \\"operations/errors/missingField2.re\\", line 13, characters 8-28:
+13 | l1: thisTypeDoesNotExist {
+ ^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisTypeDoesNotExist' on type Query
+
+ We've found a bug for you!
+ operations/errors/missingField2.re"
+`;
+
+exports[`Errors (Objects) missingField3.re 1`] = `
+"File \\"operations/errors/missingField3.re\\", line 15, characters 6-18:
+15 | doesNotExist
+ ^^^^^^^^^^^^
+Error: Unknown field 'doesNotExist' on type Lists
+
+ We've found a bug for you!
+ operations/errors/missingField3.re"
+`;
+
+exports[`Errors (Objects) missingFragment.re 1`] = `
+"We've found a bug for you!
+ operations/errors/missingFragment.re 3:28-42
+
+ 1 │ module Fragment = [%graphql
+ 2 │ {|
+ 3 │ fragment ListFragment on UnknownFragment {
+ 4 │ nullableOfNullable
+ 5 │ nullableOfNonNullable
+
+ Unknown type \\"UnknownFragment\\""
+`;
+
+exports[`Errors (Records) InvalidObjectValues2.re 1`] = `
+"We've found a bug for you!
+ operations/errors/InvalidObjectValues2.re 8:13-18
+
+ 6 ┆ query {
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nullableArray: [\\"\\"]
+ 10 ┆ field: \\"\\"
+
+ Invalid argument. The field \\"nonNullableField\\" on argument \\"nonRec\\" is missing."
+`;
+
+exports[`Errors (Records) InvalidObjectValues3.re 1`] = `
+"We've found a bug for you!
+ operations/errors/InvalidObjectValues3.re 9:35
+
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: 5
+ 10 ┆ nullableArray: [\\"\\"]
+ 11 ┆ field: \\"\\"
+
+ Invalid argument. Expected \\"String!\\" but received \\"Int!\\"."
+`;
+
+exports[`Errors (Records) InvalidObjectValues4.re 1`] = `
+"We've found a bug for you!
+ operations/errors/InvalidObjectValues4.re 10:32-34
+
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: \\"!\\"
+ 10 ┆ nullableArray: [2]
+ 11 ┆ field: \\"\\"
+ 12 ┆ enum: FIRST
+
+ Invalid argument. Expected \\"[String]\\" but received \\"[Int!]!\\"."
+`;
+
+exports[`Errors (Records) InvalidObjectValues5.re 1`] = `
+"We've found a bug for you!
+ operations/errors/InvalidObjectValues5.re 20:23-24
+
+ 18 ┆ otherField: \\"\\"
+ 19 ┆ }
+ 20 ┆ enum: []
+ 21 ┆ }
+ 22 ┆ )
+
+ Invalid argument. Expected \\"Enum\\" but received \\"EmptyList!\\"."
+`;
+
+exports[`Errors (Records) deprecatedFields.re 1`] = `
+"File \\"operations/errors/deprecatedFields.re\\", line 7, characters 6-21:
+7 | deprecatedField
+ ^^^^^^^^^^^^^^^
+Warning 22: Field \\"deprecatedField\\" has been deprecated. Reason: Use something else instead"
+`;
+
+exports[`Errors (Records) invalidArgVariableType1.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType1.re 9:25-28
+
+ 7 ┆ query invalidArgValues {
+ 8 ┆ invalidArgValues(
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. The variable \\"$arg\\" on argument \\"stringRequired\\" is missing."
+`;
+
+exports[`Errors (Records) invalidArgVariableType2.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType2.re 8:25-28
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable \\"$arg\\" to the required argument \\"stringRequired\\"."
+`;
+
+exports[`Errors (Records) invalidArgVariableType3.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType3.re 9:17-21
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ string: $arg2
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Expected \\"String\\" but received \\"Int\\"."
+`;
+
+exports[`Errors (Records) invalidArgVariableType4.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType4.re 10:14-18
+
+ 8 ┆ invalidArgValues(
+ 9 ┆ custom: $arg
+ 10 ┆ obj: $arg2
+ 11 ┆ stringRequired: \\"\\"
+ 12 ┆ )
+
+ Invalid argument. Expected \\"InputObject\\" but received \\"Int\\"."
+`;
+
+exports[`Errors (Records) invalidArgVariableType5.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType5.re 9:25-28
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ id: $arg
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable \\"$arg\\" to the required argument \\"stringRequired\\"."
+`;
+
+exports[`Errors (Records) invalidArgVariableType6.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidArgVariableType6.re 8:15-18
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ list: $arg
+ 9 ┆ stringRequired: \\"\\"
+ 10 ┆ )
+
+ Invalid argument. Expected \\"[String]\\" but received \\"String\\"."
+`;
+
+exports[`Errors (Records) invalidDefaultValue1.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidDefaultValue1.re 21:14-26
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ int: \\"Some string\\"
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected \\"Int\\" but received \\"String!\\"."
+`;
+
+exports[`Errors (Records) invalidDefaultValue2.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidDefaultValue2.re 8:14-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ int: {test: \\"xxx\\"}
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected \\"Int\\" but received \\"InputObject!\\"."
+`;
+
+exports[`Errors (Records) invalidDefaultValue3.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidDefaultValue3.re 21:13
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ id: 5
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected \\"ID\\" but received \\"Int!\\"."
+`;
+
+exports[`Errors (Records) invalidDefaultValue4.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidDefaultValue4.re 8:17-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ string: [\\"1\\", \\"2\\"]
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected \\"String\\" but received \\"List\\"."
+`;
+
+exports[`Errors (Records) invalidObjectValues1.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidObjectValues1.re 19:37
+
+ 17 ┆ otherField: \\"\\"
+ 18 ┆ inner: {
+ 19 ┆ otherField: 5
+ 20 ┆ }
+ 21 ┆ }
+
+ Invalid argument. Expected \\"String\\" but received \\"Int!\\"."
+`;
+
+exports[`Errors (Records) invalidObjectValues6.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidObjectValues6.re 20:27-37
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: {field: \\"\\"}
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected \\"[InputObject]!\\" but received \\"InputObject!\\"."
+`;
+
+exports[`Errors (Records) invalidObjectValues7.re 1`] = `
+"We've found a bug for you!
+ operations/errors/invalidObjectValues7.re 20:36
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: [{field: 5}]
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected \\"String!\\" but received \\"Int!\\"."
+`;
+
+exports[`Errors (Records) missingField1.re 1`] = `
+"File \\"operations/errors/missingField1.re\\", line 6, characters 6-27:
+6 | thisFieldDoesNotExist
+ ^^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisFieldDoesNotExist' on type CustomScalarObject
+
+ We've found a bug for you!
+ operations/errors/missingField1.re"
+`;
+
+exports[`Errors (Records) missingField2.re 1`] = `
+"File \\"operations/errors/missingField2.re\\", line 13, characters 8-28:
+13 | l1: thisTypeDoesNotExist {
+ ^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisTypeDoesNotExist' on type Query
+
+ We've found a bug for you!
+ operations/errors/missingField2.re"
+`;
+
+exports[`Errors (Records) missingField3.re 1`] = `
+"File \\"operations/errors/missingField3.re\\", line 15, characters 6-18:
+15 | doesNotExist
+ ^^^^^^^^^^^^
+Error: Unknown field 'doesNotExist' on type Lists
+
+ We've found a bug for you!
+ operations/errors/missingField3.re"
+`;
+
+exports[`Errors (Records) missingFragment.re 1`] = `
+"We've found a bug for you!
+ operations/errors/missingFragment.re 3:28-42
+
+ 1 │ module Fragment = [%graphql
+ 2 │ {|
+ 3 │ fragment ListFragment on UnknownFragment {
+ 4 │ nullableOfNullable
+ 5 │ nullableOfNonNullable
+
+ Unknown type \\"UnknownFragment\\""
+`;
+
+exports[`Legacy argNamedQuery.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"argNamedQuery\\": int};
+ type t_variables = {. \\"query\\": int};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($query: Int!) {\\\\nargNamedQuery(query: $query) \\\\n}\\\\n\\";
+ type t = {. \\"argNamedQuery\\": int};
+ type t_variables = {. \\"query\\": int};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let argNamedQuery = {
+ let value = value##argNamedQuery;
+ value;
+ };
+ {\\"argNamedQuery\\": argNamedQuery};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let argNamedQuery = {
+ let value = value##argNamedQuery;
+ value;
+ };
+ {\\"argNamedQuery\\": argNamedQuery};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"query\\": (a => a)(inp##query)};
+ let make = (~query, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"query\\": query}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~query, ()) =>
+ serializeVariables({\\"query\\": query}: t_variables);
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy comment.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"nonrecursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"field\\": Js.Nullable.t(string),
+ \\"enum\\": Js.Nullable.t(string),
+ \\"embeddedInput\\":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ \\"custom\\": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"nonrecursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": option(array(option(string))),
+ \\"field\\": option(string),
+ \\"enum\\": option([ | \`FIRST | \`SECOND | \`THIRD]),
+ \\"embeddedInput\\": option(array(option(t_variables_EmbeddedInput))),
+ \\"custom\\": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {\\"nonrecursiveInput\\": nonrecursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {\\"nonrecursiveInput\\": nonrecursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ \\"nonNullableField\\": (a => a)(inp##nonNullableField),
+ \\"nullableArray\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ \\"enum\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ \\"embeddedInput\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ \\"custom\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let make = (~arg, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"arg\\": arg}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ \\"nonNullableField\\": nonNullableField,
+ \\"nullableArray\\": nullableArray,
+ \\"field\\": field,
+ \\"enum\\": enum,
+ \\"embeddedInput\\": embeddedInput,
+ \\"custom\\": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ \\"field\\": field,
+ };
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy customDecoder.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module StringOfInt = {
+ let parse = string_of_int;
+ let serialize = int_of_string;
+ type t = string;
+};
+module IntOfString = {
+ let parse = int_of_string;
+ let serialize = string_of_int;
+ type t = int;
+};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"string\\": string,
+ \\"int\\": int,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ .
+ \\"string\\": IntOfString.t,
+ \\"int\\": StringOfInt.t,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = value##int;
+ StringOfInt.parse(value);
+ }
+ and string = {
+ let value = value##string;
+ IntOfString.parse(value);
+ };
+ {\\"string\\": string, \\"int\\": int};
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = value##int;
+ StringOfInt.serialize(value);
+ }
+ and string = {
+ let value = value##string;
+ IntOfString.serialize(value);
+ };
+ {\\"string\\": string, \\"int\\": int};
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy customScalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_customScalarField = {
+ .
+ \\"nullable\\": Js.Nullable.t(Js.Json.t),
+ \\"nonNullable\\": Js.Json.t,
+ };
+ type t = {. \\"customScalarField\\": t_customScalarField};
+ type t_variables = {
+ .
+ \\"opt\\": Js.Nullable.t(Js.Json.t),
+ \\"req\\": Js.Json.t,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($opt: CustomScalar, $req: CustomScalar!) {\\\\ncustomScalarField(argOptional: $opt, argRequired: $req) {\\\\nnullable \\\\nnonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_customScalarField = {
+ .
+ \\"nullable\\": option(Js.Json.t),
+ \\"nonNullable\\": Js.Json.t,
+ };
+ type t = {. \\"customScalarField\\": t_customScalarField};
+ type t_variables = {
+ .
+ \\"opt\\": option(Js.Json.t),
+ \\"req\\": Js.Json.t,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let customScalarField = {
+ let value = value##customScalarField;
+ let nonNullable = {
+ let value = value##nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = value##nullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {\\"nullable\\": nullable, \\"nonNullable\\": nonNullable};
+ };
+ {\\"customScalarField\\": customScalarField};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let customScalarField = {
+ let value = value##customScalarField;
+ let nonNullable = {
+ let value = value##nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = value##nullable;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullable\\": nullable, \\"nonNullable\\": nonNullable};
+ };
+ {\\"customScalarField\\": customScalarField};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"opt\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##opt,
+ ),
+ \\"req\\": (a => a)(inp##req),
+ };
+ let make = (~opt=?, ~req, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"opt\\": opt, \\"req\\": req}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~opt=?, ~req, ()) =>
+ serializeVariables({\\"opt\\": opt, \\"req\\": req}: t_variables);
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy customTypes.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Color = {
+ type t =
+ | Red
+ | Green
+ | Blue;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(\\"green\\") => Green
+ | Some(\\"blue\\") => Blue
+ | Some(\\"red\\")
+ | Some(_)
+ | None => Red
+ };
+ let serialize = color =>
+ (
+ switch (color) {
+ | Red => \\"red\\"
+ | Green => \\"green\\"
+ | Blue => \\"blue\\"
+ }
+ )
+ |> Js.Json.string;
+};
+module DateTime = {
+ type t = Js.Date.t;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(str) => str |> Js.Date.fromString
+ | None => Js.Date.make()
+ };
+ let serialize = date => date |> Js.Date.toISOString |> Js.Json.string;
+};
+module MyQuery = {
+ module Raw = {
+ type t_customFields = {
+ .
+ \\"currentTime\\": Js.Json.t,
+ \\"favoriteColor\\": Js.Json.t,
+ \\"futureTime\\": Js.Nullable.t(Js.Json.t),
+ \\"nullableColor\\": Js.Nullable.t(Js.Json.t),
+ };
+ type t = {. \\"customFields\\": t_customFields};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ncustomFields {\\\\ncurrentTime \\\\nfavoriteColor \\\\nfutureTime \\\\nnullableColor \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_customFields = {
+ .
+ \\"currentTime\\": DateTime.t,
+ \\"favoriteColor\\": Color.t,
+ \\"futureTime\\": option(DateTime.t),
+ \\"nullableColor\\": option(Color.t),
+ };
+ type t = {. \\"customFields\\": t_customFields};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let customFields = {
+ let value = value##customFields;
+ let nullableColor = {
+ let value = value##nullableColor;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(Color.parse(value))
+ | None => None
+ };
+ }
+ and futureTime = {
+ let value = value##futureTime;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(DateTime.parse(value))
+ | None => None
+ };
+ }
+ and favoriteColor = {
+ let value = value##favoriteColor;
+ Color.parse(value);
+ }
+ and currentTime = {
+ let value = value##currentTime;
+ DateTime.parse(value);
+ };
+ {
+ \\"currentTime\\": currentTime,
+ \\"favoriteColor\\": favoriteColor,
+ \\"futureTime\\": futureTime,
+ \\"nullableColor\\": nullableColor,
+ };
+ };
+ {\\"customFields\\": customFields};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let customFields = {
+ let value = value##customFields;
+ let nullableColor = {
+ let value = value##nullableColor;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(Color.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and futureTime = {
+ let value = value##futureTime;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(DateTime.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and favoriteColor = {
+ let value = value##favoriteColor;
+ Color.serialize(value);
+ }
+ and currentTime = {
+ let value = value##currentTime;
+ DateTime.serialize(value);
+ };
+ {
+ \\"currentTime\\": currentTime,
+ \\"favoriteColor\\": favoriteColor,
+ \\"futureTime\\": futureTime,
+ \\"nullableColor\\": nullableColor,
+ };
+ };
+ {\\"customFields\\": customFields};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy defaultObjectValueOnScalar.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"defaultObjectValueOnScalar\\": string};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndefaultObjectValueOnScalar(filter: {some: {json: \\\\\\"value\\\\\\"}}, arg: {field: \\\\\\"otherValue\\\\\\"}) \\\\n}\\\\n\\";
+ type t = {. \\"defaultObjectValueOnScalar\\": string};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let defaultObjectValueOnScalar = {
+ let value = value##defaultObjectValueOnScalar;
+ value;
+ };
+ {\\"defaultObjectValueOnScalar\\": defaultObjectValueOnScalar};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let defaultObjectValueOnScalar = {
+ let value = value##defaultObjectValueOnScalar;
+ value;
+ };
+ {\\"defaultObjectValueOnScalar\\": defaultObjectValueOnScalar};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy enumInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"enumInput\\": string};
+ type t_variables = {. \\"arg\\": string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: SampleField!) {\\\\nenumInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"enumInput\\": string};
+ type t_variables = {. \\"arg\\": [ | \`FIRST | \`SECOND | \`THIRD]};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let enumInput = {
+ let value = value##enumInput;
+ value;
+ };
+ {\\"enumInput\\": enumInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let enumInput = {
+ let value = value##enumInput;
+ value;
+ };
+ {\\"enumInput\\": enumInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\":
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ inp##arg,
+ ),
+ };
+ let make = (~arg, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"arg\\": arg}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables);
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_SampleField_47;
+ /**\`\`\`
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}
+\`\`\`*/
+ let _graphql_SampleField_47: _graphql_SampleField_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy explicit_object_record.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module RecordsQuery = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 RecordsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ObjectsQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ObjectsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy extensions.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ type t_variables;
+ };
+ type t;
+ type t_variables;
+
+ let query: string;
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+};
+
+module Parent = {
+ module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => ();
+ };
+};
+module Bla' = {
+ module Raw = {
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query Bla {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Bla = {
+ include Bla';
+ include Parent.ExtendQuery(Bla');
+};
+"
+`;
+
+exports[`Legacy fragmentDefinition.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module GraphQL_PPX = {
+ let deepMerge = (json1, _) => json1;
+};
+module ListFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment ListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ };
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ };
+ };
+ let name = \\"ListFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Another = {
+ /**The GraphQL query string*/
+ let query = \\"fragment Another on Lists {\\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {. \\"nullableOfNonNullable\\": Js.Nullable.t(array(string))};
+ type nonrec t_Lists = t;
+ };
+ type t = {. \\"nullableOfNonNullable\\": option(array(string))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ };
+ {\\"nullableOfNonNullable\\": nullableOfNonNullable};
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableOfNonNullable\\": nullableOfNonNullable};
+ };
+ let name = \\"Another\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module FragmentWithArgs = {
+ /**The GraphQL query string*/
+ let query = \\"fragment FragmentWithArgs on Lists {\\\\nlistWithArg(arg1: $arg1) \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"listWithArg\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {. \\"listWithArg\\": option(array(option(string)))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listWithArg = {
+ let value = value##listWithArg;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {\\"listWithArg\\": listWithArg};
+ };
+ let verifyArgsAndParse = (~arg1 as _arg1: [ | \`String], value: Raw.t) =>
+ parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listWithArg = {
+ let value = value##listWithArg;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"listWithArg\\": listWithArg};
+ };
+ let name = \\"FragmentWithArgs\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+
+module InlineFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment InlineListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ };
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ };
+ };
+ let name = \\"InlineListFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery = {
+ module Raw = {
+ type t_l2;
+ type t_l3;
+ type t_l4;
+ type t = {
+ .
+ \\"l1\\": ListFragment.Raw.t,
+ \\"l2\\": t_l2,
+ \\"l3\\": t_l3,
+ \\"l4\\": t_l4,
+ \\"l5\\": FragmentWithArgs.Raw.t,
+ };
+ type t_variables = {. \\"arg1\\": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ \\"query MyQuery($arg1: String) {\\\\nl1: lists {\\\\n...\\"
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl2: lists {\\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl3: lists {\\\\nnullableOfNullable \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl4: lists {\\\\nnullableOfNullable \\\\n...\\"
+ )
+ ++ InlineFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl5: lists {\\\\n...\\"
+ )
+ ++ FragmentWithArgs.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ FragmentWithArgs.query
+ )
+ ++ InlineFragment.query
+ )
+ ++ ListFragment.query;
+ type t_l2 = {
+ .
+ \\"frag1\\": ListFragment.t_Lists,
+ \\"frag2\\": ListFragment.t_Lists,
+ };
+ type t_l3 = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"frag1\\": ListFragment.t_Lists,
+ \\"frag2\\": ListFragment.t_Lists,
+ };
+ type t_l4 = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"inlineFragment\\": InlineFragment.t_Lists,
+ };
+ type t = {
+ .
+ \\"l1\\": ListFragment.t,
+ \\"l2\\": t_l2,
+ \\"l3\\": t_l3,
+ \\"l4\\": t_l4,
+ \\"l5\\": FragmentWithArgs.t,
+ };
+ type t_variables = {. \\"arg1\\": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let l5 = {
+ let value = value##l5;
+ FragmentWithArgs.verifyArgsAndParse(~arg1=\`String, value);
+ }
+ and l4 = {
+ let value = value##l4;
+ let inlineFragment = {
+ let value: InlineFragment.Raw.t = Obj.magic(value);
+ InlineFragment.verifyArgsAndParse(value);
+ }
+ and nullableOfNullable = {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"nullableOfNullable\\"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"inlineFragment\\": inlineFragment,
+ };
+ }
+ and l3 = {
+ let value = value##l3;
+ let frag2 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and frag1 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and nullableOfNullable = {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"nullableOfNullable\\"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"frag1\\": frag1,
+ \\"frag2\\": frag2,
+ };
+ }
+ and l2 = {
+ let value = value##l2;
+ let frag2 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and frag1 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {\\"frag1\\": frag1, \\"frag2\\": frag2};
+ }
+ and l1 = {
+ let value = value##l1;
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {\\"l1\\": l1, \\"l2\\": l2, \\"l3\\": l3, \\"l4\\": l4, \\"l5\\": l5};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let l5 = {
+ let value = value##l5;
+ FragmentWithArgs.serialize(value);
+ }
+ and l4 = {
+ let value = value##l4;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableOfNullable\\": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(InlineFragment.serialize(value##inlineFragment)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l4
+ );
+ }
+ and l3 = {
+ let value = value##l3;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableOfNullable\\": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (Obj.magic(ListFragment.serialize(value##frag1)): Js.Json.t),
+ (Obj.magic(ListFragment.serialize(value##frag2)): Js.Json.t),
+ |],
+ ),
+ ): Raw.t_l3
+ );
+ }
+ and l2 = {
+ let value = value##l2;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(Js.Dict.empty): Js.Json.t,
+ [|
+ (Obj.magic(ListFragment.serialize(value##frag1)): Js.Json.t),
+ (Obj.magic(ListFragment.serialize(value##frag2)): Js.Json.t),
+ |],
+ ),
+ ): Raw.t_l2
+ );
+ }
+ and l1 = {
+ let value = value##l1;
+ ListFragment.serialize(value);
+ };
+ {\\"l1\\": l1, \\"l2\\": l2, \\"l3\\": l3, \\"l4\\": l4, \\"l5\\": l5};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg1\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##arg1,
+ ),
+ };
+ let make = (~arg1=?, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"arg1\\": arg1}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~arg1=?, ()) =>
+ serializeVariables({\\"arg1\\": arg1}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {. \\"lists\\": ListFragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ ((\\"query {\\\\nlists {\\\\n...\\" ++ ListFragment.name) ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\")
+ ++ ListFragment.query;
+ type t = {. \\"lists\\": ListFragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ ListFragment.serialize(value);
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy interface.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+"
+`;
+
+exports[`Legacy lists.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy listsArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"listsInput\\": string};
+ type t_variables = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\\\\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \\\\n}\\\\n\\";
+ type t = {. \\"listsInput\\": string};
+ type t_variables = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {\\"listsInput\\": listsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {\\"listsInput\\": listsInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"nullableOfNullable\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableOfNullable,
+ ),
+ \\"nullableOfNonNullable\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ inp##nullableOfNonNullable,
+ ),
+ \\"nonNullableOfNullable\\":
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ inp##nonNullableOfNullable,
+ ),
+ \\"nonNullableOfNonNullable\\":
+ (a => Array.map(b => (a => a)(b), a))(
+ inp##nonNullableOfNonNullable,
+ ),
+ };
+ let make =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) => {
+ \\"query\\": query,
+ \\"variables\\":
+ serializeVariables(
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ }: t_variables,
+ ),
+ \\"parse\\": parse,
+ }
+ and makeVariables =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ }: t_variables,
+ );
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy listsInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"listsInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: ListsInput!) {\\\\nlistsInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"listsInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {\\"listsInput\\": listsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {\\"listsInput\\": listsInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"arg\\": (a => serializeInputObjectListsInput(a))(inp##arg)}
+ and serializeInputObjectListsInput:
+ t_variables_ListsInput => Raw.t_variables_ListsInput =
+ inp => {
+ \\"nullableOfNullable\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableOfNullable,
+ ),
+ \\"nullableOfNonNullable\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ inp##nullableOfNonNullable,
+ ),
+ \\"nonNullableOfNullable\\":
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ inp##nonNullableOfNullable,
+ ),
+ \\"nonNullableOfNonNullable\\":
+ (a => Array.map(b => (a => a)(b), a))(
+ inp##nonNullableOfNonNullable,
+ ),
+ };
+ let make = (~arg, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"arg\\": arg}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectListsInput =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ )
+ : t_variables_ListsInput => {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_ListsInput_47;
+ /**\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}
+\`\`\`*/
+ let _graphql_ListsInput_47: _graphql_ListsInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy mutation.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationWithError_value = {. \\"stringField\\": string};
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ \\"field\\": t_mutationWithError_errors_field,
+ \\"message\\": string,
+ };
+ type t_mutationWithError = {
+ .
+ \\"value\\": Js.Nullable.t(t_mutationWithError_value),
+ \\"errors\\": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nvalue {\\\\nstringField \\\\n}\\\\n\\\\nerrors {\\\\nfield \\\\nmessage \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_value = {. \\"stringField\\": string};
+ type t_mutationWithError_errors_field = [
+ | \`FutureAddedValue(string)
+ | \`FIRST
+ | \`SECOND
+ | \`THIRD
+ ];
+ type t_mutationWithError_errors = {
+ .
+ \\"field\\": t_mutationWithError_errors_field,
+ \\"message\\": string,
+ };
+ type t_mutationWithError = {
+ .
+ \\"value\\": option(t_mutationWithError_value),
+ \\"errors\\": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let message = {
+ let value = value##message;
+ value;
+ }
+ and field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | other => \`FutureAddedValue(other)
+ };
+ };
+ {\\"field\\": field, \\"message\\": message};
+ ),
+ )
+ | None => None
+ };
+ }
+ and value = {
+ let value = value##value;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let stringField = {
+ let value = value##stringField;
+ value;
+ };
+ {\\"stringField\\": stringField};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"value\\": value, \\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let message = {
+ let value = value##message;
+ value;
+ }
+ and field = {
+ let value = value##field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ | \`FutureAddedValue(other) => other
+ };
+ };
+ {\\"field\\": field, \\"message\\": message};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and value = {
+ let value = value##value;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let stringField = {
+ let value = value##stringField;
+ value;
+ };
+ {\\"stringField\\": stringField};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"value\\": value, \\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy mutationWithArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\";
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"required\\": (a => a)(inp##required)};
+ let make = (~required, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"required\\": required}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~required, ()) =>
+ serializeVariables({\\"required\\": required}: t_variables);
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy mutationWithArgsAndNoRecords.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\";
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"required\\": (a => a)(inp##required)};
+ let make = (~required, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"required\\": required}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~required, ()) =>
+ serializeVariables({\\"required\\": required}: t_variables);
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy nested.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type record = {
+ f1: string,
+ f2: string,
+};
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {. \\"field\\": string};
+ type t_first_inner = {. \\"inner\\": Js.Nullable.t(t_first_inner_inner)};
+ type t_first = {. \\"inner\\": Js.Nullable.t(t_first_inner)};
+ type t_second_inner_inner = {
+ .
+ \\"f1\\": string,
+ \\"f2\\": string,
+ };
+ type t_second_inner = {. \\"inner\\": Js.Nullable.t(t_second_inner_inner)};
+ type t_second = {. \\"inner\\": Js.Nullable.t(t_second_inner)};
+ type t_let_inner_inner = {. \\"field\\": string};
+ type t_let_inner = {. \\"inner\\": Js.Nullable.t(t_let_inner_inner)};
+ type t_let = {. \\"inner\\": Js.Nullable.t(t_let_inner)};
+ type t = {
+ .
+ \\"first\\": t_first,
+ \\"second\\": t_second,
+ \\"let_\\": t_let,
+ };
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nfirst: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nsecond: nestedObject {\\\\ninner {\\\\ninner {\\\\nf1: field \\\\nf2: field \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nlet: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_first_inner_inner = {. \\"field\\": string};
+ type t_first_inner = {. \\"inner\\": option(t_first_inner_inner)};
+ type t_first = {. \\"inner\\": option(t_first_inner)};
+ type t_second_inner_inner = {
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {. \\"inner\\": option(t_second_inner_inner)};
+ type t_second = {. \\"inner\\": option(t_second_inner)};
+ type t_let_inner_inner = {. \\"field\\": string};
+ type t_let_inner = {. \\"inner\\": option(t_let_inner_inner)};
+ type t_let = {. \\"inner\\": option(t_let_inner)};
+ type t = {
+ .
+ \\"first\\": t_first,
+ \\"second\\": t_second,
+ \\"let_\\": t_let,
+ };
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let let_ = {
+ let value = value##let_;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {\\"field\\": field};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ }
+ and second = {
+ let value = value##second;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let f2 = {
+ let value = value##f2;
+ value;
+ }
+ and f1 = {
+ let value = value##f1;
+ value;
+ };
+ {f1, f2};
+ }: t_second_inner_inner,
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ }
+ and first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {\\"field\\": field};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ };
+ {\\"first\\": first, \\"second\\": second, \\"let_\\": let_};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let let_ = {
+ let value = value##let_;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {\\"field\\": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ }
+ and second = {
+ let value = value##second;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let f2 = {
+ let value = (value: t_second_inner_inner).f2;
+ value;
+ }
+ and f1 = {
+ let value = (value: t_second_inner_inner).f1;
+ value;
+ };
+ {\\"f1\\": f1, \\"f2\\": f2};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ }
+ and first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {\\"field\\": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ };
+ {\\"first\\": first, \\"second\\": second, \\"let_\\": let_};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy nonrecursiveInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"nonrecursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"field\\": Js.Nullable.t(string),
+ \\"enum\\": Js.Nullable.t(string),
+ \\"embeddedInput\\":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ \\"custom\\": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"nonrecursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": option(array(option(string))),
+ \\"field\\": option(string),
+ \\"enum\\": option([ | \`FIRST | \`SECOND | \`THIRD]),
+ \\"embeddedInput\\": option(array(option(t_variables_EmbeddedInput))),
+ \\"custom\\": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {\\"nonrecursiveInput\\": nonrecursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {\\"nonrecursiveInput\\": nonrecursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ \\"nonNullableField\\": (a => a)(inp##nonNullableField),
+ \\"nullableArray\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ \\"enum\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ \\"embeddedInput\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ \\"custom\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let make = (~arg, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"arg\\": arg}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ \\"nonNullableField\\": nonNullableField,
+ \\"nullableArray\\": nullableArray,
+ \\"field\\": field,
+ \\"enum\\": enum,
+ \\"embeddedInput\\": embeddedInput,
+ \\"custom\\": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ \\"field\\": field,
+ };
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {
+ .
+ \\"scalarsInput\\": string,
+ \\"more\\": string,
+ };
+ type t_variables = {
+ .
+ \\"arg\\": t_variables_NonrecursiveInput,
+ \\"arg2\\": t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"field\\": Js.Nullable.t(string),
+ \\"enum\\": Js.Nullable.t(string),
+ \\"embeddedInput\\":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ \\"custom\\": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\\\\nscalarsInput(arg: $arg) \\\\nmore: scalarsInput(arg: $arg2) \\\\n}\\\\n\\";
+ type t = {
+ .
+ \\"scalarsInput\\": string,
+ \\"more\\": string,
+ };
+ type t_variables = {
+ .
+ \\"arg\\": t_variables_NonrecursiveInput,
+ \\"arg2\\": t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": option(array(option(string))),
+ \\"field\\": option(string),
+ \\"enum\\": option([ | \`FIRST | \`SECOND | \`THIRD]),
+ \\"embeddedInput\\": option(array(option(t_variables_EmbeddedInput))),
+ \\"custom\\": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let more = {
+ let value = value##more;
+ value;
+ }
+ and scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput, \\"more\\": more};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let more = {
+ let value = value##more;
+ value;
+ }
+ and scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput, \\"more\\": more};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ \\"arg2\\": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg2),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ \\"nonNullableField\\": (a => a)(inp##nonNullableField),
+ \\"nullableArray\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ \\"enum\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ \\"embeddedInput\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ \\"custom\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let make = (~arg, ~arg2, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"arg\\": arg, \\"arg2\\": arg2}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~arg, ~arg2, ()) =>
+ serializeVariables({\\"arg\\": arg, \\"arg2\\": arg2}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ \\"nonNullableField\\": nonNullableField,
+ \\"nullableArray\\": nullableArray,
+ \\"field\\": field,
+ \\"enum\\": enum,
+ \\"embeddedInput\\": embeddedInput,
+ \\"custom\\": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ \\"field\\": field,
+ };
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_169;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_169: _graphql_NonrecursiveInput_169 =
+ Obj.magic(0);
+ type nonrec _graphql_NonrecursiveInput_196;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_196: _graphql_NonrecursiveInput_196 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy omitFutureValueEnum.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [
+ | \`FutureAddedValue(string)
+ | \`FIRST
+ | \`SECOND
+ | \`THIRD
+ ];
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | other => \`FutureAddedValue(other)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ | \`FutureAddedValue(other) => other
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [ | \`FIRST | \`SECOND | \`THIRD];
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | _ => raise(Not_found)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [ | \`FIRST | \`SECOND | \`THIRD];
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | _ => raise(Not_found)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy omitFutureValueUnion.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy pokedexApolloMode.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ .
+ \\"id\\": string,
+ \\"name\\": Js.Nullable.t(string),
+ };
+ type t = {. \\"pokemon\\": Js.Nullable.t(t_pokemon)};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\npokemon(name: \\\\\\"Pikachu\\\\\\") {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_pokemon = {
+ .
+ \\"id\\": string,
+ \\"name\\": option(string),
+ };
+ type t = {. \\"pokemon\\": option(t_pokemon)};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let name = {
+ let value = value##name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {\\"id\\": id, \\"name\\": name};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"pokemon\\": pokemon};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = value##name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {\\"id\\": id, \\"name\\": name};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"pokemon\\": pokemon};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy pokedexScalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ .
+ \\"id\\": string,
+ \\"name\\": Js.Nullable.t(string),
+ };
+ type t = {. \\"pokemon\\": Js.Nullable.t(t_pokemon)};
+ type t_variables = {
+ .
+ \\"id\\": Js.Nullable.t(string),
+ \\"name\\": Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query pokemon($id: String, $name: String) {\\\\npokemon(name: $name, id: $id) {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_pokemon = {
+ .
+ \\"id\\": string,
+ \\"name\\": option(string),
+ };
+ type t = {. \\"pokemon\\": option(t_pokemon)};
+ type t_variables = {
+ .
+ \\"id\\": option(string),
+ \\"name\\": option(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let name = {
+ let value = value##name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {\\"id\\": id, \\"name\\": name};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"pokemon\\": pokemon};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = value##name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {\\"id\\": id, \\"name\\": name};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"pokemon\\": pokemon};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"id\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##id,
+ ),
+ \\"name\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##name,
+ ),
+ };
+ let make = (~id=?, ~name=?, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"id\\": id, \\"name\\": name}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~id=?, ~name=?, ()) =>
+ serializeVariables({\\"id\\": id, \\"name\\": name}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy record.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type scalars = {
+ string,
+ int,
+};
+
+type dog = {
+ name: string,
+ barkVolume: float,
+};
+
+type oneFieldQuery = {nullableString: option(string)};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"string\\": string,
+ \\"int\\": int,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t = {. \\"variousScalars\\": scalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ (
+ {
+ let int = {
+ let value = value##int;
+ value;
+ }
+ and string = {
+ let value = value##string;
+ value;
+ };
+ {string, int};
+ }: scalars
+ );
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = (value: scalars).int;
+ value;
+ }
+ and string = {
+ let value = (value: scalars).string;
+ value;
+ };
+ {\\"string\\": string, \\"int\\": int};
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module OneFieldQuery = {
+ module Raw = {
+ type t_variousScalars = {. \\"nullableString\\": Js.Nullable.t(string)};
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {nullableString: option(string)};
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ (
+ {
+ let nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {nullableString: nullableString};
+ }: t_variousScalars
+ );
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableString\\": nullableString};
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 OneFieldQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ExternalFragmentQuery = {
+ module Fragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment Fragment on VariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"string\\": string,
+ \\"int\\": int,
+ };
+ type nonrec t_VariousScalars = t;
+ };
+ type t = {
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ let int = {
+ let value = value##int;
+ value;
+ }
+ and string = {
+ let value = value##string;
+ value;
+ };
+ {string, int};
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let int = {
+ let value = (value: t).int;
+ value;
+ }
+ and string = {
+ let value = (value: t).string;
+ value;
+ };
+ {\\"string\\": string, \\"int\\": int};
+ };
+ let name = \\"Fragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+VariousScalars {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t = {. \\"variousScalars\\": Fragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (\\"query {\\\\nvariousScalars {\\\\n...\\" ++ Fragment.name)
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ Fragment.query;
+ type t = {. \\"variousScalars\\": Fragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ Fragment.verifyArgsAndParse(value);
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ Fragment.serialize(value);
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+module InlineFragmentQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {name, barkVolume};
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 InlineFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module UnionExternalFragmentQuery = {
+ module DogFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment DogFragment on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type nonrec t_Dog = t;
+ };
+ type t = {
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {name, barkVolume};
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let barkVolume = {
+ let value = (value: t).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t).name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ };
+ let name = \\"DogFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Dog {
+ name: String!
+ barkVolume: Float!
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n...\\"
+ ++ DogFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ DogFragment.query;
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(DogFragment.t)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: DogFragment.Raw.t = Obj.magic(value);
+ DogFragment.verifyArgsAndParse(value);
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(DogFragment.serialize(value)): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+"
+`;
+
+exports[`Legacy recursiveInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"recursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ .
+ \\"otherField\\": Js.Nullable.t(string),
+ \\"inner\\": Js.Nullable.t(t_variables_RecursiveInput),
+ \\"enum\\": Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: RecursiveInput!) {\\\\nrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"recursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ .
+ \\"otherField\\": option(string),
+ \\"inner\\": option(t_variables_RecursiveInput),
+ \\"enum\\": option([ | \`FIRST | \`SECOND | \`THIRD]),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let recursiveInput = {
+ let value = value##recursiveInput;
+ value;
+ };
+ {\\"recursiveInput\\": recursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let recursiveInput = {
+ let value = value##recursiveInput;
+ value;
+ };
+ {\\"recursiveInput\\": recursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"arg\\": (a => serializeInputObjectRecursiveInput(a))(inp##arg)}
+ and serializeInputObjectRecursiveInput:
+ t_variables_RecursiveInput => Raw.t_variables_RecursiveInput =
+ inp => {
+ \\"otherField\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##otherField,
+ ),
+ \\"inner\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectRecursiveInput(a))(b),
+ )
+ }
+ )(
+ inp##inner,
+ ),
+ \\"enum\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ };
+ let make = (~arg, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"arg\\": arg}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectRecursiveInput =
+ (~otherField=?, ~inner=?, ~enum=?, ()): t_variables_RecursiveInput => {
+ \\"otherField\\": otherField,
+ \\"inner\\": inner,
+ \\"enum\\": enum,
+ };
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_RecursiveInput_47;
+ /**\`\`\`
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}
+\`\`\`*/
+ let _graphql_RecursiveInput_47: _graphql_RecursiveInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy scalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy scalarsArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"scalarsInput\\": string};
+ type t_variables = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\\\\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \\\\n}\\\\n\\";
+ type t = {. \\"scalarsInput\\": string};
+ type t_variables = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"nullableString\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableString,
+ ),
+ \\"string\\": (a => a)(inp##string),
+ \\"nullableInt\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableInt,
+ ),
+ \\"int\\": (a => a)(inp##int),
+ \\"nullableFloat\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableFloat,
+ ),
+ \\"float\\": (a => a)(inp##float),
+ \\"nullableBoolean\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableBoolean,
+ ),
+ \\"boolean\\": (a => a)(inp##boolean),
+ \\"nullableID\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableID,
+ ),
+ \\"id\\": (a => a)(inp##id),
+ };
+ let make =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) => {
+ \\"query\\": query,
+ \\"variables\\":
+ serializeVariables(
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ }: t_variables,
+ ),
+ \\"parse\\": parse,
+ }
+ and makeVariables =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ }: t_variables,
+ );
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy scalarsInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"scalarsInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: VariousScalarsInput!) {\\\\nscalarsInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"scalarsInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\": (a => serializeInputObjectVariousScalarsInput(a))(inp##arg),
+ }
+ and serializeInputObjectVariousScalarsInput:
+ t_variables_VariousScalarsInput => Raw.t_variables_VariousScalarsInput =
+ inp => {
+ \\"nullableString\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableString,
+ ),
+ \\"string\\": (a => a)(inp##string),
+ \\"nullableInt\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableInt,
+ ),
+ \\"int\\": (a => a)(inp##int),
+ \\"nullableFloat\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableFloat,
+ ),
+ \\"float\\": (a => a)(inp##float),
+ \\"nullableBoolean\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableBoolean,
+ ),
+ \\"boolean\\": (a => a)(inp##boolean),
+ \\"nullableID\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableID,
+ ),
+ \\"id\\": (a => a)(inp##id),
+ };
+ let make = (~arg, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"arg\\": arg}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectVariousScalarsInput =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ )
+ : t_variables_VariousScalarsInput => {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_VariousScalarsInput_47;
+ /**\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+\`\`\`*/
+ let _graphql_VariousScalarsInput_47: _graphql_VariousScalarsInput_47 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy skipDirectives.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_v1 = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": Js.Nullable.t(string),
+ };
+ type t_v2 = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": Js.Nullable.t(string),
+ };
+ type t = {
+ .
+ \\"v1\\": t_v1,
+ \\"v2\\": t_v2,
+ };
+ type t_variables = {. \\"var\\": bool};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($var: Boolean!) {\\\\nv1: variousScalars {\\\\nnullableString @skip(if: $var) \\\\nstring @skip(if: $var) \\\\n}\\\\n\\\\nv2: variousScalars {\\\\nnullableString @include(if: $var) \\\\nstring @include(if: $var) \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_v1 = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": option(string),
+ };
+ type t_v2 = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": option(string),
+ };
+ type t = {
+ .
+ \\"v1\\": t_v1,
+ \\"v2\\": t_v2,
+ };
+ type t_variables = {. \\"var\\": bool};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let v2 = {
+ let value = value##v2;
+ let string = {
+ let value = value##string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {\\"nullableString\\": nullableString, \\"string\\": string};
+ }
+ and v1 = {
+ let value = value##v1;
+ let string = {
+ let value = value##string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {\\"nullableString\\": nullableString, \\"string\\": string};
+ };
+ {\\"v1\\": v1, \\"v2\\": v2};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let v2 = {
+ let value = value##v2;
+ let string = {
+ let value = value##string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableString\\": nullableString, \\"string\\": string};
+ }
+ and v1 = {
+ let value = value##v1;
+ let string = {
+ let value = value##string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableString\\": nullableString, \\"string\\": string};
+ };
+ {\\"v1\\": v1, \\"v2\\": v2};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"var\\": (a => a)(inp##var)};
+ let make = (~var, ()) => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables({\\"var\\": var}: t_variables),
+ \\"parse\\": parse,
+ }
+ and makeVariables = (~var, ()) =>
+ serializeVariables({\\"var\\": var}: t_variables);
+ let makeWithVariables = variables => {
+ \\"query\\": query,
+ \\"variables\\": serializeVariables(variables),
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy subscription.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_simpleSubscription_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_simpleSubscription_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_simpleSubscription;
+ type t = {. \\"simpleSubscription\\": t_simpleSubscription};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"subscription {\\\\nsimpleSubscription {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_simpleSubscription_Dog = {. \\"name\\": string};
+ type t_simpleSubscription_Human = {. \\"name\\": string};
+ type t_simpleSubscription = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_simpleSubscription_Dog)
+ | \`Human(t_simpleSubscription_Human)
+ ];
+ type t = {. \\"simpleSubscription\\": t_simpleSubscription};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let simpleSubscription = {
+ let value = value##simpleSubscription;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_simpleSubscription_Dog = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_simpleSubscription_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_simpleSubscription
+ );
+ };
+ {\\"simpleSubscription\\": simpleSubscription};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let simpleSubscription = {
+ let value = value##simpleSubscription;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name};
+ },
+ ): Raw.t_simpleSubscription
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_simpleSubscription
+ )
+ | \`FutureAddedValue(value) => (
+ Obj.magic(value): Raw.t_simpleSubscription
+ )
+ };
+ };
+ {\\"simpleSubscription\\": simpleSubscription};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy tagged_template.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let { graphql } = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery3 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let { graphql } = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery3 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery4 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let graphql = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery4 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy typename.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ .
+ \\"__typename\\": string,
+ \\"field\\": string,
+ };
+ type t_first_inner = {
+ .
+ \\"__typename\\": string,
+ \\"inner\\": Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ .
+ \\"__typename\\": string,
+ \\"inner\\": Js.Nullable.t(t_first_inner),
+ };
+ type t = {. \\"first\\": t_first};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nfirst: nestedObject {\\\\n__typename \\\\ninner {\\\\n__typename \\\\ninner {\\\\n__typename \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_first_inner_inner = {
+ .
+ \\"__typename\\": string,
+ \\"field\\": string,
+ };
+ type t_first_inner = {
+ .
+ \\"__typename\\": string,
+ \\"inner\\": option(t_first_inner_inner),
+ };
+ type t_first = {
+ .
+ \\"__typename\\": string,
+ \\"inner\\": option(t_first_inner),
+ };
+ type t = {. \\"first\\": t_first};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"field\\": field};
+ },
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"inner\\": inner};
+ },
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"inner\\": inner};
+ };
+ {\\"first\\": first};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"field\\": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"inner\\": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"inner\\": inner};
+ };
+ {\\"first\\": first};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy union.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQueryNoError = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQueryNoError {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy unionPartial.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Legacy variant.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationForVariant_dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_mutationForVariant_human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_mutationForVariant_dogOrHuman;
+ type t_mutationForVariant;
+ type t = {. \\"mutationForVariant\\": t_mutationForVariant};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationForVariant {\\\\nbaseType \\\\nbaseTypeList \\\\ndog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\nhuman {\\\\nname \\\\n}\\\\n\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationForVariant_dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_mutationForVariant_human = {. \\"name\\": string};
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {. \\"name\\": string};
+ type t_mutationForVariant_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_mutationForVariant_dogOrHuman_Dog)
+ | \`Human(t_mutationForVariant_dogOrHuman_Human)
+ ];
+ type t_mutationForVariant = [
+ | \`BaseType(string)
+ | \`BaseTypeList(array(string))
+ | \`Dog(t_mutationForVariant_dog)
+ | \`Human(t_mutationForVariant_human)
+ | \`DogOrHuman(t_mutationForVariant_dogOrHuman)
+ ];
+ type t = {. \\"mutationForVariant\\": t_mutationForVariant};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationForVariant = {
+ let value = value##mutationForVariant;
+ switch (Js.Json.decodeObject(Obj.magic(value): Js.Json.t)) {
+ | None =>
+ Js.Exn.raiseError(
+ \\"graphql-ppx: \\"
+ ++ \\"Expected type \\"
+ ++ \\"VariantTestResult\\"
+ ++ \\" to be an object\\",
+ )
+ | Some(value) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"baseType\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`BaseType(value);
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"baseTypeList\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`BaseTypeList(value |> Js.Array.map(value => value));
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"dog\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`Dog(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"human\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`Human(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"dogOrHuman\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`DogOrHuman(
+ {
+ let typename: string =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"),
+ );
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Dog =
+ Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Human =
+ Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_mutationForVariant_dogOrHuman
+ );
+ },
+ );
+ | Some(_) =>
+ Js.Exn.raiseError(
+ \\"graphql-ppx: \\"
+ ++ \\"All fields on variant selection set on type \\"
+ ++ \\"VariantTestResult\\"
+ ++ \\" were null\\",
+ )
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ {\\"mutationForVariant\\": mutationForVariant};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationForVariant = {
+ let value = value##mutationForVariant;
+ Obj.magic(Js.Json.null);
+ };
+ {\\"mutationForVariant\\": mutationForVariant};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ \\"query\\": query,
+ \\"variables\\": Js.Json.null,
+ \\"parse\\": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects argNamedQuery.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"argNamedQuery\\": int};
+ type t_variables = {. \\"query\\": int};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($query: Int!) {\\\\nargNamedQuery(query: $query) \\\\n}\\\\n\\";
+ type t = {. \\"argNamedQuery\\": int};
+ type t_variables = {. \\"query\\": int};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let argNamedQuery = {
+ let value = value##argNamedQuery;
+ value;
+ };
+ {\\"argNamedQuery\\": argNamedQuery};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let argNamedQuery = {
+ let value = value##argNamedQuery;
+ value;
+ };
+ {\\"argNamedQuery\\": argNamedQuery};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"query\\": (a => a)(inp##query)};
+ let makeVariables = (~query, ()) =>
+ serializeVariables({\\"query\\": query}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects comment.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"nonrecursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"field\\": Js.Nullable.t(string),
+ \\"enum\\": Js.Nullable.t(string),
+ \\"embeddedInput\\":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ \\"custom\\": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"nonrecursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": option(array(option(string))),
+ \\"field\\": option(string),
+ \\"enum\\": option([ | \`FIRST | \`SECOND | \`THIRD]),
+ \\"embeddedInput\\": option(array(option(t_variables_EmbeddedInput))),
+ \\"custom\\": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {\\"nonrecursiveInput\\": nonrecursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {\\"nonrecursiveInput\\": nonrecursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ \\"nonNullableField\\": (a => a)(inp##nonNullableField),
+ \\"nullableArray\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ \\"enum\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ \\"embeddedInput\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ \\"custom\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ \\"nonNullableField\\": nonNullableField,
+ \\"nullableArray\\": nullableArray,
+ \\"field\\": field,
+ \\"enum\\": enum,
+ \\"embeddedInput\\": embeddedInput,
+ \\"custom\\": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ \\"field\\": field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects customDecoder.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module StringOfInt = {
+ let parse = string_of_int;
+ let serialize = int_of_string;
+ type t = string;
+};
+module IntOfString = {
+ let parse = int_of_string;
+ let serialize = string_of_int;
+ type t = int;
+};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"string\\": string,
+ \\"int\\": int,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ .
+ \\"string\\": IntOfString.t,
+ \\"int\\": StringOfInt.t,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = value##int;
+ StringOfInt.parse(value);
+ }
+ and string = {
+ let value = value##string;
+ IntOfString.parse(value);
+ };
+ {\\"string\\": string, \\"int\\": int};
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = value##int;
+ StringOfInt.serialize(value);
+ }
+ and string = {
+ let value = value##string;
+ IntOfString.serialize(value);
+ };
+ {\\"string\\": string, \\"int\\": int};
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects customScalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_customScalarField = {
+ .
+ \\"nullable\\": Js.Nullable.t(Js.Json.t),
+ \\"nonNullable\\": Js.Json.t,
+ };
+ type t = {. \\"customScalarField\\": t_customScalarField};
+ type t_variables = {
+ .
+ \\"opt\\": Js.Nullable.t(Js.Json.t),
+ \\"req\\": Js.Json.t,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($opt: CustomScalar, $req: CustomScalar!) {\\\\ncustomScalarField(argOptional: $opt, argRequired: $req) {\\\\nnullable \\\\nnonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_customScalarField = {
+ .
+ \\"nullable\\": option(Js.Json.t),
+ \\"nonNullable\\": Js.Json.t,
+ };
+ type t = {. \\"customScalarField\\": t_customScalarField};
+ type t_variables = {
+ .
+ \\"opt\\": option(Js.Json.t),
+ \\"req\\": Js.Json.t,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let customScalarField = {
+ let value = value##customScalarField;
+ let nonNullable = {
+ let value = value##nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = value##nullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {\\"nullable\\": nullable, \\"nonNullable\\": nonNullable};
+ };
+ {\\"customScalarField\\": customScalarField};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let customScalarField = {
+ let value = value##customScalarField;
+ let nonNullable = {
+ let value = value##nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = value##nullable;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullable\\": nullable, \\"nonNullable\\": nonNullable};
+ };
+ {\\"customScalarField\\": customScalarField};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"opt\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##opt,
+ ),
+ \\"req\\": (a => a)(inp##req),
+ };
+ let makeVariables = (~opt=?, ~req, ()) =>
+ serializeVariables({\\"opt\\": opt, \\"req\\": req}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects customTypes.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Color = {
+ type t =
+ | Red
+ | Green
+ | Blue;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(\\"green\\") => Green
+ | Some(\\"blue\\") => Blue
+ | Some(\\"red\\")
+ | Some(_)
+ | None => Red
+ };
+ let serialize = color =>
+ (
+ switch (color) {
+ | Red => \\"red\\"
+ | Green => \\"green\\"
+ | Blue => \\"blue\\"
+ }
+ )
+ |> Js.Json.string;
+};
+module DateTime = {
+ type t = Js.Date.t;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(str) => str |> Js.Date.fromString
+ | None => Js.Date.make()
+ };
+ let serialize = date => date |> Js.Date.toISOString |> Js.Json.string;
+};
+module MyQuery = {
+ module Raw = {
+ type t_customFields = {
+ .
+ \\"currentTime\\": Js.Json.t,
+ \\"favoriteColor\\": Js.Json.t,
+ \\"futureTime\\": Js.Nullable.t(Js.Json.t),
+ \\"nullableColor\\": Js.Nullable.t(Js.Json.t),
+ };
+ type t = {. \\"customFields\\": t_customFields};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ncustomFields {\\\\ncurrentTime \\\\nfavoriteColor \\\\nfutureTime \\\\nnullableColor \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_customFields = {
+ .
+ \\"currentTime\\": DateTime.t,
+ \\"favoriteColor\\": Color.t,
+ \\"futureTime\\": option(DateTime.t),
+ \\"nullableColor\\": option(Color.t),
+ };
+ type t = {. \\"customFields\\": t_customFields};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let customFields = {
+ let value = value##customFields;
+ let nullableColor = {
+ let value = value##nullableColor;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(Color.parse(value))
+ | None => None
+ };
+ }
+ and futureTime = {
+ let value = value##futureTime;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(DateTime.parse(value))
+ | None => None
+ };
+ }
+ and favoriteColor = {
+ let value = value##favoriteColor;
+ Color.parse(value);
+ }
+ and currentTime = {
+ let value = value##currentTime;
+ DateTime.parse(value);
+ };
+ {
+ \\"currentTime\\": currentTime,
+ \\"favoriteColor\\": favoriteColor,
+ \\"futureTime\\": futureTime,
+ \\"nullableColor\\": nullableColor,
+ };
+ };
+ {\\"customFields\\": customFields};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let customFields = {
+ let value = value##customFields;
+ let nullableColor = {
+ let value = value##nullableColor;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(Color.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and futureTime = {
+ let value = value##futureTime;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(DateTime.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and favoriteColor = {
+ let value = value##favoriteColor;
+ Color.serialize(value);
+ }
+ and currentTime = {
+ let value = value##currentTime;
+ DateTime.serialize(value);
+ };
+ {
+ \\"currentTime\\": currentTime,
+ \\"favoriteColor\\": favoriteColor,
+ \\"futureTime\\": futureTime,
+ \\"nullableColor\\": nullableColor,
+ };
+ };
+ {\\"customFields\\": customFields};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects defaultObjectValueOnScalar.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"defaultObjectValueOnScalar\\": string};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndefaultObjectValueOnScalar(filter: {some: {json: \\\\\\"value\\\\\\"}}, arg: {field: \\\\\\"otherValue\\\\\\"}) \\\\n}\\\\n\\";
+ type t = {. \\"defaultObjectValueOnScalar\\": string};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let defaultObjectValueOnScalar = {
+ let value = value##defaultObjectValueOnScalar;
+ value;
+ };
+ {\\"defaultObjectValueOnScalar\\": defaultObjectValueOnScalar};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let defaultObjectValueOnScalar = {
+ let value = value##defaultObjectValueOnScalar;
+ value;
+ };
+ {\\"defaultObjectValueOnScalar\\": defaultObjectValueOnScalar};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects enumInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"enumInput\\": string};
+ type t_variables = {. \\"arg\\": string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: SampleField!) {\\\\nenumInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"enumInput\\": string};
+ type t_variables = {. \\"arg\\": [ | \`FIRST | \`SECOND | \`THIRD]};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let enumInput = {
+ let value = value##enumInput;
+ value;
+ };
+ {\\"enumInput\\": enumInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let enumInput = {
+ let value = value##enumInput;
+ value;
+ };
+ {\\"enumInput\\": enumInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\":
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ inp##arg,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_SampleField_47;
+ /**\`\`\`
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}
+\`\`\`*/
+ let _graphql_SampleField_47: _graphql_SampleField_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects explicit_object_record.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module RecordsQuery = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 RecordsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ObjectsQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ObjectsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects extensions.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ type t_variables;
+ };
+ type t;
+ type t_variables;
+
+ let query: string;
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+};
+
+module Parent = {
+ module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => ();
+ };
+};
+module Bla' = {
+ module Raw = {
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query Bla {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Bla = {
+ include Bla';
+ include Parent.ExtendQuery(Bla');
+};
+"
+`;
+
+exports[`Objects fragmentDefinition.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module GraphQL_PPX = {
+ let deepMerge = (json1, _) => json1;
+};
+module ListFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment ListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ };
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ };
+ };
+ let name = \\"ListFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Another = {
+ /**The GraphQL query string*/
+ let query = \\"fragment Another on Lists {\\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {. \\"nullableOfNonNullable\\": Js.Nullable.t(array(string))};
+ type nonrec t_Lists = t;
+ };
+ type t = {. \\"nullableOfNonNullable\\": option(array(string))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ };
+ {\\"nullableOfNonNullable\\": nullableOfNonNullable};
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableOfNonNullable\\": nullableOfNonNullable};
+ };
+ let name = \\"Another\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module FragmentWithArgs = {
+ /**The GraphQL query string*/
+ let query = \\"fragment FragmentWithArgs on Lists {\\\\nlistWithArg(arg1: $arg1) \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"listWithArg\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {. \\"listWithArg\\": option(array(option(string)))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listWithArg = {
+ let value = value##listWithArg;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {\\"listWithArg\\": listWithArg};
+ };
+ let verifyArgsAndParse = (~arg1 as _arg1: [ | \`String], value: Raw.t) =>
+ parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listWithArg = {
+ let value = value##listWithArg;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"listWithArg\\": listWithArg};
+ };
+ let name = \\"FragmentWithArgs\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+
+module InlineFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment InlineListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ };
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ };
+ };
+ let name = \\"InlineListFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery = {
+ module Raw = {
+ type t_l2;
+ type t_l3;
+ type t_l4;
+ type t = {
+ .
+ \\"l1\\": ListFragment.Raw.t,
+ \\"l2\\": t_l2,
+ \\"l3\\": t_l3,
+ \\"l4\\": t_l4,
+ \\"l5\\": FragmentWithArgs.Raw.t,
+ };
+ type t_variables = {. \\"arg1\\": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ \\"query MyQuery($arg1: String) {\\\\nl1: lists {\\\\n...\\"
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl2: lists {\\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl3: lists {\\\\nnullableOfNullable \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl4: lists {\\\\nnullableOfNullable \\\\n...\\"
+ )
+ ++ InlineFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl5: lists {\\\\n...\\"
+ )
+ ++ FragmentWithArgs.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ FragmentWithArgs.query
+ )
+ ++ InlineFragment.query
+ )
+ ++ ListFragment.query;
+ type t_l2 = {
+ .
+ \\"frag1\\": ListFragment.t_Lists,
+ \\"frag2\\": ListFragment.t_Lists,
+ };
+ type t_l3 = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"frag1\\": ListFragment.t_Lists,
+ \\"frag2\\": ListFragment.t_Lists,
+ };
+ type t_l4 = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"inlineFragment\\": InlineFragment.t_Lists,
+ };
+ type t = {
+ .
+ \\"l1\\": ListFragment.t,
+ \\"l2\\": t_l2,
+ \\"l3\\": t_l3,
+ \\"l4\\": t_l4,
+ \\"l5\\": FragmentWithArgs.t,
+ };
+ type t_variables = {. \\"arg1\\": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let l5 = {
+ let value = value##l5;
+ FragmentWithArgs.verifyArgsAndParse(~arg1=\`String, value);
+ }
+ and l4 = {
+ let value = value##l4;
+ let inlineFragment = {
+ let value: InlineFragment.Raw.t = Obj.magic(value);
+ InlineFragment.verifyArgsAndParse(value);
+ }
+ and nullableOfNullable = {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"nullableOfNullable\\"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"inlineFragment\\": inlineFragment,
+ };
+ }
+ and l3 = {
+ let value = value##l3;
+ let frag2 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and frag1 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and nullableOfNullable = {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"nullableOfNullable\\"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"frag1\\": frag1,
+ \\"frag2\\": frag2,
+ };
+ }
+ and l2 = {
+ let value = value##l2;
+ let frag2 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and frag1 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {\\"frag1\\": frag1, \\"frag2\\": frag2};
+ }
+ and l1 = {
+ let value = value##l1;
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {\\"l1\\": l1, \\"l2\\": l2, \\"l3\\": l3, \\"l4\\": l4, \\"l5\\": l5};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let l5 = {
+ let value = value##l5;
+ FragmentWithArgs.serialize(value);
+ }
+ and l4 = {
+ let value = value##l4;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableOfNullable\\": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(InlineFragment.serialize(value##inlineFragment)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l4
+ );
+ }
+ and l3 = {
+ let value = value##l3;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableOfNullable\\": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (Obj.magic(ListFragment.serialize(value##frag1)): Js.Json.t),
+ (Obj.magic(ListFragment.serialize(value##frag2)): Js.Json.t),
+ |],
+ ),
+ ): Raw.t_l3
+ );
+ }
+ and l2 = {
+ let value = value##l2;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(Js.Dict.empty): Js.Json.t,
+ [|
+ (Obj.magic(ListFragment.serialize(value##frag1)): Js.Json.t),
+ (Obj.magic(ListFragment.serialize(value##frag2)): Js.Json.t),
+ |],
+ ),
+ ): Raw.t_l2
+ );
+ }
+ and l1 = {
+ let value = value##l1;
+ ListFragment.serialize(value);
+ };
+ {\\"l1\\": l1, \\"l2\\": l2, \\"l3\\": l3, \\"l4\\": l4, \\"l5\\": l5};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg1\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##arg1,
+ ),
+ };
+ let makeVariables = (~arg1=?, ()) =>
+ serializeVariables({\\"arg1\\": arg1}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {. \\"lists\\": ListFragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ ((\\"query {\\\\nlists {\\\\n...\\" ++ ListFragment.name) ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\")
+ ++ ListFragment.query;
+ type t = {. \\"lists\\": ListFragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ ListFragment.serialize(value);
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects interface.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+"
+`;
+
+exports[`Objects lists.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects listsArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"listsInput\\": string};
+ type t_variables = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\\\\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \\\\n}\\\\n\\";
+ type t = {. \\"listsInput\\": string};
+ type t_variables = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {\\"listsInput\\": listsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {\\"listsInput\\": listsInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"nullableOfNullable\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableOfNullable,
+ ),
+ \\"nullableOfNonNullable\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ inp##nullableOfNonNullable,
+ ),
+ \\"nonNullableOfNullable\\":
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ inp##nonNullableOfNullable,
+ ),
+ \\"nonNullableOfNonNullable\\":
+ (a => Array.map(b => (a => a)(b), a))(
+ inp##nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects listsInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"listsInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: ListsInput!) {\\\\nlistsInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"listsInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {\\"listsInput\\": listsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {\\"listsInput\\": listsInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"arg\\": (a => serializeInputObjectListsInput(a))(inp##arg)}
+ and serializeInputObjectListsInput:
+ t_variables_ListsInput => Raw.t_variables_ListsInput =
+ inp => {
+ \\"nullableOfNullable\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableOfNullable,
+ ),
+ \\"nullableOfNonNullable\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ inp##nullableOfNonNullable,
+ ),
+ \\"nonNullableOfNullable\\":
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ inp##nonNullableOfNullable,
+ ),
+ \\"nonNullableOfNonNullable\\":
+ (a => Array.map(b => (a => a)(b), a))(
+ inp##nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectListsInput =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ )
+ : t_variables_ListsInput => {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_ListsInput_47;
+ /**\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}
+\`\`\`*/
+ let _graphql_ListsInput_47: _graphql_ListsInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects mutation.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationWithError_value = {. \\"stringField\\": string};
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ \\"field\\": t_mutationWithError_errors_field,
+ \\"message\\": string,
+ };
+ type t_mutationWithError = {
+ .
+ \\"value\\": Js.Nullable.t(t_mutationWithError_value),
+ \\"errors\\": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nvalue {\\\\nstringField \\\\n}\\\\n\\\\nerrors {\\\\nfield \\\\nmessage \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_value = {. \\"stringField\\": string};
+ type t_mutationWithError_errors_field = [
+ | \`FutureAddedValue(string)
+ | \`FIRST
+ | \`SECOND
+ | \`THIRD
+ ];
+ type t_mutationWithError_errors = {
+ .
+ \\"field\\": t_mutationWithError_errors_field,
+ \\"message\\": string,
+ };
+ type t_mutationWithError = {
+ .
+ \\"value\\": option(t_mutationWithError_value),
+ \\"errors\\": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let message = {
+ let value = value##message;
+ value;
+ }
+ and field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | other => \`FutureAddedValue(other)
+ };
+ };
+ {\\"field\\": field, \\"message\\": message};
+ ),
+ )
+ | None => None
+ };
+ }
+ and value = {
+ let value = value##value;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let stringField = {
+ let value = value##stringField;
+ value;
+ };
+ {\\"stringField\\": stringField};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"value\\": value, \\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let message = {
+ let value = value##message;
+ value;
+ }
+ and field = {
+ let value = value##field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ | \`FutureAddedValue(other) => other
+ };
+ };
+ {\\"field\\": field, \\"message\\": message};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and value = {
+ let value = value##value;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let stringField = {
+ let value = value##stringField;
+ value;
+ };
+ {\\"stringField\\": stringField};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"value\\": value, \\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects mutationWithArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\";
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"required\\": (a => a)(inp##required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({\\"required\\": required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects mutationWithArgsAndNoRecords.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\";
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"required\\": (a => a)(inp##required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({\\"required\\": required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects nested.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type record = {
+ f1: string,
+ f2: string,
+};
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {. \\"field\\": string};
+ type t_first_inner = {. \\"inner\\": Js.Nullable.t(t_first_inner_inner)};
+ type t_first = {. \\"inner\\": Js.Nullable.t(t_first_inner)};
+ type t_second_inner_inner = {
+ .
+ \\"f1\\": string,
+ \\"f2\\": string,
+ };
+ type t_second_inner = {. \\"inner\\": Js.Nullable.t(t_second_inner_inner)};
+ type t_second = {. \\"inner\\": Js.Nullable.t(t_second_inner)};
+ type t_let_inner_inner = {. \\"field\\": string};
+ type t_let_inner = {. \\"inner\\": Js.Nullable.t(t_let_inner_inner)};
+ type t_let = {. \\"inner\\": Js.Nullable.t(t_let_inner)};
+ type t = {
+ .
+ \\"first\\": t_first,
+ \\"second\\": t_second,
+ \\"let_\\": t_let,
+ };
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nfirst: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nsecond: nestedObject {\\\\ninner {\\\\ninner {\\\\nf1: field \\\\nf2: field \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nlet: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_first_inner_inner = {. \\"field\\": string};
+ type t_first_inner = {. \\"inner\\": option(t_first_inner_inner)};
+ type t_first = {. \\"inner\\": option(t_first_inner)};
+ type t_second_inner_inner = {
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {. \\"inner\\": option(t_second_inner_inner)};
+ type t_second = {. \\"inner\\": option(t_second_inner)};
+ type t_let_inner_inner = {. \\"field\\": string};
+ type t_let_inner = {. \\"inner\\": option(t_let_inner_inner)};
+ type t_let = {. \\"inner\\": option(t_let_inner)};
+ type t = {
+ .
+ \\"first\\": t_first,
+ \\"second\\": t_second,
+ \\"let_\\": t_let,
+ };
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let let_ = {
+ let value = value##let_;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {\\"field\\": field};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ }
+ and second = {
+ let value = value##second;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let f2 = {
+ let value = value##f2;
+ value;
+ }
+ and f1 = {
+ let value = value##f1;
+ value;
+ };
+ {f1, f2};
+ }: t_second_inner_inner,
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ }
+ and first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {\\"field\\": field};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"inner\\": inner};
+ };
+ {\\"first\\": first, \\"second\\": second, \\"let_\\": let_};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let let_ = {
+ let value = value##let_;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {\\"field\\": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ }
+ and second = {
+ let value = value##second;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let f2 = {
+ let value = (value: t_second_inner_inner).f2;
+ value;
+ }
+ and f1 = {
+ let value = (value: t_second_inner_inner).f1;
+ value;
+ };
+ {\\"f1\\": f1, \\"f2\\": f2};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ }
+ and first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {\\"field\\": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"inner\\": inner};
+ };
+ {\\"first\\": first, \\"second\\": second, \\"let_\\": let_};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects nonrecursiveInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"nonrecursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"field\\": Js.Nullable.t(string),
+ \\"enum\\": Js.Nullable.t(string),
+ \\"embeddedInput\\":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ \\"custom\\": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"nonrecursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": option(array(option(string))),
+ \\"field\\": option(string),
+ \\"enum\\": option([ | \`FIRST | \`SECOND | \`THIRD]),
+ \\"embeddedInput\\": option(array(option(t_variables_EmbeddedInput))),
+ \\"custom\\": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {\\"nonrecursiveInput\\": nonrecursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {\\"nonrecursiveInput\\": nonrecursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ \\"nonNullableField\\": (a => a)(inp##nonNullableField),
+ \\"nullableArray\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ \\"enum\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ \\"embeddedInput\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ \\"custom\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ \\"nonNullableField\\": nonNullableField,
+ \\"nullableArray\\": nullableArray,
+ \\"field\\": field,
+ \\"enum\\": enum,
+ \\"embeddedInput\\": embeddedInput,
+ \\"custom\\": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ \\"field\\": field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {
+ .
+ \\"scalarsInput\\": string,
+ \\"more\\": string,
+ };
+ type t_variables = {
+ .
+ \\"arg\\": t_variables_NonrecursiveInput,
+ \\"arg2\\": t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"field\\": Js.Nullable.t(string),
+ \\"enum\\": Js.Nullable.t(string),
+ \\"embeddedInput\\":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ \\"custom\\": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\\\\nscalarsInput(arg: $arg) \\\\nmore: scalarsInput(arg: $arg2) \\\\n}\\\\n\\";
+ type t = {
+ .
+ \\"scalarsInput\\": string,
+ \\"more\\": string,
+ };
+ type t_variables = {
+ .
+ \\"arg\\": t_variables_NonrecursiveInput,
+ \\"arg2\\": t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ .
+ \\"nonNullableField\\": string,
+ \\"nullableArray\\": option(array(option(string))),
+ \\"field\\": option(string),
+ \\"enum\\": option([ | \`FIRST | \`SECOND | \`THIRD]),
+ \\"embeddedInput\\": option(array(option(t_variables_EmbeddedInput))),
+ \\"custom\\": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. \\"field\\": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let more = {
+ let value = value##more;
+ value;
+ }
+ and scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput, \\"more\\": more};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let more = {
+ let value = value##more;
+ value;
+ }
+ and scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput, \\"more\\": more};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ \\"arg2\\": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg2),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ \\"nonNullableField\\": (a => a)(inp##nonNullableField),
+ \\"nullableArray\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ \\"enum\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ \\"embeddedInput\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ \\"custom\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ \\"field\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let makeVariables = (~arg, ~arg2, ()) =>
+ serializeVariables({\\"arg\\": arg, \\"arg2\\": arg2}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ \\"nonNullableField\\": nonNullableField,
+ \\"nullableArray\\": nullableArray,
+ \\"field\\": field,
+ \\"enum\\": enum,
+ \\"embeddedInput\\": embeddedInput,
+ \\"custom\\": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ \\"field\\": field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_169;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_169: _graphql_NonrecursiveInput_169 =
+ Obj.magic(0);
+ type nonrec _graphql_NonrecursiveInput_196;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_196: _graphql_NonrecursiveInput_196 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects omitFutureValueEnum.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [
+ | \`FutureAddedValue(string)
+ | \`FIRST
+ | \`SECOND
+ | \`THIRD
+ ];
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | other => \`FutureAddedValue(other)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ | \`FutureAddedValue(other) => other
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [ | \`FIRST | \`SECOND | \`THIRD];
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | _ => raise(Not_found)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [ | \`FIRST | \`SECOND | \`THIRD];
+ type t_mutationWithError_errors = {
+ .
+ \\"message\\": string,
+ \\"field\\": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ \\"errors\\": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. \\"mutationWithError\\": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | _ => raise(Not_found)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {\\"message\\": message, \\"field\\": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"errors\\": errors};
+ };
+ {\\"mutationWithError\\": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects omitFutureValueUnion.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects pokedexApolloMode.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ .
+ \\"id\\": string,
+ \\"name\\": Js.Nullable.t(string),
+ };
+ type t = {. \\"pokemon\\": Js.Nullable.t(t_pokemon)};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\npokemon(name: \\\\\\"Pikachu\\\\\\") {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_pokemon = {
+ .
+ \\"id\\": string,
+ \\"name\\": option(string),
+ };
+ type t = {. \\"pokemon\\": option(t_pokemon)};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let name = {
+ let value = value##name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {\\"id\\": id, \\"name\\": name};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"pokemon\\": pokemon};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = value##name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {\\"id\\": id, \\"name\\": name};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"pokemon\\": pokemon};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects pokedexScalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ .
+ \\"id\\": string,
+ \\"name\\": Js.Nullable.t(string),
+ };
+ type t = {. \\"pokemon\\": Js.Nullable.t(t_pokemon)};
+ type t_variables = {
+ .
+ \\"id\\": Js.Nullable.t(string),
+ \\"name\\": Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query pokemon($id: String, $name: String) {\\\\npokemon(name: $name, id: $id) {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_pokemon = {
+ .
+ \\"id\\": string,
+ \\"name\\": option(string),
+ };
+ type t = {. \\"pokemon\\": option(t_pokemon)};
+ type t_variables = {
+ .
+ \\"id\\": option(string),
+ \\"name\\": option(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let name = {
+ let value = value##name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {\\"id\\": id, \\"name\\": name};
+ },
+ )
+ | None => None
+ };
+ };
+ {\\"pokemon\\": pokemon};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = value##name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {\\"id\\": id, \\"name\\": name};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"pokemon\\": pokemon};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"id\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##id,
+ ),
+ \\"name\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##name,
+ ),
+ };
+ let makeVariables = (~id=?, ~name=?, ()) =>
+ serializeVariables({\\"id\\": id, \\"name\\": name}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects record.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type scalars = {
+ string,
+ int,
+};
+
+type dog = {
+ name: string,
+ barkVolume: float,
+};
+
+type oneFieldQuery = {nullableString: option(string)};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"string\\": string,
+ \\"int\\": int,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t = {. \\"variousScalars\\": scalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ (
+ {
+ let int = {
+ let value = value##int;
+ value;
+ }
+ and string = {
+ let value = value##string;
+ value;
+ };
+ {string, int};
+ }: scalars
+ );
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = (value: scalars).int;
+ value;
+ }
+ and string = {
+ let value = (value: scalars).string;
+ value;
+ };
+ {\\"string\\": string, \\"int\\": int};
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module OneFieldQuery = {
+ module Raw = {
+ type t_variousScalars = {. \\"nullableString\\": Js.Nullable.t(string)};
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {nullableString: option(string)};
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ (
+ {
+ let nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {nullableString: nullableString};
+ }: t_variousScalars
+ );
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableString\\": nullableString};
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 OneFieldQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ExternalFragmentQuery = {
+ module Fragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment Fragment on VariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"string\\": string,
+ \\"int\\": int,
+ };
+ type nonrec t_VariousScalars = t;
+ };
+ type t = {
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ let int = {
+ let value = value##int;
+ value;
+ }
+ and string = {
+ let value = value##string;
+ value;
+ };
+ {string, int};
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let int = {
+ let value = (value: t).int;
+ value;
+ }
+ and string = {
+ let value = (value: t).string;
+ value;
+ };
+ {\\"string\\": string, \\"int\\": int};
+ };
+ let name = \\"Fragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+VariousScalars {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t = {. \\"variousScalars\\": Fragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (\\"query {\\\\nvariousScalars {\\\\n...\\" ++ Fragment.name)
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ Fragment.query;
+ type t = {. \\"variousScalars\\": Fragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ Fragment.verifyArgsAndParse(value);
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ Fragment.serialize(value);
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+module InlineFragmentQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {name, barkVolume};
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 InlineFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module UnionExternalFragmentQuery = {
+ module DogFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment DogFragment on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type nonrec t_Dog = t;
+ };
+ type t = {
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {name, barkVolume};
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let barkVolume = {
+ let value = (value: t).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t).name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ };
+ let name = \\"DogFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Dog {
+ name: String!
+ barkVolume: Float!
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n...\\"
+ ++ DogFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ DogFragment.query;
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(DogFragment.t)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: DogFragment.Raw.t = Obj.magic(value);
+ DogFragment.verifyArgsAndParse(value);
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(DogFragment.serialize(value)): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+"
+`;
+
+exports[`Objects recursiveInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"recursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ .
+ \\"otherField\\": Js.Nullable.t(string),
+ \\"inner\\": Js.Nullable.t(t_variables_RecursiveInput),
+ \\"enum\\": Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: RecursiveInput!) {\\\\nrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"recursiveInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ .
+ \\"otherField\\": option(string),
+ \\"inner\\": option(t_variables_RecursiveInput),
+ \\"enum\\": option([ | \`FIRST | \`SECOND | \`THIRD]),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let recursiveInput = {
+ let value = value##recursiveInput;
+ value;
+ };
+ {\\"recursiveInput\\": recursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let recursiveInput = {
+ let value = value##recursiveInput;
+ value;
+ };
+ {\\"recursiveInput\\": recursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"arg\\": (a => serializeInputObjectRecursiveInput(a))(inp##arg)}
+ and serializeInputObjectRecursiveInput:
+ t_variables_RecursiveInput => Raw.t_variables_RecursiveInput =
+ inp => {
+ \\"otherField\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##otherField,
+ ),
+ \\"inner\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectRecursiveInput(a))(b),
+ )
+ }
+ )(
+ inp##inner,
+ ),
+ \\"enum\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectRecursiveInput =
+ (~otherField=?, ~inner=?, ~enum=?, ()): t_variables_RecursiveInput => {
+ \\"otherField\\": otherField,
+ \\"inner\\": inner,
+ \\"enum\\": enum,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_RecursiveInput_47;
+ /**\`\`\`
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}
+\`\`\`*/
+ let _graphql_RecursiveInput_47: _graphql_RecursiveInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects scalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects scalarsArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"scalarsInput\\": string};
+ type t_variables = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\\\\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \\\\n}\\\\n\\";
+ type t = {. \\"scalarsInput\\": string};
+ type t_variables = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"nullableString\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableString,
+ ),
+ \\"string\\": (a => a)(inp##string),
+ \\"nullableInt\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableInt,
+ ),
+ \\"int\\": (a => a)(inp##int),
+ \\"nullableFloat\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableFloat,
+ ),
+ \\"float\\": (a => a)(inp##float),
+ \\"nullableBoolean\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableBoolean,
+ ),
+ \\"boolean\\": (a => a)(inp##boolean),
+ \\"nullableID\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableID,
+ ),
+ \\"id\\": (a => a)(inp##id),
+ };
+ let makeVariables =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects scalarsInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"scalarsInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: VariousScalarsInput!) {\\\\nscalarsInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {. \\"scalarsInput\\": string};
+ type t_variables = {. \\"arg\\": t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {\\"scalarsInput\\": scalarsInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ \\"arg\\": (a => serializeInputObjectVariousScalarsInput(a))(inp##arg),
+ }
+ and serializeInputObjectVariousScalarsInput:
+ t_variables_VariousScalarsInput => Raw.t_variables_VariousScalarsInput =
+ inp => {
+ \\"nullableString\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableString,
+ ),
+ \\"string\\": (a => a)(inp##string),
+ \\"nullableInt\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableInt,
+ ),
+ \\"int\\": (a => a)(inp##int),
+ \\"nullableFloat\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableFloat,
+ ),
+ \\"float\\": (a => a)(inp##float),
+ \\"nullableBoolean\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableBoolean,
+ ),
+ \\"boolean\\": (a => a)(inp##boolean),
+ \\"nullableID\\":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableID,
+ ),
+ \\"id\\": (a => a)(inp##id),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({\\"arg\\": arg}: t_variables)
+ and makeInputObjectVariousScalarsInput =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ )
+ : t_variables_VariousScalarsInput => {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_VariousScalarsInput_47;
+ /**\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+\`\`\`*/
+ let _graphql_VariousScalarsInput_47: _graphql_VariousScalarsInput_47 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects skipDirectives.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_v1 = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": Js.Nullable.t(string),
+ };
+ type t_v2 = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": Js.Nullable.t(string),
+ };
+ type t = {
+ .
+ \\"v1\\": t_v1,
+ \\"v2\\": t_v2,
+ };
+ type t_variables = {. \\"var\\": bool};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($var: Boolean!) {\\\\nv1: variousScalars {\\\\nnullableString @skip(if: $var) \\\\nstring @skip(if: $var) \\\\n}\\\\n\\\\nv2: variousScalars {\\\\nnullableString @include(if: $var) \\\\nstring @include(if: $var) \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_v1 = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": option(string),
+ };
+ type t_v2 = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": option(string),
+ };
+ type t = {
+ .
+ \\"v1\\": t_v1,
+ \\"v2\\": t_v2,
+ };
+ type t_variables = {. \\"var\\": bool};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let v2 = {
+ let value = value##v2;
+ let string = {
+ let value = value##string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {\\"nullableString\\": nullableString, \\"string\\": string};
+ }
+ and v1 = {
+ let value = value##v1;
+ let string = {
+ let value = value##string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {\\"nullableString\\": nullableString, \\"string\\": string};
+ };
+ {\\"v1\\": v1, \\"v2\\": v2};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let v2 = {
+ let value = value##v2;
+ let string = {
+ let value = value##string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableString\\": nullableString, \\"string\\": string};
+ }
+ and v1 = {
+ let value = value##v1;
+ let string = {
+ let value = value##string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableString\\": nullableString, \\"string\\": string};
+ };
+ {\\"v1\\": v1, \\"v2\\": v2};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"var\\": (a => a)(inp##var)};
+ let makeVariables = (~var, ()) =>
+ serializeVariables({\\"var\\": var}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects subscription.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_simpleSubscription_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_simpleSubscription_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_simpleSubscription;
+ type t = {. \\"simpleSubscription\\": t_simpleSubscription};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"subscription {\\\\nsimpleSubscription {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_simpleSubscription_Dog = {. \\"name\\": string};
+ type t_simpleSubscription_Human = {. \\"name\\": string};
+ type t_simpleSubscription = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_simpleSubscription_Dog)
+ | \`Human(t_simpleSubscription_Human)
+ ];
+ type t = {. \\"simpleSubscription\\": t_simpleSubscription};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let simpleSubscription = {
+ let value = value##simpleSubscription;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_simpleSubscription_Dog = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_simpleSubscription_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_simpleSubscription
+ );
+ };
+ {\\"simpleSubscription\\": simpleSubscription};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let simpleSubscription = {
+ let value = value##simpleSubscription;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name};
+ },
+ ): Raw.t_simpleSubscription
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_simpleSubscription
+ )
+ | \`FutureAddedValue(value) => (
+ Obj.magic(value): Raw.t_simpleSubscription
+ )
+ };
+ };
+ {\\"simpleSubscription\\": simpleSubscription};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects tagged_template.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let { graphql } = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery3 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let { graphql } = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery3 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery4 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": Js.Nullable.t(string),
+ \\"string\\": string,
+ \\"nullableInt\\": Js.Nullable.t(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": Js.Nullable.t(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": Js.Nullable.t(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": Js.Nullable.t(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let graphql = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ .
+ \\"nullableString\\": option(string),
+ \\"string\\": string,
+ \\"nullableInt\\": option(int),
+ \\"int\\": int,
+ \\"nullableFloat\\": option(float),
+ \\"float\\": float,
+ \\"nullableBoolean\\": option(bool),
+ \\"boolean\\": bool,
+ \\"nullableID\\": option(string),
+ \\"id\\": string,
+ };
+ type t = {. \\"variousScalars\\": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableString\\": nullableString,
+ \\"string\\": string,
+ \\"nullableInt\\": nullableInt,
+ \\"int\\": int,
+ \\"nullableFloat\\": nullableFloat,
+ \\"float\\": float,
+ \\"nullableBoolean\\": nullableBoolean,
+ \\"boolean\\": boolean,
+ \\"nullableID\\": nullableID,
+ \\"id\\": id,
+ };
+ };
+ {\\"variousScalars\\": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery4 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects typename.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ .
+ \\"__typename\\": string,
+ \\"field\\": string,
+ };
+ type t_first_inner = {
+ .
+ \\"__typename\\": string,
+ \\"inner\\": Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ .
+ \\"__typename\\": string,
+ \\"inner\\": Js.Nullable.t(t_first_inner),
+ };
+ type t = {. \\"first\\": t_first};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nfirst: nestedObject {\\\\n__typename \\\\ninner {\\\\n__typename \\\\ninner {\\\\n__typename \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_first_inner_inner = {
+ .
+ \\"__typename\\": string,
+ \\"field\\": string,
+ };
+ type t_first_inner = {
+ .
+ \\"__typename\\": string,
+ \\"inner\\": option(t_first_inner_inner),
+ };
+ type t_first = {
+ .
+ \\"__typename\\": string,
+ \\"inner\\": option(t_first_inner),
+ };
+ type t = {. \\"first\\": t_first};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"field\\": field};
+ },
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"inner\\": inner};
+ },
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"inner\\": inner};
+ };
+ {\\"first\\": first};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"field\\": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"inner\\": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {\\"__typename\\": __typename, \\"inner\\": inner};
+ };
+ {\\"first\\": first};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects union.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQueryNoError = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman_Human = {. \\"name\\": string};
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Human\\", \\"name\\": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQueryNoError {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects unionPartial.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman;
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {. \\"dogOrHuman\\": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"__typename\\": \\"Dog\\", \\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {\\"dogOrHuman\\": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Objects variant.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationForVariant_dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_mutationForVariant_human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ .
+ \\"__typename\\": string,
+ \\"name\\": string,
+ };
+ type t_mutationForVariant_dogOrHuman;
+ type t_mutationForVariant;
+ type t = {. \\"mutationForVariant\\": t_mutationForVariant};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationForVariant {\\\\nbaseType \\\\nbaseTypeList \\\\ndog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\nhuman {\\\\nname \\\\n}\\\\n\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationForVariant_dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_mutationForVariant_human = {. \\"name\\": string};
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ .
+ \\"name\\": string,
+ \\"barkVolume\\": float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {. \\"name\\": string};
+ type t_mutationForVariant_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_mutationForVariant_dogOrHuman_Dog)
+ | \`Human(t_mutationForVariant_dogOrHuman_Human)
+ ];
+ type t_mutationForVariant = [
+ | \`BaseType(string)
+ | \`BaseTypeList(array(string))
+ | \`Dog(t_mutationForVariant_dog)
+ | \`Human(t_mutationForVariant_human)
+ | \`DogOrHuman(t_mutationForVariant_dogOrHuman)
+ ];
+ type t = {. \\"mutationForVariant\\": t_mutationForVariant};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationForVariant = {
+ let value = value##mutationForVariant;
+ switch (Js.Json.decodeObject(Obj.magic(value): Js.Json.t)) {
+ | None =>
+ Js.Exn.raiseError(
+ \\"graphql-ppx: \\"
+ ++ \\"Expected type \\"
+ ++ \\"VariantTestResult\\"
+ ++ \\" to be an object\\",
+ )
+ | Some(value) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"baseType\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`BaseType(value);
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"baseTypeList\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`BaseTypeList(value |> Js.Array.map(value => value));
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"dog\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`Dog(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"human\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`Human(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"dogOrHuman\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`DogOrHuman(
+ {
+ let typename: string =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"),
+ );
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Dog =
+ Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name, \\"barkVolume\\": barkVolume};
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Human =
+ Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {\\"name\\": name};
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_mutationForVariant_dogOrHuman
+ );
+ },
+ );
+ | Some(_) =>
+ Js.Exn.raiseError(
+ \\"graphql-ppx: \\"
+ ++ \\"All fields on variant selection set on type \\"
+ ++ \\"VariantTestResult\\"
+ ++ \\" were null\\",
+ )
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ {\\"mutationForVariant\\": mutationForVariant};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationForVariant = {
+ let value = value##mutationForVariant;
+ Obj.magic(Js.Json.null);
+ };
+ {\\"mutationForVariant\\": mutationForVariant};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records argNamedQuery.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {argNamedQuery: int};
+ type t_variables = {query: int};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($query: Int!) {\\\\nargNamedQuery(query: $query) \\\\n}\\\\n\\";
+ type t = {argNamedQuery: int};
+ type t_variables = {query: int};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ argNamedQuery: {
+ let value = (value: Raw.t).argNamedQuery;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let argNamedQuery = {
+ let value = (value: t).argNamedQuery;
+ value;
+ };
+ {argNamedQuery: argNamedQuery};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {query: (a => a)((inp: t_variables).query)};
+ let makeVariables = (~query, ()) =>
+ serializeVariables({query: query}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_query_82;
+ /**Variable **$query** has the following graphql type:
+
+\`\`\`
+Int!
+\`\`\`*/
+ let _graphql_query_82: _graphql_query_82 = Obj.magic(0);
+ type nonrec _graphql_query_75;
+ /**Argument **query** on field **argNamedQuery** has the following graphql type:
+
+\`\`\`
+Int!
+\`\`\`*/
+ let _graphql_query_75: _graphql_query_75 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records comment.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | \`FIRST | \`SECOND | \`THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nonrecursiveInput: {
+ let value = (value: Raw.t).nonrecursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nonrecursiveInput = {
+ let value = (value: t).nonrecursiveInput;
+ value;
+ };
+ {nonrecursiveInput: nonrecursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_100;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_100: _graphql_arg_100 = Obj.magic(0);
+ type nonrec _graphql_arg_95;
+ /**Argument **arg** on field **nonrecursiveInput** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_95: _graphql_arg_95 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records customDecoder.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module StringOfInt = {
+ let parse = string_of_int;
+ let serialize = int_of_string;
+ type t = string;
+};
+module IntOfString = {
+ let parse = int_of_string;
+ let serialize = string_of_int;
+ type t = int;
+};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ string,
+ int,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ string: IntOfString.t,
+ int: StringOfInt.t,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ IntOfString.parse(value);
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ StringOfInt.parse(value);
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let int = {
+ let value = (value: t_variousScalars).int;
+ StringOfInt.serialize(value);
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ IntOfString.serialize(value);
+ };
+ {string, int};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records customScalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_customScalarField = {
+ nullable: Js.Nullable.t(Js.Json.t),
+ nonNullable: Js.Json.t,
+ };
+ type t = {customScalarField: t_customScalarField};
+ type t_variables = {
+ opt: Js.Nullable.t(Js.Json.t),
+ req: Js.Json.t,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($opt: CustomScalar, $req: CustomScalar!) {\\\\ncustomScalarField(argOptional: $opt, argRequired: $req) {\\\\nnullable \\\\nnonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_customScalarField = {
+ nullable: option(Js.Json.t),
+ nonNullable: Js.Json.t,
+ };
+ type t = {customScalarField: t_customScalarField};
+ type t_variables = {
+ opt: option(Js.Json.t),
+ req: Js.Json.t,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ customScalarField: {
+ let value = (value: Raw.t).customScalarField;
+ (
+ {
+ nullable: {
+ let value = (value: Raw.t_customScalarField).nullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ nonNullable: {
+ let value = (value: Raw.t_customScalarField).nonNullable;
+ value;
+ },
+ }: t_customScalarField
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let customScalarField = {
+ let value = (value: t).customScalarField;
+ (
+ {
+ let nonNullable = {
+ let value = (value: t_customScalarField).nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = (value: t_customScalarField).nullable;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {nullable, nonNullable};
+ }: Raw.t_customScalarField
+ );
+ };
+ {customScalarField: customScalarField};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ opt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).opt,
+ ),
+ req: (a => a)((inp: t_variables).req),
+ };
+ let makeVariables = (~opt=?, ~req, ()) =>
+ serializeVariables({opt, req}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_opt_119;
+ /**Variable **$opt** has the following graphql type:
+
+\`\`\`
+CustomScalar
+\`\`\`*/
+ let _graphql_opt_119: _graphql_opt_119 = Obj.magic(0);
+ type nonrec _graphql_argOptional_106;
+ /**Argument **argOptional** on field **customScalarField** has the following graphql type:
+
+\`\`\`
+CustomScalar
+\`\`\`*/
+ let _graphql_argOptional_106: _graphql_argOptional_106 = Obj.magic(0);
+ type nonrec _graphql_req_138;
+ /**Variable **$req** has the following graphql type:
+
+\`\`\`
+CustomScalar!
+\`\`\`*/
+ let _graphql_req_138: _graphql_req_138 = Obj.magic(0);
+ type nonrec _graphql_argRequired_125;
+ /**Argument **argRequired** on field **customScalarField** has the following graphql type:
+
+\`\`\`
+CustomScalar!
+\`\`\`*/
+ let _graphql_argRequired_125: _graphql_argRequired_125 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records customTypes.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Color = {
+ type t =
+ | Red
+ | Green
+ | Blue;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(\\"green\\") => Green
+ | Some(\\"blue\\") => Blue
+ | Some(\\"red\\")
+ | Some(_)
+ | None => Red
+ };
+ let serialize = color =>
+ (
+ switch (color) {
+ | Red => \\"red\\"
+ | Green => \\"green\\"
+ | Blue => \\"blue\\"
+ }
+ )
+ |> Js.Json.string;
+};
+module DateTime = {
+ type t = Js.Date.t;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(str) => str |> Js.Date.fromString
+ | None => Js.Date.make()
+ };
+ let serialize = date => date |> Js.Date.toISOString |> Js.Json.string;
+};
+module MyQuery = {
+ module Raw = {
+ type t_customFields = {
+ currentTime: Js.Json.t,
+ favoriteColor: Js.Json.t,
+ futureTime: Js.Nullable.t(Js.Json.t),
+ nullableColor: Js.Nullable.t(Js.Json.t),
+ };
+ type t = {customFields: t_customFields};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ncustomFields {\\\\ncurrentTime \\\\nfavoriteColor \\\\nfutureTime \\\\nnullableColor \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_customFields = {
+ currentTime: DateTime.t,
+ favoriteColor: Color.t,
+ futureTime: option(DateTime.t),
+ nullableColor: option(Color.t),
+ };
+ type t = {customFields: t_customFields};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ customFields: {
+ let value = (value: Raw.t).customFields;
+ (
+ {
+ currentTime: {
+ let value = (value: Raw.t_customFields).currentTime;
+ DateTime.parse(value);
+ },
+ favoriteColor: {
+ let value = (value: Raw.t_customFields).favoriteColor;
+ Color.parse(value);
+ },
+ futureTime: {
+ let value = (value: Raw.t_customFields).futureTime;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(DateTime.parse(value))
+ | None => None
+ };
+ },
+ nullableColor: {
+ let value = (value: Raw.t_customFields).nullableColor;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(Color.parse(value))
+ | None => None
+ };
+ },
+ }: t_customFields
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let customFields = {
+ let value = (value: t).customFields;
+ (
+ {
+ let nullableColor = {
+ let value = (value: t_customFields).nullableColor;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(Color.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and futureTime = {
+ let value = (value: t_customFields).futureTime;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(DateTime.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and favoriteColor = {
+ let value = (value: t_customFields).favoriteColor;
+ Color.serialize(value);
+ }
+ and currentTime = {
+ let value = (value: t_customFields).currentTime;
+ DateTime.serialize(value);
+ };
+ {currentTime, favoriteColor, futureTime, nullableColor};
+ }: Raw.t_customFields
+ );
+ };
+ {customFields: customFields};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records defaultObjectValueOnScalar.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {defaultObjectValueOnScalar: string};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndefaultObjectValueOnScalar(filter: {some: {json: \\\\\\"value\\\\\\"}}, arg: {field: \\\\\\"otherValue\\\\\\"}) \\\\n}\\\\n\\";
+ type t = {defaultObjectValueOnScalar: string};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ defaultObjectValueOnScalar: {
+ let value = (value: Raw.t).defaultObjectValueOnScalar;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let defaultObjectValueOnScalar = {
+ let value = (value: t).defaultObjectValueOnScalar;
+ value;
+ };
+ {defaultObjectValueOnScalar: defaultObjectValueOnScalar};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_filter_92;
+ /**Argument **filter** on field **defaultObjectValueOnScalar** has the following graphql type:
+
+\`\`\`
+JsonScalar!
+\`\`\`*/
+ let _graphql_filter_92: _graphql_filter_92 = Obj.magic(0);
+ type nonrec _graphql_arg_140;
+ /**Argument **arg** on field **defaultObjectValueOnScalar** has the following graphql type:
+
+\`\`\`
+EmbeddedInput {
+ field: String
+}!
+\`\`\`*/
+ let _graphql_arg_140: _graphql_arg_140 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records enumInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {enumInput: string};
+ type t_variables = {arg: string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: SampleField!) {\\\\nenumInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {enumInput: string};
+ type t_variables = {arg: [ | \`FIRST | \`SECOND | \`THIRD]};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ enumInput: {
+ let value = (value: Raw.t).enumInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let enumInput = {
+ let value = (value: t).enumInput;
+ value;
+ };
+ {enumInput: enumInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ (inp: t_variables).arg,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_82;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}!
+\`\`\`*/
+ let _graphql_arg_82: _graphql_arg_82 = Obj.magic(0);
+ type nonrec _graphql_arg_77;
+ /**Argument **arg** on field **enumInput** has the following graphql type:
+
+\`\`\`
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}!
+\`\`\`*/
+ let _graphql_arg_77: _graphql_arg_77 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_SampleField_47;
+ /**\`\`\`
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}
+\`\`\`*/
+ let _graphql_SampleField_47: _graphql_SampleField_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records explicit_object_record.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module RecordsQuery = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 RecordsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ObjectsQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": Js.Nullable.t(array(Js.Nullable.t(string))),
+ \\"nullableOfNonNullable\\": Js.Nullable.t(array(string)),
+ \\"nonNullableOfNullable\\": array(Js.Nullable.t(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ .
+ \\"nullableOfNullable\\": option(array(option(string))),
+ \\"nullableOfNonNullable\\": option(array(string)),
+ \\"nonNullableOfNullable\\": array(option(string)),
+ \\"nonNullableOfNonNullable\\": array(string),
+ };
+ type t = {. \\"lists\\": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ \\"nullableOfNullable\\": nullableOfNullable,
+ \\"nullableOfNonNullable\\": nullableOfNonNullable,
+ \\"nonNullableOfNullable\\": nonNullableOfNullable,
+ \\"nonNullableOfNonNullable\\": nonNullableOfNonNullable,
+ };
+ };
+ {\\"lists\\": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ObjectsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records extensions.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ type t_variables;
+ };
+ type t;
+ type t_variables;
+
+ let query: string;
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+};
+
+module Parent = {
+ module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => ();
+ };
+};
+module Bla' = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query Bla {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Bla = {
+ include Bla';
+ include Parent.ExtendQuery(Bla');
+};
+"
+`;
+
+exports[`Records fragmentDefinition.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module GraphQL_PPX = {
+ let deepMerge = (json1, _) => json1;
+};
+module ListFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment ListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableOfNullable, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = \\"ListFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Another = {
+ /**The GraphQL query string*/
+ let query = \\"fragment Another on Lists {\\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {nullableOfNonNullable: Js.Nullable.t(array(string))};
+ type nonrec t_Lists = t;
+ };
+ type t = {nullableOfNonNullable: option(array(string))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableOfNonNullable: nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = \\"Another\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module FragmentWithArgs = {
+ /**The GraphQL query string*/
+ let query = \\"fragment FragmentWithArgs on Lists {\\\\nlistWithArg(arg1: $arg1) \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {listWithArg: Js.Nullable.t(array(Js.Nullable.t(string)))};
+ type nonrec t_Lists = t;
+ };
+ type t = {listWithArg: option(array(option(string)))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listWithArg: {
+ let value = (value: Raw.t).listWithArg;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (~arg1 as _arg1: [ | \`String], value: Raw.t) =>
+ parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listWithArg = {
+ let value = (value: t).listWithArg;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {listWithArg: listWithArg};
+ }: Raw.t
+ );
+ let name = \\"FragmentWithArgs\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+
+module InlineFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment InlineListFragment on Lists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableOfNullable, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = \\"InlineListFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery = {
+ module Raw = {
+ type t_l2;
+ type t_l3;
+ type t_l4;
+ type t = {
+ l1: ListFragment.Raw.t,
+ l2: t_l2,
+ l3: t_l3,
+ l4: t_l4,
+ l5: FragmentWithArgs.Raw.t,
+ };
+ type t_variables = {arg1: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ \\"query MyQuery($arg1: String) {\\\\nl1: lists {\\\\n...\\"
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl2: lists {\\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl3: lists {\\\\nnullableOfNullable \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n...\\"
+ )
+ ++ ListFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl4: lists {\\\\nnullableOfNullable \\\\n...\\"
+ )
+ ++ InlineFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\nl5: lists {\\\\n...\\"
+ )
+ ++ FragmentWithArgs.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ FragmentWithArgs.query
+ )
+ ++ InlineFragment.query
+ )
+ ++ ListFragment.query;
+ type t_l2 = {
+ frag1: ListFragment.t_Lists,
+ frag2: ListFragment.t_Lists,
+ };
+ type t_l3 = {
+ nullableOfNullable: option(array(option(string))),
+ frag1: ListFragment.t_Lists,
+ frag2: ListFragment.t_Lists,
+ };
+ type t_l4 = {
+ nullableOfNullable: option(array(option(string))),
+ inlineFragment: InlineFragment.t_Lists,
+ };
+ type t = {
+ l1: ListFragment.t,
+ l2: t_l2,
+ l3: t_l3,
+ l4: t_l4,
+ l5: FragmentWithArgs.t,
+ };
+ type t_variables = {arg1: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ l1: {
+ let value = (value: Raw.t).l1;
+ ListFragment.verifyArgsAndParse(value);
+ },
+ l2: {
+ let value = (value: Raw.t).l2;
+ (
+ {
+ frag1: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ frag2: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t_l2
+ );
+ },
+ l3: {
+ let value = (value: Raw.t).l3;
+ (
+ {
+ nullableOfNullable: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"nullableOfNullable\\"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ frag1: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ frag2: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t_l3
+ );
+ },
+ l4: {
+ let value = (value: Raw.t).l4;
+ (
+ {
+ nullableOfNullable: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), \\"nullableOfNullable\\"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ inlineFragment: {
+ let value: InlineFragment.Raw.t = Obj.magic(value);
+ InlineFragment.verifyArgsAndParse(value);
+ },
+ }: t_l4
+ );
+ },
+ l5: {
+ let value = (value: Raw.t).l5;
+ FragmentWithArgs.verifyArgsAndParse(~arg1=\`String, value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let l5 = {
+ let value = (value: t).l5;
+ FragmentWithArgs.serialize(value);
+ }
+ and l4 = {
+ let value = (value: t).l4;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = (value: t_l4).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableOfNullable\\": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(
+ InlineFragment.serialize((value: t_l4).inlineFragment),
+ ): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l4
+ );
+ }
+ and l3 = {
+ let value = (value: t).l3;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = (value: t_l3).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {\\"nullableOfNullable\\": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(ListFragment.serialize((value: t_l3).frag1)): Js.Json.t
+ ),
+ (
+ Obj.magic(ListFragment.serialize((value: t_l3).frag2)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l3
+ );
+ }
+ and l2 = {
+ let value = (value: t).l2;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(Js.Dict.empty): Js.Json.t,
+ [|
+ (
+ Obj.magic(ListFragment.serialize((value: t_l2).frag1)): Js.Json.t
+ ),
+ (
+ Obj.magic(ListFragment.serialize((value: t_l2).frag2)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l2
+ );
+ }
+ and l1 = {
+ let value = (value: t).l1;
+ ListFragment.serialize(value);
+ };
+ {l1, l2, l3, l4, l5};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg1:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).arg1,
+ ),
+ };
+ let makeVariables = (~arg1=?, ()) =>
+ serializeVariables({arg1: arg1}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {lists: ListFragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ ((\\"query {\\\\nlists {\\\\n...\\" ++ ListFragment.name) ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\")
+ ++ ListFragment.query;
+ type t = {lists: ListFragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ ListFragment.serialize(value);
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records interface.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+"
+`;
+
+exports[`Records lists.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nlists {\\\\nnullableOfNullable \\\\nnullableOfNonNullable \\\\nnonNullableOfNullable \\\\nnonNullableOfNonNullable \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records listsArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {listsInput: string};
+ type t_variables = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\\\\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \\\\n}\\\\n\\";
+ type t = {listsInput: string};
+ type t_variables = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listsInput: {
+ let value = (value: Raw.t).listsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listsInput = {
+ let value = (value: t).listsInput;
+ value;
+ };
+ {listsInput: listsInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ nullableOfNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables).nullableOfNullable,
+ ),
+ nullableOfNonNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ (inp: t_variables).nullableOfNonNullable,
+ ),
+ nonNullableOfNullable:
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ (inp: t_variables).nonNullableOfNullable,
+ ),
+ nonNullableOfNonNullable:
+ (a => Array.map(b => (a => a)(b), a))(
+ (inp: t_variables).nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_219;
+ /**Argument **arg** on field **listsInput** has the following graphql type:
+
+\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+\`\`\`*/
+ let _graphql_arg_219: _graphql_arg_219 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records listsInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {listsInput: string};
+ type t_variables = {arg: t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: ListsInput!) {\\\\nlistsInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {listsInput: string};
+ type t_variables = {arg: t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listsInput: {
+ let value = (value: Raw.t).listsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listsInput = {
+ let value = (value: t).listsInput;
+ value;
+ };
+ {listsInput: listsInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg: (a => serializeInputObjectListsInput(a))((inp: t_variables).arg),
+ }
+ and serializeInputObjectListsInput:
+ t_variables_ListsInput => Raw.t_variables_ListsInput =
+ inp => {
+ nullableOfNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_ListsInput).nullableOfNullable,
+ ),
+ nullableOfNonNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ (inp: t_variables_ListsInput).nullableOfNonNullable,
+ ),
+ nonNullableOfNullable:
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ (inp: t_variables_ListsInput).nonNullableOfNullable,
+ ),
+ nonNullableOfNonNullable:
+ (a => Array.map(b => (a => a)(b), a))(
+ (inp: t_variables_ListsInput).nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectListsInput =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ )
+ : t_variables_ListsInput => {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_82;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+\`\`\`*/
+ let _graphql_arg_82: _graphql_arg_82 = Obj.magic(0);
+ type nonrec _graphql_arg_77;
+ /**Argument **arg** on field **listsInput** has the following graphql type:
+
+\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+\`\`\`*/
+ let _graphql_arg_77: _graphql_arg_77 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_ListsInput_47;
+ /**\`\`\`
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}
+\`\`\`*/
+ let _graphql_ListsInput_47: _graphql_ListsInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records mutation.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationWithError_value = {stringField: string};
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ field: t_mutationWithError_errors_field,
+ message: string,
+ };
+ type t_mutationWithError = {
+ value: Js.Nullable.t(t_mutationWithError_value),
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nvalue {\\\\nstringField \\\\n}\\\\n\\\\nerrors {\\\\nfield \\\\nmessage \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_value = {stringField: string};
+ type t_mutationWithError_errors_field = [
+ | \`FutureAddedValue(string)
+ | \`FIRST
+ | \`SECOND
+ | \`THIRD
+ ];
+ type t_mutationWithError_errors = {
+ field: t_mutationWithError_errors_field,
+ message: string,
+ };
+ type t_mutationWithError = {
+ value: option(t_mutationWithError_value),
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ value: {
+ let value = (value: Raw.t_mutationWithError).value;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ stringField: {
+ let value =
+ (value: Raw.t_mutationWithError_value).stringField;
+ value;
+ },
+ }: t_mutationWithError_value,
+ )
+ | None => None
+ };
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | other => \`FutureAddedValue(other)
+ };
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ | \`FutureAddedValue(other) => other
+ };
+ };
+ {field, message};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and value = {
+ let value = (value: t_mutationWithError).value;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let stringField = {
+ let value =
+ (value: t_mutationWithError_value).stringField;
+ value;
+ };
+ {stringField: stringField};
+ }: Raw.t_mutationWithError_value,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {value, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records mutationWithArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {optionalInputArgs: string};
+ type t_variables = {required: string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\";
+ type t = {optionalInputArgs: string};
+ type t_variables = {required: string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ optionalInputArgs: {
+ let value = (value: Raw.t).optionalInputArgs;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let optionalInputArgs = {
+ let value = (value: t).optionalInputArgs;
+ value;
+ };
+ {optionalInputArgs: optionalInputArgs};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {required: (a => a)((inp: t_variables).required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({required: required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records mutationWithArgsAndNoRecords.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation MyMutation($required: String!) {\\\\noptionalInputArgs(required: $required, anotherRequired: \\\\\\"val\\\\\\") \\\\n}\\\\n\\";
+ type t = {. \\"optionalInputArgs\\": string};
+ type t_variables = {. \\"required\\": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {\\"optionalInputArgs\\": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {\\"required\\": (a => a)(inp##required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({\\"required\\": required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records nested.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type record = {
+ f1: string,
+ f2: string,
+};
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {field: string};
+ type t_first_inner = {inner: Js.Nullable.t(t_first_inner_inner)};
+ type t_first = {inner: Js.Nullable.t(t_first_inner)};
+ type t_second_inner_inner = {
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {inner: Js.Nullable.t(t_second_inner_inner)};
+ type t_second = {inner: Js.Nullable.t(t_second_inner)};
+ type t_let_inner_inner = {field: string};
+ type t_let_inner = {inner: Js.Nullable.t(t_let_inner_inner)};
+ type t_let = {inner: Js.Nullable.t(t_let_inner)};
+ type t = {
+ first: t_first,
+ second: t_second,
+ let_: t_let,
+ };
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nfirst: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nsecond: nestedObject {\\\\ninner {\\\\ninner {\\\\nf1: field \\\\nf2: field \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\nlet: nestedObject {\\\\ninner {\\\\ninner {\\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_first_inner_inner = {field: string};
+ type t_first_inner = {inner: option(t_first_inner_inner)};
+ type t_first = {inner: option(t_first_inner)};
+ type t_second_inner_inner = {
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {inner: option(t_second_inner_inner)};
+ type t_second = {inner: option(t_second_inner)};
+ type t_let_inner_inner = {field: string};
+ type t_let_inner = {inner: option(t_let_inner_inner)};
+ type t_let = {inner: option(t_let_inner)};
+ type t = {
+ first: t_first,
+ second: t_second,
+ let_: t_let,
+ };
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ first: {
+ let value = (value: Raw.t).first;
+ (
+ {
+ inner: {
+ let value = (value: Raw.t_first).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ inner: {
+ let value = (value: Raw.t_first_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ field: {
+ let value =
+ (value: Raw.t_first_inner_inner).field;
+ value;
+ },
+ }: t_first_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first
+ );
+ },
+ second: {
+ let value = (value: Raw.t).second;
+ (
+ {
+ inner: {
+ let value = (value: Raw.t_second).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ inner: {
+ let value = (value: Raw.t_second_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ f1: {
+ let value = (value: Raw.t_second_inner_inner).f1;
+ value;
+ },
+ f2: {
+ let value = (value: Raw.t_second_inner_inner).f2;
+ value;
+ },
+ }: t_second_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_second_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_second
+ );
+ },
+ let_: {
+ let value = (value: Raw.t).let_;
+ (
+ {
+ inner: {
+ let value = (value: Raw.t_let).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ inner: {
+ let value = (value: Raw.t_let_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ field: {
+ let value = (value: Raw.t_let_inner_inner).field;
+ value;
+ },
+ }: t_let_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_let_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_let
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let let_ = {
+ let value = (value: t).let_;
+ (
+ {
+ let inner = {
+ let value = (value: t_let).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_let_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_let_inner_inner).field;
+ value;
+ };
+ {field: field};
+ }: Raw.t_let_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_let_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_let
+ );
+ }
+ and second = {
+ let value = (value: t).second;
+ (
+ {
+ let inner = {
+ let value = (value: t_second).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_second_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let f2 = {
+ let value = (value: t_second_inner_inner).f2;
+ value;
+ }
+ and f1 = {
+ let value = (value: t_second_inner_inner).f1;
+ value;
+ };
+ {f1, f2};
+ }: Raw.t_second_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_second_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_second
+ );
+ }
+ and first = {
+ let value = (value: t).first;
+ (
+ {
+ let inner = {
+ let value = (value: t_first).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_first_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_first_inner_inner).field;
+ value;
+ };
+ {field: field};
+ }: Raw.t_first_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_first_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_first
+ );
+ };
+ {first, second, let_};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records nonrecursiveInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!) {\\\\nnonrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | \`FIRST | \`SECOND | \`THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nonrecursiveInput: {
+ let value = (value: Raw.t).nonrecursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nonrecursiveInput = {
+ let value = (value: t).nonrecursiveInput;
+ value;
+ };
+ {nonrecursiveInput: nonrecursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_100;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_100: _graphql_arg_100 = Obj.magic(0);
+ type nonrec _graphql_arg_95;
+ /**Argument **arg** on field **nonrecursiveInput** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_95: _graphql_arg_95 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {
+ scalarsInput: string,
+ more: string,
+ };
+ type t_variables = {
+ arg: t_variables_NonrecursiveInput,
+ arg2: t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\\\\nscalarsInput(arg: $arg) \\\\nmore: scalarsInput(arg: $arg2) \\\\n}\\\\n\\";
+ type t = {
+ scalarsInput: string,
+ more: string,
+ };
+ type t_variables = {
+ arg: t_variables_NonrecursiveInput,
+ arg2: t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | \`FIRST | \`SECOND | \`THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ more: {
+ let value = (value: Raw.t).more;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let more = {
+ let value = (value: t).more;
+ value;
+ }
+ and scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput, more};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ arg2:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg2,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ~arg2, ()) =>
+ serializeVariables({arg, arg2}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_240;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+\`\`\`*/
+ let _graphql_arg_240: _graphql_arg_240 = Obj.magic(0);
+ type nonrec _graphql_arg_235;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+\`\`\`*/
+ let _graphql_arg_235: _graphql_arg_235 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_169;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_169: _graphql_NonrecursiveInput_169 =
+ Obj.magic(0);
+ type nonrec _graphql_NonrecursiveInput_196;
+ /**\`\`\`
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+\`\`\`*/
+ let _graphql_NonrecursiveInput_196: _graphql_NonrecursiveInput_196 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records omitFutureValueEnum.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [
+ | \`FutureAddedValue(string)
+ | \`FIRST
+ | \`SECOND
+ | \`THIRD
+ ];
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | other => \`FutureAddedValue(other)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ | \`FutureAddedValue(other) => other
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ };
+ {message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {errors: errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [ | \`FIRST | \`SECOND | \`THIRD];
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | _ => raise(Not_found)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ };
+ {message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {errors: errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationWithError {\\\\nerrors {\\\\nmessage \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationWithError_errors_field = [ | \`FIRST | \`SECOND | \`THIRD];
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | \\"FIRST\\" => \`FIRST
+ | \\"SECOND\\" => \`SECOND
+ | \\"THIRD\\" => \`THIRD
+ | _ => raise(Not_found)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ };
+ {message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {errors: errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records omitFutureValueUnion.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records pokedexApolloMode.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ id: string,
+ name: Js.Nullable.t(string),
+ };
+ type t = {pokemon: Js.Nullable.t(t_pokemon)};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\npokemon(name: \\\\\\"Pikachu\\\\\\") {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_pokemon = {
+ id: string,
+ name: option(string),
+ };
+ type t = {pokemon: option(t_pokemon)};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ pokemon: {
+ let value = (value: Raw.t).pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ id: {
+ let value = (value: Raw.t_pokemon).id;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_pokemon).name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_pokemon,
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let pokemon = {
+ let value = (value: t).pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = (value: t_pokemon).name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = (value: t_pokemon).id;
+ value;
+ };
+ {id, name};
+ }: Raw.t_pokemon,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {pokemon: pokemon};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_name_52;
+ /**Argument **name** on field **pokemon** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_name_52: _graphql_name_52 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records pokedexScalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ id: string,
+ name: Js.Nullable.t(string),
+ };
+ type t = {pokemon: Js.Nullable.t(t_pokemon)};
+ type t_variables = {
+ id: Js.Nullable.t(string),
+ name: Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query pokemon($id: String, $name: String) {\\\\npokemon(name: $name, id: $id) {\\\\nid \\\\nname \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_pokemon = {
+ id: string,
+ name: option(string),
+ };
+ type t = {pokemon: option(t_pokemon)};
+ type t_variables = {
+ id: option(string),
+ name: option(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ pokemon: {
+ let value = (value: Raw.t).pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ id: {
+ let value = (value: Raw.t_pokemon).id;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_pokemon).name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_pokemon,
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let pokemon = {
+ let value = (value: t).pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = (value: t_pokemon).name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = (value: t_pokemon).id;
+ value;
+ };
+ {id, name};
+ }: Raw.t_pokemon,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {pokemon: pokemon};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ id:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).id,
+ ),
+ name:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).name,
+ ),
+ };
+ let makeVariables = (~id=?, ~name=?, ()) =>
+ serializeVariables({id, name}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_name_100;
+ /**Variable **$name** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_name_100: _graphql_name_100 = Obj.magic(0);
+ type nonrec _graphql_name_94;
+ /**Argument **name** on field **pokemon** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_name_94: _graphql_name_94 = Obj.magic(0);
+ type nonrec _graphql_id_111;
+ /**Variable **$id** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_id_111: _graphql_id_111 = Obj.magic(0);
+ type nonrec _graphql_id_107;
+ /**Argument **id** on field **pokemon** has the following graphql type:
+
+\`\`\`
+String
+\`\`\`*/
+ let _graphql_id_107: _graphql_id_107 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records record.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type scalars = {
+ string,
+ int,
+};
+
+type dog = {
+ name: string,
+ barkVolume: float,
+};
+
+type oneFieldQuery = {nullableString: option(string)};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ string,
+ int,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t = {variousScalars: scalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ }: scalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let int = {
+ let value = (value: scalars).int;
+ value;
+ }
+ and string = {
+ let value = (value: scalars).string;
+ value;
+ };
+ {string, int};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module OneFieldQuery = {
+ module Raw = {
+ type t_variousScalars = {nullableString: Js.Nullable.t(string)};
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {nullableString: option(string)};
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableString: nullableString};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 OneFieldQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ExternalFragmentQuery = {
+ module Fragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment Fragment on VariousScalars {\\\\nstring \\\\nint \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ };
+ type t = {
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ string: {
+ let value = (value: Raw.t).string;
+ value;
+ },
+ int: {
+ let value = (value: Raw.t).int;
+ value;
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let int = {
+ let value = (value: t).int;
+ value;
+ }
+ and string = {
+ let value = (value: t).string;
+ value;
+ };
+ {string, int};
+ }: Raw.t
+ );
+ let name = \\"Fragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+VariousScalars {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t = {variousScalars: Fragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (\\"query {\\\\nvariousScalars {\\\\n...\\" ++ Fragment.name)
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ Fragment.query;
+ type t = {variousScalars: Fragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ Fragment.verifyArgsAndParse(value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ Fragment.serialize(value);
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+module InlineFragmentQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 InlineFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module UnionExternalFragmentQuery = {
+ module DogFragment = {
+ /**The GraphQL query string*/
+ let query = \\"fragment DogFragment on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\";
+ module Raw = {
+ type t = {
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ };
+ type t = {
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ name: {
+ let value = (value: Raw.t).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t).barkVolume;
+ value;
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let barkVolume = {
+ let value = (value: t).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t).name;
+ value;
+ };
+ {name, barkVolume};
+ }: Raw.t
+ );
+ let name = \\"DogFragment\\";
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**\`\`\`
+Dog {
+ name: String!
+ barkVolume: Float!
+}
+\`\`\`*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\n...\\"
+ ++ DogFragment.name
+ )
+ ++ \\" \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\"
+ )
+ ++ DogFragment.query;
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(DogFragment.t)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: DogFragment.Raw.t = Obj.magic(value);
+ DogFragment.verifyArgsAndParse(value);
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(DogFragment.serialize(value)): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+"
+`;
+
+exports[`Records recursiveInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {recursiveInput: string};
+ type t_variables = {arg: t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ otherField: Js.Nullable.t(string),
+ inner: Js.Nullable.t(t_variables_RecursiveInput),
+ enum: Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: RecursiveInput!) {\\\\nrecursiveInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {recursiveInput: string};
+ type t_variables = {arg: t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ otherField: option(string),
+ inner: option(t_variables_RecursiveInput),
+ enum: option([ | \`FIRST | \`SECOND | \`THIRD]),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ recursiveInput: {
+ let value = (value: Raw.t).recursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let recursiveInput = {
+ let value = (value: t).recursiveInput;
+ value;
+ };
+ {recursiveInput: recursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectRecursiveInput(a))((inp: t_variables).arg),
+ }
+ and serializeInputObjectRecursiveInput:
+ t_variables_RecursiveInput => Raw.t_variables_RecursiveInput =
+ inp => {
+ otherField:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_RecursiveInput).otherField,
+ ),
+ inner:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectRecursiveInput(a))(b),
+ )
+ }
+ )(
+ (inp: t_variables_RecursiveInput).inner,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | \`FIRST => \\"FIRST\\"
+ | \`SECOND => \\"SECOND\\"
+ | \`THIRD => \\"THIRD\\"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_RecursiveInput).enum,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectRecursiveInput =
+ (~otherField=?, ~inner=?, ~enum=?, ()): t_variables_RecursiveInput => {
+ otherField,
+ inner,
+ enum,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_90;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}!
+\`\`\`*/
+ let _graphql_arg_90: _graphql_arg_90 = Obj.magic(0);
+ type nonrec _graphql_arg_85;
+ /**Argument **arg** on field **recursiveInput** has the following graphql type:
+
+\`\`\`
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}!
+\`\`\`*/
+ let _graphql_arg_85: _graphql_arg_85 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_RecursiveInput_47;
+ /**\`\`\`
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}
+\`\`\`*/
+ let _graphql_RecursiveInput_47: _graphql_RecursiveInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records scalars.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records scalarsArgs.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {scalarsInput: string};
+ type t_variables = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\\\\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \\\\n}\\\\n\\";
+ type t = {scalarsInput: string};
+ type t_variables = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput: scalarsInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ nullableString:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableString,
+ ),
+ string: (a => a)((inp: t_variables).string),
+ nullableInt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableInt,
+ ),
+ int: (a => a)((inp: t_variables).int),
+ nullableFloat:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableFloat,
+ ),
+ float: (a => a)((inp: t_variables).float),
+ nullableBoolean:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableBoolean,
+ ),
+ boolean: (a => a)((inp: t_variables).boolean),
+ nullableID:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableID,
+ ),
+ id: (a => a)((inp: t_variables).id),
+ };
+ let makeVariables =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_292;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+\`\`\`*/
+ let _graphql_arg_292: _graphql_arg_292 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records scalarsInput.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {scalarsInput: string};
+ type t_variables = {arg: t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($arg: VariousScalarsInput!) {\\\\nscalarsInput(arg: $arg) \\\\n}\\\\n\\";
+ type t = {scalarsInput: string};
+ type t_variables = {arg: t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput: scalarsInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectVariousScalarsInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectVariousScalarsInput:
+ t_variables_VariousScalarsInput => Raw.t_variables_VariousScalarsInput =
+ inp => {
+ nullableString:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableString,
+ ),
+ string: (a => a)((inp: t_variables_VariousScalarsInput).string),
+ nullableInt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableInt,
+ ),
+ int: (a => a)((inp: t_variables_VariousScalarsInput).int),
+ nullableFloat:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableFloat,
+ ),
+ float: (a => a)((inp: t_variables_VariousScalarsInput).float),
+ nullableBoolean:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableBoolean,
+ ),
+ boolean: (a => a)((inp: t_variables_VariousScalarsInput).boolean),
+ nullableID:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableID,
+ ),
+ id: (a => a)((inp: t_variables_VariousScalarsInput).id),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectVariousScalarsInput =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ )
+ : t_variables_VariousScalarsInput => {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_93;
+ /**Variable **$arg** has the following graphql type:
+
+\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+\`\`\`*/
+ let _graphql_arg_93: _graphql_arg_93 = Obj.magic(0);
+ type nonrec _graphql_arg_88;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+\`\`\`*/
+ let _graphql_arg_88: _graphql_arg_88 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_VariousScalarsInput_47;
+ /**\`\`\`
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+\`\`\`*/
+ let _graphql_VariousScalarsInput_47: _graphql_VariousScalarsInput_47 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records skipDirectives.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_v1 = {
+ nullableString: Js.Nullable.t(string),
+ string: Js.Nullable.t(string),
+ };
+ type t_v2 = {
+ nullableString: Js.Nullable.t(string),
+ string: Js.Nullable.t(string),
+ };
+ type t = {
+ v1: t_v1,
+ v2: t_v2,
+ };
+ type t_variables = {var: bool};
+ };
+ /**The GraphQL query string*/
+ let query = \\"query ($var: Boolean!) {\\\\nv1: variousScalars {\\\\nnullableString @skip(if: $var) \\\\nstring @skip(if: $var) \\\\n}\\\\n\\\\nv2: variousScalars {\\\\nnullableString @include(if: $var) \\\\nstring @include(if: $var) \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_v1 = {
+ nullableString: option(string),
+ string: option(string),
+ };
+ type t_v2 = {
+ nullableString: option(string),
+ string: option(string),
+ };
+ type t = {
+ v1: t_v1,
+ v2: t_v2,
+ };
+ type t_variables = {var: bool};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ v1: {
+ let value = (value: Raw.t).v1;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_v1).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_v1).string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_v1
+ );
+ },
+ v2: {
+ let value = (value: Raw.t).v2;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_v2).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_v2).string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_v2
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let v2 = {
+ let value = (value: t).v2;
+ (
+ {
+ let string = {
+ let value = (value: t_v2).string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = (value: t_v2).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableString, string};
+ }: Raw.t_v2
+ );
+ }
+ and v1 = {
+ let value = (value: t).v1;
+ (
+ {
+ let string = {
+ let value = (value: t_v1).string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = (value: t_v1).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableString, string};
+ }: Raw.t_v1
+ );
+ };
+ {v1, v2};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {var: (a => a)((inp: t_variables).var)};
+ let makeVariables = (~var, ()) =>
+ serializeVariables({var: var}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records subscription.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_simpleSubscription_Dog = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription;
+ type t = {simpleSubscription: t_simpleSubscription};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"subscription {\\\\nsimpleSubscription {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_simpleSubscription_Dog = {name: string};
+ type t_simpleSubscription_Human = {name: string};
+ type t_simpleSubscription = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_simpleSubscription_Dog)
+ | \`Human(t_simpleSubscription_Human)
+ ];
+ type t = {simpleSubscription: t_simpleSubscription};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ simpleSubscription: {
+ let value = (value: Raw.t).simpleSubscription;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_simpleSubscription_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_simpleSubscription_Dog).name;
+ value;
+ },
+ }: t_simpleSubscription_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_simpleSubscription_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_simpleSubscription_Human).name;
+ value;
+ },
+ }: t_simpleSubscription_Human
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_simpleSubscription
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let simpleSubscription = {
+ let value = (value: t).simpleSubscription;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_simpleSubscription_Dog).name;
+ value;
+ };
+ {__typename: \\"Dog\\", name};
+ }: Raw.t_simpleSubscription_Dog,
+ ): Raw.t_simpleSubscription
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_simpleSubscription_Human).name;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_simpleSubscription_Human,
+ ): Raw.t_simpleSubscription
+ )
+ | \`FutureAddedValue(value) => (
+ Obj.magic(value): Raw.t_simpleSubscription
+ )
+ };
+ };
+ {simpleSubscription: simpleSubscription};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records tagged_template.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nvariousScalars {\\\\nnullableString \\\\nstring \\\\nnullableInt \\\\nint \\\\nnullableFloat \\\\nfloat \\\\nnullableBoolean \\\\nboolean \\\\nnullableID \\\\nid \\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let { graphql } = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery3 = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let { graphql } = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery3 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery4 = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ \\"let graphql = require(\\\\\\"gatsby\\\\\\")\\";
+ /**The GraphQL query string*/
+ let query = [%raw
+ \\"graphql\`\\\\n query {\\\\n variousScalars {\\\\n nullableString\\\\n string\\\\n nullableInt\\\\n int\\\\n nullableFloat\\\\n float\\\\n nullableBoolean\\\\n boolean\\\\n nullableID\\\\n id\\\\n }\\\\n }\\\\n\`\\"
+ ];
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery4 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records typename.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner),
+ };
+ type t = {first: t_first};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\nfirst: nestedObject {\\\\n__typename \\\\ninner {\\\\n__typename \\\\ninner {\\\\n__typename \\\\nfield \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: option(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: option(t_first_inner),
+ };
+ type t = {first: t_first};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ first: {
+ let value = (value: Raw.t).first;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_first).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_first_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_first_inner_inner).__typename;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_first_inner_inner).field;
+ value;
+ },
+ }: t_first_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let first = {
+ let value = (value: t).first;
+ (
+ {
+ let inner = {
+ let value = (value: t_first).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_first_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_first_inner_inner).field;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_first_inner_inner).__typename;
+ value;
+ };
+ {__typename, field};
+ }: Raw.t_first_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first
+ );
+ };
+ {first: first};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records union.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQueryNoError = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ | \`Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: \\"Human\\", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQueryNoError {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records unionPartial.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"query {\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), \\"__typename\\"));
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | \`Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: \\"Dog\\", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | \`FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
+
+exports[`Records variant.re 1`] = `
+"[@ocaml.ppx.context
+ {
+ tool_name: \\"migrate_driver\\",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationForVariant_dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman;
+ type t_mutationForVariant;
+ type t = {mutationForVariant: t_mutationForVariant};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = \\"mutation {\\\\nmutationForVariant {\\\\nbaseType \\\\nbaseTypeList \\\\ndog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\nhuman {\\\\nname \\\\n}\\\\n\\\\ndogOrHuman {\\\\n__typename\\\\n...on Dog {\\\\nname \\\\nbarkVolume \\\\n}\\\\n\\\\n...on Human {\\\\nname \\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\\\n}\\\\n\\";
+ type t_mutationForVariant_dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_human = {name: string};
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {name: string};
+ type t_mutationForVariant_dogOrHuman = [
+ | \`FutureAddedValue(Js.Json.t)
+ | \`Dog(t_mutationForVariant_dogOrHuman_Dog)
+ | \`Human(t_mutationForVariant_dogOrHuman_Human)
+ ];
+ type t_mutationForVariant = [
+ | \`BaseType(string)
+ | \`BaseTypeList(array(string))
+ | \`Dog(t_mutationForVariant_dog)
+ | \`Human(t_mutationForVariant_human)
+ | \`DogOrHuman(t_mutationForVariant_dogOrHuman)
+ ];
+ type t = {mutationForVariant: t_mutationForVariant};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationForVariant: {
+ let value = (value: Raw.t).mutationForVariant;
+ switch (Js.Json.decodeObject(Obj.magic(value): Js.Json.t)) {
+ | None =>
+ Js.Exn.raiseError(
+ \\"graphql-ppx: \\"
+ ++ \\"Expected type \\"
+ ++ \\"VariantTestResult\\"
+ ++ \\" to be an object\\",
+ )
+ | Some(value) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"baseType\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`BaseType(value);
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"baseTypeList\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`BaseTypeList(value |> Js.Array.map(value => value));
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"dog\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`Dog(
+ {
+ name: {
+ let value = (value: Raw.t_mutationForVariant_dog).name;
+ value;
+ },
+ barkVolume: {
+ let value =
+ (value: Raw.t_mutationForVariant_dog).barkVolume;
+ value;
+ },
+ }: t_mutationForVariant_dog,
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), \\"human\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`Human(
+ {
+ name: {
+ let value =
+ (value: Raw.t_mutationForVariant_human).name;
+ value;
+ },
+ }: t_mutationForVariant_human,
+ );
+ | Some(_) =>
+ let temp =
+ Js.Dict.unsafeGet(Obj.magic(value), \\"dogOrHuman\\");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ \`DogOrHuman(
+ {
+ let typename: string =
+ Obj.magic(
+ Js.Dict.unsafeGet(
+ Obj.magic(value),
+ \\"__typename\\",
+ ),
+ );
+ (
+ switch (typename) {
+ | \\"Dog\\" =>
+ \`Dog(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Dog =
+ Obj.magic(value);
+ (
+ {
+ name: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ name;
+ value;
+ },
+ barkVolume: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ barkVolume;
+ value;
+ },
+ }: t_mutationForVariant_dogOrHuman_Dog
+ );
+ },
+ )
+ | \\"Human\\" =>
+ \`Human(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Human =
+ Obj.magic(value);
+ (
+ {
+ name: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Human
+ ).
+ name;
+ value;
+ },
+ }: t_mutationForVariant_dogOrHuman_Human
+ );
+ },
+ )
+ | _ =>
+ \`FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_mutationForVariant_dogOrHuman
+ );
+ },
+ );
+ | Some(_) =>
+ Js.Exn.raiseError(
+ \\"graphql-ppx: \\"
+ ++ \\"All fields on variant selection set on type \\"
+ ++ \\"VariantTestResult\\"
+ ++ \\" were null\\",
+ )
+ };
+ };
+ };
+ };
+ };
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationForVariant = {
+ let value = (value: t).mutationForVariant;
+ Obj.magic(Js.Json.null);
+ };
+ {mutationForVariant: mutationForVariant};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = \\"%identity\\";
+ external toJson: Raw.t => Js.Json.t = \\"%identity\\";
+ external variablesToJson: Raw.t_variables => Js.Json.t = \\"%identity\\";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+\`\`\`*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+"
+`;
diff --git a/tests_bucklescript/__tests__/argNamedQuery.re b/tests_bucklescript/__tests__/argNamedQuery.re
deleted file mode 100644
index 4c9d7b3e..00000000
--- a/tests_bucklescript/__tests__/argNamedQuery.re
+++ /dev/null
@@ -1,28 +0,0 @@
-module MyQuery = [%graphql
- {|
- query ($query: String!) {
- argNamedQuery(query: $query)
- }
-|}
-];
-
-Jest.(
- describe("Argument named 'query'", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Serializes variables", () =>
- expect(MyQuery.make(~query="a query", ())##variables)
- == Js.Json.parseExn({|{"query": "a query"}|})
- );
-
- test("Can create variables", () =>
- expect(MyQuery.makeVariables(~query="a query", ()))
- == Js.Json.parseExn({|{"query": "a query"}|})
- );
-
- test("No name clash with the query field", () =>
- expect(MyQuery.make(~query="a query", ())##query) != "a query"
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/argNamedQuery.rei b/tests_bucklescript/__tests__/argNamedQuery.rei
deleted file mode 100644
index b3d53433..00000000
--- a/tests_bucklescript/__tests__/argNamedQuery.rei
+++ /dev/null
@@ -1,21 +0,0 @@
-module MyQuery: {
- type t = {. "argNamedQuery": int};
-
- let make:
- (~query: string, unit) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- {. "query": string} =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
-};
diff --git a/tests_bucklescript/__tests__/comment.re b/tests_bucklescript/__tests__/comment.re
deleted file mode 100644
index bb5d1e7d..00000000
--- a/tests_bucklescript/__tests__/comment.re
+++ /dev/null
@@ -1,31 +0,0 @@
-module MyQuery = [%graphql
- {|
- query ($arg: NonrecursiveInput!) {
- nonrecursiveInput(arg: $arg) # comment to test
- }
- |}
-];
-
-Jest.(
- describe("Comment in query", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Constructs with comment in query", () =>
- expect(
- MyQuery.make(
- ~arg={"field": Some("test"), "enum": Some(`SECOND)},
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {| {
- "arg": {
- "field": "test",
- "enum": "SECOND"
- }
- } |},
- )
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/customDecoder.re b/tests_bucklescript/__tests__/customDecoder.re
deleted file mode 100644
index 0faec9ac..00000000
--- a/tests_bucklescript/__tests__/customDecoder.re
+++ /dev/null
@@ -1,33 +0,0 @@
-module MyQuery = [%graphql
- {|
- {
- variousScalars {
- string @bsDecoder(fn: "int_of_string")
- int @bsDecoder(fn: "string_of_int")
- }
- }
-|}
-];
-
-Jest.(
- describe("Custom decoders", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Runs the decoder", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {|{"variousScalars": {"string": "123", "int": 456}}|},
- ),
- ),
- )
- == {
- "variousScalars": {
- "string": 123,
- "int": "456",
- },
- }
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/customDecoder.rei b/tests_bucklescript/__tests__/customDecoder.rei
deleted file mode 100644
index 3e1cc91b..00000000
--- a/tests_bucklescript/__tests__/customDecoder.rei
+++ /dev/null
@@ -1,29 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "variousScalars": {
- .
- "string": int,
- "int": string,
- },
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/customScalars.re b/tests_bucklescript/__tests__/customScalars.re
deleted file mode 100644
index e156d6a3..00000000
--- a/tests_bucklescript/__tests__/customScalars.re
+++ /dev/null
@@ -1,68 +0,0 @@
-module MyQuery = [%graphql
- {|
- query ($opt: CustomScalar, $req: CustomScalar!) {
- customScalarField(argOptional: $opt, argRequired: $req) {
- nullable
- nonNullable
- }
- }
-|}
-];
-
-Jest.(
- describe("Custom scalars", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Encodes custom scalar variables as Json objects", () =>
- expect(
- MyQuery.make(
- ~opt=Js.Json.number(123.),
- ~req=Js.Json.number(456.),
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {|
- {
- "opt": 123,
- "req": 456
- }
- |},
- )
- );
-
- test("Encodes nullable scalar variables as optional Json objects", () =>
- expect(
- MyQuery.makeWithVariables({
- "opt": Some(Js.Json.number(123.)),
- "req": Js.Json.number(456.),
- })##variables,
- )
- == Js.Json.parseExn(
- {|
- {
- "opt": 123,
- "req": 456
- }
- |},
- )
- );
-
- test("Decodes results to JSON", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {|{"customScalarField": { "nullable": 123, "nonNullable": 456 }}|},
- ),
- ),
- )
- == {
- "customScalarField": {
- "nullable": Some(Js.Json.number(123.)),
- "nonNullable": Js.Json.number(456.),
- },
- }
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/enumInput.re b/tests_bucklescript/__tests__/enumInput.re
deleted file mode 100644
index 6b834483..00000000
--- a/tests_bucklescript/__tests__/enumInput.re
+++ /dev/null
@@ -1,19 +0,0 @@
-module MyQuery = [%graphql
- {|
- query ($arg: SampleField!) {
- enumInput(arg: $arg)
- }
-|}
-];
-
-Jest.(
- describe("Enum arguments", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Encodes enum arguments to strings", () =>
- expect(MyQuery.make(~arg=`FIRST, ())##variables)
- == Js.Json.parseExn({| { "arg": "FIRST" } |})
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/enumInput.rei b/tests_bucklescript/__tests__/enumInput.rei
deleted file mode 100644
index 70eabe40..00000000
--- a/tests_bucklescript/__tests__/enumInput.rei
+++ /dev/null
@@ -1,23 +0,0 @@
-module MyQuery: {
- type t = {. "enumInput": string};
-
- let make:
- (~arg: [ | `FIRST | `SECOND | `THIRD], unit) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- {. "arg": [ | `FIRST | `SECOND | `THIRD]} =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let query: string;
- let makeVariables: (~arg: [ | `FIRST | `SECOND | `THIRD], unit) => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/fragmentDefinition.re b/tests_bucklescript/__tests__/fragmentDefinition.re
deleted file mode 100644
index 8263d70f..00000000
--- a/tests_bucklescript/__tests__/fragmentDefinition.re
+++ /dev/null
@@ -1,84 +0,0 @@
-type record = {
- nullableOfNullable: option(array(option(string))),
- nullableOfNonNullable: option(array(string)),
-};
-
-let concat = ({nullableOfNullable, nullableOfNonNullable}) => {
- let x =
- nullableOfNullable
- ->Belt.Option.getWithDefault([||])
- ->Belt.Array.keepMap(x => x);
- let y = nullableOfNonNullable->Belt.Option.getWithDefault([||]);
-
- Belt.Array.concat(x, y);
-};
-
-module Fragments = [%graphql
- {|
- fragment listFragment on Lists {
- nullableOfNullable
- nullableOfNonNullable
- }
-
- fragment concatFragment on Lists @bsRecord @bsDecoder(fn: "concat") {
- nullableOfNullable
- nullableOfNonNullable
- }
-|}
-];
-
-module MyQuery = [%graphql
- {|
- query {
- l1: lists {
- ...Fragments.ListFragment
- }
-
- l2: lists {
- ...Fragments.ListFragment @bsField(name: "frag1")
- ...Fragments.ListFragment @bsField(name: "frag2")
- }
-
- l3: lists {
- ...Fragments.ConcatFragment
- }
- }
-|}
-];
-
-open Jest;
-open Expect;
-
-describe("Fragment definition", () => {
- let expectedObject = {
- "nullableOfNullable": Some([|Some("a"), None, Some("b")|]),
- "nullableOfNonNullable": None,
- };
-
- test("Decodes the fragment", () =>
- {|
- {
- "l1": {"nullableOfNullable": ["a", null, "b"]},
- "l2": {"nullableOfNullable": ["a", null, "b"]},
- "l3": {
- "nullableOfNullable": ["a", null, "b", null, "c"],
- "nullableOfNonNullable": ["d", "e"]
- }
- }|}
- |> Js.Json.parseExn
- |> MyQuery.parse
- |> expect
- |> toEqual({
- "l1": expectedObject,
- "l2": {
- "frag1": expectedObject,
- "frag2": expectedObject,
- },
- "l3": [|"a", "b", "c", "d", "e"|],
- })
- );
-
- test("Removes @bsField from query output", () =>
- MyQuery.query |> Js.String.includes("@bsField") |> expect |> toBe(false)
- );
-});
\ No newline at end of file
diff --git a/tests_bucklescript/__tests__/fragmentDefinition.rei b/tests_bucklescript/__tests__/fragmentDefinition.rei
deleted file mode 100644
index 549438c0..00000000
--- a/tests_bucklescript/__tests__/fragmentDefinition.rei
+++ /dev/null
@@ -1,61 +0,0 @@
-type record = {
- nullableOfNullable: option(array(option(string))),
- nullableOfNonNullable: option(array(string)),
-};
-
-module Fragments: {
- module ListFragment: {
- type t = {
- .
- "nullableOfNullable": option(array(option(string))),
- "nullableOfNonNullable": option(array(string)),
- };
-
- let query: string;
- let name: string;
- let parse: Js.Json.t => t;
- };
-};
-
-module MyQuery: {
- type t = {
- .
- "l1": {
- .
- "nullableOfNullable": option(array(option(string))),
- "nullableOfNonNullable": option(array(string)),
- },
- "l2": {
- .
- "frag1": {
- .
- "nullableOfNullable": option(array(option(string))),
- "nullableOfNonNullable": option(array(string)),
- },
- "frag2": {
- .
- "nullableOfNullable": option(array(option(string))),
- "nullableOfNonNullable": option(array(string)),
- },
- },
- "l3": array(string),
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeVariables: unit => Js.Json.t;
-};
\ No newline at end of file
diff --git a/tests_bucklescript/__tests__/interface.re b/tests_bucklescript/__tests__/interface.re
deleted file mode 100644
index c8647309..00000000
--- a/tests_bucklescript/__tests__/interface.re
+++ /dev/null
@@ -1,61 +0,0 @@
-module QueryWithFragments = [%graphql
- {|
- query {
- users {
- id
- ... on AdminUser {
- name
- }
- ... on AnonymousUser {
- anonymousId
- }
- }
- }
-|}
-];
-
-module QueryWithoutFragments = [%graphql
- {|
- query {
- users {
- id
- }
- }
-|}
-];
-
-let json = {|{
- "users": [
- { "__typename": "AdminUser", "id": "1", "name": "bob" },
- { "__typename": "AnonymousUser", "id": "2", "anonymousId": 1},
- { "__typename": "OtherUser", "id": "3"}
-]}|};
-
-Jest.(
- describe("Interface definition", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Decodes the interface with fragments ", () =>
- expect(QueryWithFragments.parse(Js.Json.parseExn(json)))
- == {
- "users": [|
- `AdminUser({"id": "1", "name": "bob"}),
- `AnonymousUser({"id": "2", "anonymousId": 1}),
- `User({"id": "3"}),
- |],
- }
- );
-
- test("Decodes the interface without fragments ", () =>
- expect(QueryWithoutFragments.parse(Js.Json.parseExn(json)))
- == {
- "users": [|
- `User({"id": "1"}),
- `User({"id": "2"}),
- `User({"id": "3"}),
- |],
- }
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/interface.rei b/tests_bucklescript/__tests__/interface.rei
deleted file mode 100644
index 3290dbdb..00000000
--- a/tests_bucklescript/__tests__/interface.rei
+++ /dev/null
@@ -1,67 +0,0 @@
-module QueryWithFragments: {
- type t = {
- .
- "users":
- array(
- [
- | `User({. "id": string})
- | `AdminUser(
- {
- .
- "id": string,
- "name": string,
- },
- )
- | `AnonymousUser(
- {
- .
- "id": string,
- "anonymousId": int,
- },
- )
- ],
- ),
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
-
-module QueryWithoutFragments: {
- type t = {. "users": array([ | `User({. "id": string})])};
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/lists.re b/tests_bucklescript/__tests__/lists.re
deleted file mode 100644
index e04b7bc3..00000000
--- a/tests_bucklescript/__tests__/lists.re
+++ /dev/null
@@ -1,37 +0,0 @@
-module MyQuery = [%graphql
- {|
- {
- lists {
- nullableOfNullable
- nullableOfNonNullable
- nonNullableOfNullable
- nonNullableOfNonNullable
- }
- }
-|}
-];
-
-Jest.(
- describe("Lists", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Null in nullable lists", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {|{"lists": {"nullableOfNullable": [null, "123"], "nonNullableOfNullable": [null, "123"], "nonNullableOfNonNullable": ["a", "b"]}}|},
- ),
- ),
- )
- == {
- "lists": {
- "nullableOfNullable": Some([|None, Some("123")|]),
- "nullableOfNonNullable": None,
- "nonNullableOfNullable": [|None, Some("123")|],
- "nonNullableOfNonNullable": [|"a", "b"|],
- },
- }
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/lists.rei b/tests_bucklescript/__tests__/lists.rei
deleted file mode 100644
index 9c2a86af..00000000
--- a/tests_bucklescript/__tests__/lists.rei
+++ /dev/null
@@ -1,31 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "lists": {
- .
- "nullableOfNullable": option(array(option(string))),
- "nullableOfNonNullable": option(array(string)),
- "nonNullableOfNullable": array(option(string)),
- "nonNullableOfNonNullable": array(string),
- },
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/listsArgs.re b/tests_bucklescript/__tests__/listsArgs.re
deleted file mode 100644
index 2e28a90b..00000000
--- a/tests_bucklescript/__tests__/listsArgs.re
+++ /dev/null
@@ -1,62 +0,0 @@
-module MyQuery = [%graphql
- {|
- query (
- $nullableOfNullable: [String],
- $nullableOfNonNullable: [String!],
- $nonNullableOfNullable: [String]!,
- $nonNullableOfNonNullable: [String!]!,
- ) {
- listsInput(arg: {
- nullableOfNullable: $nullableOfNullable,
- nullableOfNonNullable: $nullableOfNonNullable,
- nonNullableOfNullable: $nonNullableOfNullable,
- nonNullableOfNonNullable: $nonNullableOfNonNullable,
- })
- }
-|}
-];
-
-Jest.(
- describe("Lists as query arguments", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Allows you to omit nullable arguments", () =>
- expect(
- MyQuery.make(
- ~nonNullableOfNullable=[||],
- ~nonNullableOfNonNullable=[||],
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {|
- {
- "nonNullableOfNullable": [],
- "nonNullableOfNonNullable": []
- }
- |},
- )
- );
-
- test("Allows None in lists of nullable types", () =>
- expect(
- MyQuery.make(
- ~nullableOfNullable=[|Some("x"), None, Some("y")|],
- ~nonNullableOfNullable=[|Some("a"), None, Some("b")|],
- ~nonNullableOfNonNullable=[|"1", "2", "3"|],
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {|
- {
- "nullableOfNullable": ["x", null, "y"],
- "nonNullableOfNullable": ["a", null, "b"],
- "nonNullableOfNonNullable": ["1", "2", "3"]
- }
- |},
- )
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/listsArgs.rei b/tests_bucklescript/__tests__/listsArgs.rei
deleted file mode 100644
index 45e3d194..00000000
--- a/tests_bucklescript/__tests__/listsArgs.rei
+++ /dev/null
@@ -1,42 +0,0 @@
-module MyQuery: {
- type t = {. "listsInput": string};
-
- let make:
- (
- ~nullableOfNullable: array(option(string))=?,
- ~nullableOfNonNullable: array(string)=?,
- ~nonNullableOfNullable: array(option(string)),
- ~nonNullableOfNonNullable: array(string),
- unit
- ) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- {
- .
- "nullableOfNullable": option(array(option(string))),
- "nullableOfNonNullable": option(array(string)),
- "nonNullableOfNullable": array(option(string)),
- "nonNullableOfNonNullable": array(string),
- } =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
- let makeVariables:
- (
- ~nullableOfNullable: array(option(string))=?,
- ~nullableOfNonNullable: array(string)=?,
- ~nonNullableOfNullable: array(option(string)),
- ~nonNullableOfNonNullable: array(string),
- unit
- ) =>
- Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/listsInput.re b/tests_bucklescript/__tests__/listsInput.re
deleted file mode 100644
index 590f21e4..00000000
--- a/tests_bucklescript/__tests__/listsInput.re
+++ /dev/null
@@ -1,39 +0,0 @@
-module MyQuery = [%graphql
- {|
- query ($arg: ListsInput!) {
- listsInput(arg: $arg)
- }
-|}
-];
-
-Jest.(
- describe("Lists as query arguments through input object", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Allows None in lists of nullable types", () =>
- expect(
- MyQuery.make(
- ~arg={
- "nullableOfNullable": Some([|Some("x"), None, Some("y")|]),
- "nullableOfNonNullable": None,
- "nonNullableOfNullable": [|Some("a"), None, Some("b")|],
- "nonNullableOfNonNullable": [|"1", "2", "3"|],
- },
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {|
- {
- "arg": {
- "nullableOfNullable": ["x", null, "y"],
- "nonNullableOfNullable": ["a", null, "b"],
- "nonNullableOfNonNullable": ["1", "2", "3"]
- }
- }
- |},
- )
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/listsInput.rei b/tests_bucklescript/__tests__/listsInput.rei
deleted file mode 100644
index 7847bc25..00000000
--- a/tests_bucklescript/__tests__/listsInput.rei
+++ /dev/null
@@ -1,54 +0,0 @@
-module MyQuery: {
- type t = {. "listsInput": string};
-
- let make:
- (
- ~arg: {
- ..
- "nullableOfNullable": option(array(option(string))),
- "nullableOfNonNullable": option(array(string)),
- "nonNullableOfNullable": array(option(string)),
- "nonNullableOfNonNullable": array(string),
- },
- unit
- ) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let makeWithVariables:
- {
- .
- "arg": {
- .
- "nullableOfNullable": option(array(option(string))),
- "nullableOfNonNullable": option(array(string)),
- "nonNullableOfNullable": array(option(string)),
- "nonNullableOfNonNullable": array(string),
- },
- } =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let makeVariables:
- (
- ~arg: {
- ..
- "nullableOfNullable": option(array(option(string))),
- "nullableOfNonNullable": option(array(string)),
- "nonNullableOfNullable": array(option(string)),
- "nonNullableOfNonNullable": array(string),
- },
- unit
- ) =>
- Js.Json.t;
-
- let query: string;
-};
diff --git a/tests_bucklescript/__tests__/mutation.re b/tests_bucklescript/__tests__/mutation.re
deleted file mode 100644
index c23d65cb..00000000
--- a/tests_bucklescript/__tests__/mutation.re
+++ /dev/null
@@ -1,27 +0,0 @@
-module MyQuery = [%graphql
- {|
- mutation {
- mutationWithError {
- value {
- stringField
- }
-
- errors {
- field
- message
- }
- }
- }
-|}
-];
-
-Jest.(
- describe("Mutation", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Printed query is a mutation", () =>
- expect(MyQuery.query |> Js.String.indexOf("mutation")) == 0
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/mutation.rei b/tests_bucklescript/__tests__/mutation.rei
deleted file mode 100644
index 23fd8d31..00000000
--- a/tests_bucklescript/__tests__/mutation.rei
+++ /dev/null
@@ -1,37 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "mutationWithError": {
- .
- "value": option({. "stringField": string}),
- "errors":
- option(
- array({
- .
- "field": [ | `FIRST | `SECOND | `THIRD],
- "message": string,
- }),
- ),
- },
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/mutationWithArgs.re b/tests_bucklescript/__tests__/mutationWithArgs.re
deleted file mode 100644
index ce49c618..00000000
--- a/tests_bucklescript/__tests__/mutationWithArgs.re
+++ /dev/null
@@ -1,16 +0,0 @@
-open Jest;
-open Expect;
-
-module MyQuery = [%graphql
- {|
- mutation MyMutation($required: String!) {
- optionalInputArgs(required: $required, anotherRequired: "val")
- }
-|}
-];
-
-describe("Mutation with args", () =>
- test("Printed query is a mutation", () =>
- MyQuery.query |> Js.String.indexOf("mutation") |> expect |> toBe(0)
- )
-);
diff --git a/tests_bucklescript/__tests__/nested.re b/tests_bucklescript/__tests__/nested.re
deleted file mode 100644
index c677da40..00000000
--- a/tests_bucklescript/__tests__/nested.re
+++ /dev/null
@@ -1,55 +0,0 @@
-type record = {
- f1: string,
- f2: string,
-};
-
-module MyQuery = [%graphql
- {|
- {
- first: nestedObject {
- inner {
- inner {
- field
- }
- }
- }
-
- second: nestedObject {
- inner {
- inner @bsRecord {
- f1: field
- f2: field
- }
- }
- }
- }
-|}
-];
-
-Jest.(
- describe("Nested", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Decodes recursively", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {|
- {"first": {"inner": {"inner": {"field": "second"}}},
- "second": {"inner": null}}
- |},
- ),
- ),
- )
- == {
- "first": {
- "inner": Some({"inner": Some({"field": "second"})}),
- },
- "second": {
- "inner": None,
- },
- }
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/nested.rei b/tests_bucklescript/__tests__/nested.rei
deleted file mode 100644
index 55734942..00000000
--- a/tests_bucklescript/__tests__/nested.rei
+++ /dev/null
@@ -1,32 +0,0 @@
-type record = {
- f1: string,
- f2: string,
-};
-
-module MyQuery: {
- type t = {
- .
- "first": {. "inner": option({. "inner": option({. "field": string})})},
- "second": {. "inner": option({. "inner": option(record)})},
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/nonrecursiveInput.re b/tests_bucklescript/__tests__/nonrecursiveInput.re
deleted file mode 100644
index e194ce4e..00000000
--- a/tests_bucklescript/__tests__/nonrecursiveInput.re
+++ /dev/null
@@ -1,31 +0,0 @@
-module MyQuery = [%graphql
- {|
- query ($arg: NonrecursiveInput!) {
- nonrecursiveInput(arg: $arg)
- }
- |}
-];
-
-Jest.(
- describe("Recursive input types", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Constructing a recursive input type", () =>
- expect(
- MyQuery.make(
- ~arg={"field": Some("test"), "enum": Some(`SECOND)},
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {| {
- "arg": {
- "field": "test",
- "enum": "SECOND"
- }
- } |},
- )
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/nonrecursiveInput.rei b/tests_bucklescript/__tests__/nonrecursiveInput.rei
deleted file mode 100644
index a3f915c0..00000000
--- a/tests_bucklescript/__tests__/nonrecursiveInput.rei
+++ /dev/null
@@ -1,47 +0,0 @@
-module MyQuery: {
- type t = {. "nonrecursiveInput": string};
-
- let make:
- (
- ~arg: {
- .
- "enum": option([ | `FIRST | `SECOND | `THIRD]),
- "field": option(string),
- },
- unit
- ) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- {
- .
- "arg":
- {
- .
- "enum": option([ | `FIRST | `SECOND | `THIRD]),
- "field": option(string),
- } as 'a,
- } =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let query: string;
- let makeVariables:
- (
- ~arg: {
- .
- "enum": option([ | `FIRST | `SECOND | `THIRD]),
- "field": option(string),
- },
- unit
- ) =>
- Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/pokedexApolloMode.re b/tests_bucklescript/__tests__/pokedexApolloMode.re
deleted file mode 100644
index 5117abe7..00000000
--- a/tests_bucklescript/__tests__/pokedexApolloMode.re
+++ /dev/null
@@ -1,25 +0,0 @@
-open Jest;
-open Expect;
-
-module MyQuery = [%graphql
- {|
- {
- pokemon(name: "Pikachu") {
- id
- name
- }
- }
- |};
- {schema: "../pokedex_schema.json"}
-];
-
-describe("Apollo mode with alternate schema", () =>
- test("Adds __typename to objects", () => {
- let typenameRegex = [%bs.re {|/__typename/g|}];
- MyQuery.query
- |> Js.String.match(typenameRegex)
- |> Belt.Option.map(_, Array.length)
- |> expect
- |> toEqual(Some(2));
- })
-);
diff --git a/tests_bucklescript/__tests__/pokedexScalars.re b/tests_bucklescript/__tests__/pokedexScalars.re
deleted file mode 100644
index 923a3d91..00000000
--- a/tests_bucklescript/__tests__/pokedexScalars.re
+++ /dev/null
@@ -1,41 +0,0 @@
-module MyQuery = [%graphql
- {|
- query pokemon($id: String, $name: String) {
- pokemon(name: $name, id: $id) {
- id
- name
- }
- }
- |};
- {schema: "../pokedex_schema.json"}
-];
-
-Jest.(
- describe("Scalars as arguments", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Allows you to omit nullable arguments", () =>
- expect(MyQuery.make(~name="Pikachu", ())##variables)
- |> toEqual(
- Js.Json.parseExn(
- {| {
- "name": "Pikachu"
- } |},
- ),
- )
- );
-
- test("Includes non-nulled arguments", () =>
- expect(MyQuery.make(~id="pikachu_id", ~name="Pikachu", ())##variables)
- |> toEqual(
- Js.Json.parseExn(
- {| {
- "name": "Pikachu",
- "id": "pikachu_id"
- } |},
- ),
- )
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/record.re b/tests_bucklescript/__tests__/record.re
deleted file mode 100644
index 25b472a3..00000000
--- a/tests_bucklescript/__tests__/record.re
+++ /dev/null
@@ -1,144 +0,0 @@
-type scalars = {
- string,
- int,
-};
-
-type dog = {
- name: string,
- barkVolume: float,
-};
-
-type oneFieldQuery = {nullableString: option(string)};
-
-module MyQuery = [%graphql
- {|
- {
- variousScalars @bsRecord {
- string
- int
- }
- }
-|}
-];
-
-module OneFieldQuery = [%graphql
- {|
- {
- variousScalars @bsRecord {
- nullableString
- }
- }
-|}
-];
-
-module ExternalFragmentQuery = [%graphql
- {|
- fragment Fragment on VariousScalars @bsRecord {
- string
- int
- }
-
- {
- variousScalars {
- ...Fragment
- }
- }
-|}
-];
-
-module InlineFragmentQuery = [%graphql
- {|
- {
- dogOrHuman {
- ...on Dog @bsRecord {
- name
- barkVolume
- }
- }
- }
-|}
-];
-
-module UnionExternalFragmentQuery = [%graphql
- {|
- fragment DogFragment on Dog @bsRecord {
- name
- barkVolume
- }
-
- {
- dogOrHuman {
- ...on Dog {
- ...DogFragment
- }
- }
- }
-|}
-];
-
-Jest.(
- describe("Record", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Decodes a record in a selection", () => {
- let expected = {string: "a string", int: 123};
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {|{"variousScalars": {"string": "a string", "int": 123}}|},
- ),
- ),
- )
- == {"variousScalars": expected};
- });
-
- test("Decodes a record with one field in a selection", () => {
- let expected = {nullableString: Some("a string")};
- expect(
- OneFieldQuery.parse(
- Js.Json.parseExn(
- {|{"variousScalars": {"nullableString": "a string"}}|},
- ),
- ),
- )
- |> toEqual({"variousScalars": expected});
- });
-
- test("Decodes a record in an external fragment", () => {
- let expected = {string: "a string", int: 123};
- expect(
- ExternalFragmentQuery.parse(
- Js.Json.parseExn(
- {|{"variousScalars": {"string": "a string", "int": 123}}|},
- ),
- ),
- )
- == {"variousScalars": expected};
- });
-
- test("Decodes a record in an inline fragment", () => {
- let expected = `Dog({name: "name", barkVolume: 123.0});
- expect(
- InlineFragmentQuery.parse(
- Js.Json.parseExn(
- {|{"dogOrHuman": {"__typename": "Dog", "name": "name", "barkVolume": 123}}|},
- ),
- ),
- )
- == {"dogOrHuman": expected};
- });
-
- test("Decodes a record in an external fragment on union selections", () => {
- let expected = `Dog({name: "name", barkVolume: 123.0});
- expect(
- UnionExternalFragmentQuery.parse(
- Js.Json.parseExn(
- {|{"dogOrHuman": {"__typename": "Dog", "name": "name", "barkVolume": 123}}|},
- ),
- ),
- )
- == {"dogOrHuman": expected};
- });
- })
-);
diff --git a/tests_bucklescript/__tests__/record.rei b/tests_bucklescript/__tests__/record.rei
deleted file mode 100644
index 66e65b61..00000000
--- a/tests_bucklescript/__tests__/record.rei
+++ /dev/null
@@ -1,29 +0,0 @@
-type scalars = {
- string,
- int,
-};
-
-module MyQuery: {
- type t = {. "variousScalars": scalars};
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let makeVariables: unit => Js.Json.t;
-
- let query: string;
-};
diff --git a/tests_bucklescript/__tests__/recursiveInput.re b/tests_bucklescript/__tests__/recursiveInput.re
deleted file mode 100644
index 1ce77e4e..00000000
--- a/tests_bucklescript/__tests__/recursiveInput.re
+++ /dev/null
@@ -1,43 +0,0 @@
-module MyQuery = [%graphql
- {|
- query ($arg: RecursiveInput!) {
- recursiveInput(arg: $arg)
- }
-|}
-];
-
-Jest.(
- describe("Recursive input types", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Constructing a recursive input type", () =>
- expect(
- MyQuery.make(
- ~arg={
- "otherField": Some("test"),
- "enum": None,
- "inner":
- Some({
- "otherField": Some("inner"),
- "inner": None,
- "enum": Some(`SECOND),
- }),
- },
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {| {
- "arg": {
- "otherField": "test",
- "inner": {
- "otherField": "inner",
- "enum": "SECOND"
- }
- }
- } |},
- )
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/recursiveInput.rei b/tests_bucklescript/__tests__/recursiveInput.rei
deleted file mode 100644
index 17397b33..00000000
--- a/tests_bucklescript/__tests__/recursiveInput.rei
+++ /dev/null
@@ -1,50 +0,0 @@
-module MyQuery: {
- type t = {. "recursiveInput": string};
-
- let make:
- (
- ~arg: {
- .
- "inner": option('a),
- "enum": option([ | `FIRST | `SECOND | `THIRD]),
- "otherField": option(string),
- } as 'a,
- unit
- ) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- {
- .
- "arg":
- {
- .
- "inner": option('a),
- "enum": option([ | `FIRST | `SECOND | `THIRD]),
- "otherField": option(string),
- } as 'a,
- } =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let query: string;
- let makeVariables:
- (
- ~arg: {
- .
- "inner": option('a),
- "enum": option([ | `FIRST | `SECOND | `THIRD]),
- "otherField": option(string),
- } as 'a,
- unit
- ) =>
- Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/scalars.re b/tests_bucklescript/__tests__/scalars.re
deleted file mode 100644
index 9cdc925a..00000000
--- a/tests_bucklescript/__tests__/scalars.re
+++ /dev/null
@@ -1,131 +0,0 @@
-module MyQuery = [%graphql
- {|
- {
- variousScalars {
- nullableString
- string
- nullableInt
- int
- nullableFloat
- float
- nullableBoolean
- boolean
- nullableID
- id
- }
- }
-|}
-];
-
-Jest.(
- describe("Scalars", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Decodes non-null scalars", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {| {
- "variousScalars": {
- "nullableString": "a nullable string",
- "string": "a string",
- "nullableInt": 456,
- "int": 123,
- "nullableFloat": 678.5,
- "float": 1234.5,
- "nullableBoolean": false,
- "boolean": true,
- "nullableID": "a nullable ID",
- "id": "an ID"
- }
- } |},
- ),
- ),
- )
- == {
- "variousScalars": {
- "nullableString": Some("a nullable string"),
- "string": "a string",
- "nullableInt": Some(456),
- "int": 123,
- "nullableFloat": Some(678.5),
- "float": 1234.5,
- "nullableBoolean": Some(false),
- "boolean": true,
- "nullableID": Some("a nullable ID"),
- "id": "an ID",
- },
- }
- );
-
- test("Decodes null scalars", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {| {
- "variousScalars": {
- "nullableString": null,
- "string": "a string",
- "nullableInt": null,
- "int": 123,
- "nullableFloat": null,
- "float": 1234.5,
- "nullableBoolean": null,
- "boolean": true,
- "nullableID": null,
- "id": "an ID"
- }
- } |},
- ),
- ),
- )
- == {
- "variousScalars": {
- "nullableString": None,
- "string": "a string",
- "nullableInt": None,
- "int": 123,
- "nullableFloat": None,
- "float": 1234.5,
- "nullableBoolean": None,
- "boolean": true,
- "nullableID": None,
- "id": "an ID",
- },
- }
- );
-
- test("Decodes omitted scalars", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {| {
- "variousScalars": {
- "string": "a string",
- "int": 123,
- "float": 1234.5,
- "boolean": true,
- "id": "an ID"
- }
- } |},
- ),
- ),
- )
- == {
- "variousScalars": {
- "nullableString": None,
- "string": "a string",
- "nullableInt": None,
- "int": 123,
- "nullableFloat": None,
- "float": 1234.5,
- "nullableBoolean": None,
- "boolean": true,
- "nullableID": None,
- "id": "an ID",
- },
- }
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/scalars.rei b/tests_bucklescript/__tests__/scalars.rei
deleted file mode 100644
index 88595846..00000000
--- a/tests_bucklescript/__tests__/scalars.rei
+++ /dev/null
@@ -1,38 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "variousScalars": {
- .
- "nullableString": option(string),
- "string": string,
- "nullableInt": option(int),
- "int": int,
- "nullableFloat": option(float),
- "float": float,
- "nullableBoolean": option(bool),
- "boolean": bool,
- "nullableID": option(string),
- "id": string,
- },
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/scalarsArgs.re b/tests_bucklescript/__tests__/scalarsArgs.re
deleted file mode 100644
index c5ac95c5..00000000
--- a/tests_bucklescript/__tests__/scalarsArgs.re
+++ /dev/null
@@ -1,90 +0,0 @@
-module MyQuery = [%graphql
- {|
- query (
- $nullableString: String,
- $string: String!,
- $nullableInt: Int,
- $int: Int!,
- $nullableFloat: Float,
- $float: Float!,
- $nullableBoolean: Boolean,
- $boolean: Boolean!,
- $nullableID: ID,
- $id: ID!,
- ) {
- scalarsInput(arg: {
- nullableString: $nullableString,
- string: $string,
- nullableInt: $nullableInt,
- int: $int,
- nullableFloat: $nullableFloat,
- float: $float,
- nullableBoolean: $nullableBoolean,
- boolean: $boolean,
- nullableID: $nullableID,
- id: $id,
- })
- }
-|}
-];
-
-Jest.(
- describe("Scalars as arguments", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Allows you to omit nullable arguments", () =>
- expect(
- MyQuery.make(
- ~string="a string",
- ~int=123,
- ~float=1234.5,
- ~boolean=true,
- ~id="an ID",
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {| {
- "string": "a string",
- "int": 123,
- "float": 1234.5,
- "boolean": true,
- "id": "an ID"
- } |},
- )
- );
-
- test("Includes non-nulled arguments", () =>
- expect(
- MyQuery.make(
- ~nullableString="a nullable string",
- ~string="a string",
- ~nullableInt=456,
- ~int=123,
- ~nullableFloat=567.5,
- ~float=1234.5,
- ~nullableBoolean=false,
- ~boolean=true,
- ~nullableID="a nullable ID",
- ~id="an ID",
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {| {
- "nullableString": "a nullable string",
- "string": "a string",
- "nullableInt": 456,
- "int": 123,
- "nullableFloat": 567.5,
- "float": 1234.5,
- "nullableBoolean": false,
- "boolean": true,
- "nullableID": "a nullable ID",
- "id": "an ID"
- } |},
- )
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/scalarsArgs.rei b/tests_bucklescript/__tests__/scalarsArgs.rei
deleted file mode 100644
index 95484443..00000000
--- a/tests_bucklescript/__tests__/scalarsArgs.rei
+++ /dev/null
@@ -1,62 +0,0 @@
-module MyQuery: {
- type t = {. "scalarsInput": string};
-
- let make:
- (
- ~nullableString: string=?,
- ~string: string,
- ~nullableInt: int=?,
- ~int: int,
- ~nullableFloat: float=?,
- ~float: float,
- ~nullableBoolean: bool=?,
- ~boolean: bool,
- ~nullableID: string=?,
- ~id: string,
- unit
- ) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let makeWithVariables:
- {
- .
- "nullableString": option(string),
- "string": string,
- "nullableInt": option(int),
- "int": int,
- "nullableFloat": option(float),
- "float": float,
- "nullableBoolean": option(bool),
- "boolean": bool,
- "nullableID": option(string),
- "id": string,
- } =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let query: string;
- let makeVariables:
- (
- ~nullableString: string=?,
- ~string: string,
- ~nullableInt: int=?,
- ~int: int,
- ~nullableFloat: float=?,
- ~float: float,
- ~nullableBoolean: bool=?,
- ~boolean: bool,
- ~nullableID: string=?,
- ~id: string,
- unit
- ) =>
- Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/scalarsInput.re b/tests_bucklescript/__tests__/scalarsInput.re
deleted file mode 100644
index 5ffd5ea2..00000000
--- a/tests_bucklescript/__tests__/scalarsInput.re
+++ /dev/null
@@ -1,50 +0,0 @@
-module MyQuery = [%graphql
- {|
- query ($arg: VariousScalarsInput!) {
- scalarsInput(arg: $arg)
- }
-|}
-];
-
-Jest.(
- describe("Scalars as arguments through an input object", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Includes non-nulled arguments", () =>
- expect(
- MyQuery.make(
- ~arg={
- "nullableString": Some("a nullable string"),
- "string": "a string",
- "nullableInt": Some(456),
- "int": 123,
- "nullableFloat": Some(567.5),
- "float": 1234.5,
- "nullableBoolean": Some(false),
- "boolean": true,
- "nullableID": Some("a nullable ID"),
- "id": "an ID",
- },
- (),
- )##variables,
- )
- == Js.Json.parseExn(
- {| {
- "arg": {
- "nullableString": "a nullable string",
- "string": "a string",
- "nullableInt": 456,
- "int": 123,
- "nullableFloat": 567.5,
- "float": 1234.5,
- "nullableBoolean": false,
- "boolean": true,
- "nullableID": "a nullable ID",
- "id": "an ID"
- }
- } |},
- )
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/scalarsInput.rei b/tests_bucklescript/__tests__/scalarsInput.rei
deleted file mode 100644
index f2f741e9..00000000
--- a/tests_bucklescript/__tests__/scalarsInput.rei
+++ /dev/null
@@ -1,71 +0,0 @@
-module MyQuery: {
- type t = {. "scalarsInput": string};
-
- let make:
- (
- ~arg: {
- ..
- "nullableString": option(string),
- "string": string,
- "nullableInt": option(int),
- "int": int,
- "nullableFloat": option(float),
- "float": float,
- "nullableBoolean": option(bool),
- "boolean": bool,
- "nullableID": option(string),
- "id": string,
- },
- unit
- ) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let makeWithVariables:
- {
- .
- "arg": {
- .
- "nullableString": option(string),
- "string": string,
- "nullableInt": option(int),
- "int": int,
- "nullableFloat": option(float),
- "float": float,
- "nullableBoolean": option(bool),
- "boolean": bool,
- "nullableID": option(string),
- "id": string,
- },
- } =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let query: string;
- let makeVariables:
- (
- ~arg: {
- ..
- "nullableString": option(string),
- "string": string,
- "nullableInt": option(int),
- "int": int,
- "nullableFloat": option(float),
- "float": float,
- "nullableBoolean": option(bool),
- "boolean": bool,
- "nullableID": option(string),
- "id": string,
- },
- unit
- ) =>
- Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/skipDirectives.re b/tests_bucklescript/__tests__/skipDirectives.re
deleted file mode 100644
index 84dc6468..00000000
--- a/tests_bucklescript/__tests__/skipDirectives.re
+++ /dev/null
@@ -1,55 +0,0 @@
-module MyQuery = [%graphql
- {|
- query ($var: Boolean!) {
- v1: variousScalars {
- nullableString @skip(if: $var)
- string @skip(if: $var)
- }
- v2: variousScalars {
- nullableString @include(if: $var)
- string @include(if: $var)
- }
- }
-|}
-];
-
-Jest.(
- describe("Skip/include directives", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Responds with None to nulled fields", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {|{"v1": {"nullableString": null, "string": null}, "v2": {"nullableString": null, "string": null}}|},
- ),
- ),
- )
- == {
- "v1": {
- "nullableString": None,
- "string": None,
- },
- "v2": {
- "nullableString": None,
- "string": None,
- },
- }
- );
-
- test("Responds with None to omitted fields", () =>
- expect(MyQuery.parse(Js.Json.parseExn({|{"v1": {}, "v2": {}}|})))
- == {
- "v1": {
- "nullableString": None,
- "string": None,
- },
- "v2": {
- "nullableString": None,
- "string": None,
- },
- }
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/skipDirectives.rei b/tests_bucklescript/__tests__/skipDirectives.rei
deleted file mode 100644
index 23e38a32..00000000
--- a/tests_bucklescript/__tests__/skipDirectives.rei
+++ /dev/null
@@ -1,36 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "v1": {
- .
- "nullableString": option(string),
- "string": option(string),
- },
- "v2": {
- .
- "nullableString": option(string),
- "string": option(string),
- },
- };
-
- let make:
- (~var: bool, unit) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let makeWithVariables:
- {. "var": bool} =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
-
- let query: string;
- let makeVariables: (~var: bool, unit) => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/snapshots.re b/tests_bucklescript/__tests__/snapshots.re
new file mode 100644
index 00000000..e331d089
--- /dev/null
+++ b/tests_bucklescript/__tests__/snapshots.re
@@ -0,0 +1,306 @@
+open Jest;
+open Expect;
+
+type options = {cwd: string};
+type buffer;
+
+[@bs.module "path"] external resolve: (string, string) => string = "resolve";
+
+[@bs.module "child_process"]
+external execSync: (string, options) => buffer = "execSync";
+
+type errorObj = {message: string};
+type spawnResult = {
+ stdout: Js.Nullable.t(buffer),
+ stderr: Js.Nullable.t(buffer),
+ error: Js.Nullable.t(errorObj),
+};
+[@bs.module "child_process"]
+external spawnSync: (string, array(string), options) => spawnResult =
+ "spawnSync";
+
+[@bs.module "child_process"]
+external exec:
+ (string, options, (Js.nullable(Js.t({..})), string, string) => unit) =>
+ unit =
+ "exec";
+
+[@bs.module "fs"]
+external readdirSync: string => array(string) = "readdirSync";
+
+[@bs.module "fs"]
+external writeFileSync: (string, string) => unit = "writeFileSync";
+
+[@bs.module "os"] external platform: unit => string = "platform";
+
+[@bs.val] external dirname: string = "__dirname";
+[@bs.send] external toString: buffer => string = "toString";
+
+let win = platform() == "win32";
+
+let execSyncWithErr = (cmd, args, opts) => {
+ let result = spawnSync(cmd, args, opts);
+ let result =
+ switch (
+ Js.Nullable.toOption(result.stdout),
+ Js.Nullable.toOption(result.stderr),
+ Js.Nullable.toOption(result.error),
+ ) {
+ | (Some(stdout), Some(stderr), _) => (
+ toString(stdout),
+ toString(stderr),
+ )
+ | (_, _, Some(error)) => ("", error.message)
+ | _ => ("", "")
+ };
+ result;
+};
+
+let removeKnownError = error => {
+ Js.String.trim(
+ Js.String.replaceByRe(
+ Js.Re.fromStringWithFlags(
+ "node: \\/usr\\/lib\\/libstdc\\+\\+\\.so\\.6: no version information available \\(required by node\\)",
+ ~flags="g",
+ ),
+ "",
+ error,
+ ),
+ );
+};
+
+let refmt =
+ execSync(
+ "esy build echo \"#{@opam/reason.bin / }refmt\"",
+ {cwd: resolve(dirname, "../..")},
+ )
+ |> toString
+ |> Js.String.trim;
+
+let run_ppx = (path, opts, testType) => {
+ let result =
+ execSync(
+ (win ? "type " : "cat ")
+ ++ path
+ ++ " | "
+ ++ refmt
+ ++ " --parse re --print binary | ../_build/default/src/bucklescript_bin/bin.exe -schema ../graphql_schema.json "
+ ++ opts
+ ++ (win ? " - -o -" : " /dev/stdin /dev/stdout")
+ ++ " | "
+ ++ refmt
+ ++ " --parse binary --interface false",
+ {cwd: resolve(dirname, "..")},
+ )
+ |> toString;
+ writeFileSync("static_snapshots/" ++ testType ++ "/" ++ path, result);
+ result;
+};
+
+let tests =
+ readdirSync("operations")->Belt.Array.keep(Js.String.endsWith(".re"));
+
+describe("Legacy", () =>
+ tests
+ |> Array.iter(t => {
+ test(t, () =>
+ expect(run_ppx("operations/" ++ t, "-legacy", "legacy"))
+ |> toMatchSnapshot
+ )
+ })
+);
+
+describe("Objects", () =>
+ tests
+ |> Array.iter(t => {
+ test(t, () =>
+ expect(run_ppx("operations/" ++ t, "-objects", "objects"))
+ |> toMatchSnapshot
+ )
+ })
+);
+
+describe("Records", () =>
+ tests
+ |> Array.iter(t => {
+ test(t, () =>
+ expect(run_ppx("operations/" ++ t, "", "records"))
+ |> toMatchSnapshot
+ )
+ })
+);
+
+describe("Apollo", () =>
+ tests
+ |> Array.iter(t => {
+ test(t, () =>
+ expect(run_ppx("operations/" ++ t, "-apollo-mode", "apollo-mode"))
+ |> toMatchSnapshot
+ )
+ })
+);
+
+let get_bsb_error = (~ppxOptions, ~fileName, ~pathIn: string) => {
+ let (_output, err) =
+ execSyncWithErr(
+ "./node_modules/.bin/bsc",
+ [|
+ "-I",
+ "./utilities",
+ "-c",
+ "-w",
+ "-30",
+ "-ppx",
+ "../_build/default/src/bucklescript_bin/bin.exe " ++ ppxOptions,
+ pathIn ++ "/" ++ fileName,
+ |],
+ {cwd: resolve(dirname, "..")},
+ );
+ err;
+};
+
+let get_bsb_output = (~ppxOptions, ~fileName, ~pathIn: string) =>
+ execSyncWithErr(
+ "./node_modules/.bin/bsc",
+ [|
+ "-I",
+ "./utilities",
+ "-c",
+ "-w",
+ "-30",
+ "-ppx",
+ "../_build/default/src/bucklescript_bin/bin.exe " ++ ppxOptions,
+ pathIn ++ "/" ++ fileName,
+ |],
+ {cwd: resolve(dirname, "..")},
+ );
+
+let get_bsb_error_with_static_snapshot =
+ (~ppxOptions, ~fileName, ~pathIn, ~pathOut) => {
+ let stderr = get_bsb_error(~ppxOptions, ~fileName, ~pathIn);
+ let result = {
+ let lines = stderr |> Js.String.split("\n");
+ let stderr =
+ lines
+ |> Js.Array.reduce(
+ (p, ln) => {
+ p !== ""
+ ? p ++ "\n" ++ ln
+ : ln
+ |> Js.String.includes("operations/")
+ || ln
+ |> Js.String.includes("found a bug for you")
+ ? ln : p
+ },
+ "",
+ );
+ let cutPosition =
+ stderr |> Js.String.indexOf("Error while running external preprocessor");
+ let to_ = cutPosition > (-1) ? cutPosition : stderr |> Js.String.length;
+ stderr |> Js.String.substring(~from=0, ~to_) |> Js.String.trim;
+ };
+
+ let newFileName =
+ (
+ fileName
+ |> Js.String.substring(~from=0, ~to_=(fileName |> Js.String.length) - 3)
+ )
+ ++ ".txt";
+ writeFileSync({j|static_snapshots/$pathOut/$newFileName|j}, result ++ "\n");
+ result;
+};
+
+let get_bsb_output_with_static_snapshot =
+ (~ppxOptions, ~fileName, ~pathIn, ~pathOut) => {
+ let (output, err) = get_bsb_output(~ppxOptions, ~fileName, ~pathIn);
+ let newFileName =
+ (
+ fileName
+ |> Js.String.substring(~from=0, ~to_=(fileName |> Js.String.length) - 3)
+ )
+ ++ ".js";
+ writeFileSync({j|static_snapshots/$pathOut/$newFileName|j}, output);
+ (output, err);
+};
+
+let compile_utils = () =>
+ readdirSync("utilities")->Belt.Array.keep(Js.String.endsWith(".re"))
+ |> Array.iter(fileName => {
+ get_bsb_output(~ppxOptions="", ~pathIn="utilities", ~fileName)->ignore
+ });
+
+compile_utils();
+
+describe("Compilation (Objects)", () => {
+ tests
+ |> Array.iter(t => {
+ let (output, err) =
+ get_bsb_output_with_static_snapshot(
+ ~ppxOptions="-objects",
+ ~fileName=t,
+ ~pathIn="operations",
+ ~pathOut="objects/operations",
+ );
+ test(t, () =>
+ expect(output) |> toMatchSnapshot
+ );
+ test(t, () =>
+ expect(removeKnownError(err)) |> toBe("")
+ );
+ })
+});
+
+describe("Compilation (Records)", () => {
+ tests
+ |> Array.iter(t => {
+ let (output, err) =
+ get_bsb_output_with_static_snapshot(
+ ~ppxOptions="",
+ ~fileName=t,
+ ~pathIn="operations",
+ ~pathOut="records/operations",
+ );
+ test(t, () =>
+ expect(output) |> toMatchSnapshot
+ );
+ test(t, () => {
+ expect(removeKnownError(err)) |> toBe("")
+ });
+ })
+});
+
+let tests =
+ readdirSync("operations/errors")
+ ->Belt.Array.keep(Js.String.endsWith(".re"));
+
+describe("Errors (Records)", () =>
+ tests
+ |> Array.iter(t => {
+ let result =
+ get_bsb_error_with_static_snapshot(
+ ~ppxOptions="",
+ ~fileName=t,
+ ~pathIn="operations/errors",
+ ~pathOut="records/errors",
+ );
+ test(t, () =>
+ expect(result) |> toMatchSnapshot
+ );
+ })
+);
+
+describe("Errors (Objects)", () =>
+ tests
+ |> Array.iter(t => {
+ let result =
+ get_bsb_error_with_static_snapshot(
+ ~ppxOptions="-objects",
+ ~fileName=t,
+ ~pathIn="operations/errors",
+ ~pathOut="objects/errors",
+ );
+ test(t, () =>
+ expect(result) |> toMatchSnapshot
+ );
+ })
+);
diff --git a/tests_bucklescript/__tests__/subscription.re b/tests_bucklescript/__tests__/subscription.re
deleted file mode 100644
index e508cc9b..00000000
--- a/tests_bucklescript/__tests__/subscription.re
+++ /dev/null
@@ -1,25 +0,0 @@
-module MyQuery = [%graphql
- {|
- subscription {
- simpleSubscription {
- ...on Dog {
- name
- }
- ...on Human {
- name
- }
- }
- }
-|}
-];
-
-Jest.(
- describe("Subscriptions", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Printed query is a subscription", () =>
- expect(MyQuery.query |> Js.String.indexOf("subscription")) == 0
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/subscription.rei b/tests_bucklescript/__tests__/subscription.rei
deleted file mode 100644
index 28473dda..00000000
--- a/tests_bucklescript/__tests__/subscription.rei
+++ /dev/null
@@ -1,28 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "simpleSubscription": [
- | `Dog({. "name": string})
- | `Human({. "name": string})
- ],
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/typename.re b/tests_bucklescript/__tests__/typename.re
deleted file mode 100644
index a4af45ae..00000000
--- a/tests_bucklescript/__tests__/typename.re
+++ /dev/null
@@ -1,41 +0,0 @@
-module MyQuery = [%graphql
- {|
- {
- first: nestedObject {
- __typename
- inner {
- __typename
- inner {
- __typename
- field
- }
- }
- }
- }
-|}
-];
-
-Jest.(
- describe("Typename as implicit field", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Decodes typename as a non-nullable string", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {|
- {"first": {"__typename": "NestedObject", "inner": null}}
- |},
- ),
- ),
- )
- == {
- "first": {
- "__typename": "NestedObject",
- "inner": None,
- },
- }
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/typename.rei b/tests_bucklescript/__tests__/typename.rei
deleted file mode 100644
index 3faa5a5b..00000000
--- a/tests_bucklescript/__tests__/typename.rei
+++ /dev/null
@@ -1,39 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "first": {
- .
- "__typename": string,
- "inner":
- option({
- .
- "__typename": string,
- "inner":
- option({
- .
- "__typename": string,
- "field": string,
- }),
- }),
- },
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/union.re b/tests_bucklescript/__tests__/union.re
deleted file mode 100644
index b58456f5..00000000
--- a/tests_bucklescript/__tests__/union.re
+++ /dev/null
@@ -1,40 +0,0 @@
-module MyQuery = [%graphql
- {|
- {
- dogOrHuman {
- ...on Dog {
- name
- barkVolume
- }
-
- ...on Human {
- name
- }
- }
- }
-|}
-];
-
-Jest.(
- describe("Union types", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Decodes exhaustive query", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {| {
- "dogOrHuman": {
- "__typename": "Dog",
- "name": "Fido",
- "barkVolume": 123
- }
- } |},
- ),
- ),
- )
- == {"dogOrHuman": `Dog({"name": "Fido", "barkVolume": 123.0})}
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/union.rei b/tests_bucklescript/__tests__/union.rei
deleted file mode 100644
index 8cb95e88..00000000
--- a/tests_bucklescript/__tests__/union.rei
+++ /dev/null
@@ -1,35 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "dogOrHuman": [
- | `Dog(
- {
- .
- "name": string,
- "barkVolume": float,
- },
- )
- | `Human({. "name": string})
- ],
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
-
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/unionPartial.re b/tests_bucklescript/__tests__/unionPartial.re
deleted file mode 100644
index 6d7c1371..00000000
--- a/tests_bucklescript/__tests__/unionPartial.re
+++ /dev/null
@@ -1,35 +0,0 @@
-module MyQuery = [%graphql
- {|
- {
- dogOrHuman {
- ...on Dog {
- name
- barkVolume
- }
- }
- }
-|}
-];
-
-Jest.(
- describe("Union types", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Decodes non-exhaustive query", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {| {
- "dogOrHuman": {
- "__typename": "Human",
- "name": "Max"
- }
- } |},
- ),
- ),
- )
- == {"dogOrHuman": `Nonexhaustive}
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/unionPartial.rei b/tests_bucklescript/__tests__/unionPartial.rei
deleted file mode 100644
index 032c784b..00000000
--- a/tests_bucklescript/__tests__/unionPartial.rei
+++ /dev/null
@@ -1,33 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "dogOrHuman": [
- | `Dog(
- {
- .
- "name": string,
- "barkVolume": float,
- },
- )
- | `Nonexhaustive
- ],
- };
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/variant.re b/tests_bucklescript/__tests__/variant.re
deleted file mode 100644
index 8606f973..00000000
--- a/tests_bucklescript/__tests__/variant.re
+++ /dev/null
@@ -1,40 +0,0 @@
-module MyQuery = [%graphql
- {|
- mutation {
- mutationWithError @bsVariant {
- value {
- stringField
- }
-
- errors {
- field
- message
- }
- }
- }
-|}
-];
-
-Jest.(
- describe("Non-union variant through @bsVariant", () => {
- open Expect;
- open! Expect.Operators;
-
- test("Converts object into variant", () =>
- expect(
- MyQuery.parse(
- Js.Json.parseExn(
- {| {
- "mutationWithError": {
- "value": {
- "stringField": "a string"
- }
- }
- } |},
- ),
- ),
- )
- == {"mutationWithError": `Value({"stringField": "a string"})}
- );
- })
-);
diff --git a/tests_bucklescript/__tests__/variant.rei b/tests_bucklescript/__tests__/variant.rei
deleted file mode 100644
index 0b6fa0b5..00000000
--- a/tests_bucklescript/__tests__/variant.rei
+++ /dev/null
@@ -1,34 +0,0 @@
-module MyQuery: {
- type t = {
- .
- "mutationWithError": [
- | `Value({. "stringField": string})
- | `Errors(
- array({
- .
- "field": [ | `FIRST | `SECOND | `THIRD],
- "message": string,
- }),
- )
- ],
- };
-
- let make:
- unit =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let makeWithVariables:
- Js.t({.}) =>
- {
- .
- "parse": Js.Json.t => t,
- "query": string,
- "variables": Js.Json.t,
- };
- let query: string;
- let makeVariables: unit => Js.Json.t;
-};
diff --git a/tests_bucklescript/__tests__/apolloMode.re b/tests_bucklescript/apollo-mode/apolloMode.re
similarity index 100%
rename from tests_bucklescript/__tests__/apolloMode.re
rename to tests_bucklescript/apollo-mode/apolloMode.re
diff --git a/tests_bucklescript/__tests__/apolloMode.rei b/tests_bucklescript/apollo-mode/apolloMode.rei
similarity index 100%
rename from tests_bucklescript/__tests__/apolloMode.rei
rename to tests_bucklescript/apollo-mode/apolloMode.rei
diff --git a/tests_bucklescript/bsconfig.json b/tests_bucklescript/bsconfig.json
index a4c3894a..adc1ca4c 100644
--- a/tests_bucklescript/bsconfig.json
+++ b/tests_bucklescript/bsconfig.json
@@ -1,19 +1,26 @@
{
"name": "tests_bucklescript",
"sources": ["__tests__"],
- "ppx-flags": [
- [
- "../_build/default/src/bucklescript_bin/bin.exe",
- "-apollo-mode",
- "-lean-parse",
- "-schema ../graphql_schema.json"
- ]
- ],
+ "package-specs": {
+ "module": "commonjs",
+ "in-source": true
+ },
+ "suffix": ".bs.js",
+ "ppx-flags": ["../_build/default/src/bucklescript_bin/bin.exe"],
"bs-dependencies": ["@glennsl/bs-jest"],
"refmt": 3,
"bsc-flags": ["-bs-super-errors"],
"warnings": {
- "number": "+A-48",
- "error": "+A-3-32-44"
+ "number": "+A-48-30-42-40",
+ "error": "+A"
+ },
+ "graphql": {
+ "apollo-mode": false,
+ "mode": "records",
+ "schema": "../graphql_schema.json",
+ "custom-fields": {
+ "DateTime": "DateTime",
+ "Color": "Color"
+ }
}
}
diff --git a/tests_bucklescript/how_to_convert_the_ast.md b/tests_bucklescript/how_to_convert_the_ast.md
new file mode 100644
index 00000000..cad88435
--- /dev/null
+++ b/tests_bucklescript/how_to_convert_the_ast.md
@@ -0,0 +1,7 @@
+# How to convert the AST
+
+install the latest ReasonML version and build it, because the currently published version of reason-cli is not compatible with ocaml 4.6.0.
+
+```
+cat test4.re | ../../reason/_esy/default/build/default/src/refmt/refmt_impl.exe --parse re --print binary | ../_build/default/src/bucklescript_bin/bin.exe -records /dev/stdin /dev/stdout | ../../reason/_esy/default/build/default/src/refmt/refmt_impl.exe --parse binary --print re --interface false
+```
diff --git a/tests_bucklescript/operations/.gitignore b/tests_bucklescript/operations/.gitignore
new file mode 100644
index 00000000..30a13570
--- /dev/null
+++ b/tests_bucklescript/operations/.gitignore
@@ -0,0 +1,3 @@
+*
+!.gitignore
+!*.re
diff --git a/tests_bucklescript/operations/argNamedQuery.re b/tests_bucklescript/operations/argNamedQuery.re
new file mode 100644
index 00000000..2de3ef13
--- /dev/null
+++ b/tests_bucklescript/operations/argNamedQuery.re
@@ -0,0 +1,7 @@
+module MyQuery = [%graphql
+ {|
+ query ($query: Int!) {
+ argNamedQuery(query: $query)
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/comment.re b/tests_bucklescript/operations/comment.re
new file mode 100644
index 00000000..e2159896
--- /dev/null
+++ b/tests_bucklescript/operations/comment.re
@@ -0,0 +1,7 @@
+module MyQuery = [%graphql
+ {|
+ query ($arg: NonrecursiveInput!) {
+ nonrecursiveInput(arg: $arg) # comment to test
+ }
+ |}
+];
diff --git a/tests_bucklescript/operations/customDecoder.re b/tests_bucklescript/operations/customDecoder.re
new file mode 100644
index 00000000..396c4690
--- /dev/null
+++ b/tests_bucklescript/operations/customDecoder.re
@@ -0,0 +1,20 @@
+module StringOfInt = {
+ let parse = string_of_int;
+ let serialize = int_of_string;
+ type t = string;
+};
+module IntOfString = {
+ let parse = int_of_string;
+ let serialize = string_of_int;
+ type t = int;
+};
+module MyQuery = [%graphql
+ {|
+ {
+ variousScalars {
+ string @ppxDecoder(module: "IntOfString")
+ int @ppxDecoder(module: "StringOfInt")
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/customScalars.re b/tests_bucklescript/operations/customScalars.re
new file mode 100644
index 00000000..b1dd8734
--- /dev/null
+++ b/tests_bucklescript/operations/customScalars.re
@@ -0,0 +1,10 @@
+module MyQuery = [%graphql
+ {|
+ query ($opt: CustomScalar, $req: CustomScalar!) {
+ customScalarField(argOptional: $opt, argRequired: $req) {
+ nullable
+ nonNullable
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/customTypes.re b/tests_bucklescript/operations/customTypes.re
new file mode 100644
index 00000000..37f698b6
--- /dev/null
+++ b/tests_bucklescript/operations/customTypes.re
@@ -0,0 +1,45 @@
+module Color = {
+ type t =
+ | Red
+ | Green
+ | Blue;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some("green") => Green
+ | Some("blue") => Blue
+ | Some("red")
+ | Some(_)
+ | None => Red
+ };
+ let serialize = color =>
+ (
+ switch (color) {
+ | Red => "red"
+ | Green => "green"
+ | Blue => "blue"
+ }
+ )
+ |> Js.Json.string;
+};
+module DateTime = {
+ type t = Js.Date.t;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(str) => str |> Js.Date.fromString
+ | None => Js.Date.make()
+ };
+ let serialize = date => date |> Js.Date.toISOString |> Js.Json.string;
+};
+
+module MyQuery = [%graphql
+ {|
+ query {
+ customFields {
+ currentTime
+ favoriteColor
+ futureTime
+ nullableColor @ppxDecoder(module: "Color")
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/defaultObjectValueOnScalar.re b/tests_bucklescript/operations/defaultObjectValueOnScalar.re
new file mode 100644
index 00000000..0be690f3
--- /dev/null
+++ b/tests_bucklescript/operations/defaultObjectValueOnScalar.re
@@ -0,0 +1,10 @@
+module MyQuery = [%graphql
+ {|
+ query {
+ defaultObjectValueOnScalar(
+ filter: { some: { json: "value" } }
+ arg: {field: "otherValue"}
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/enumInput.re b/tests_bucklescript/operations/enumInput.re
new file mode 100644
index 00000000..434b80e8
--- /dev/null
+++ b/tests_bucklescript/operations/enumInput.re
@@ -0,0 +1,7 @@
+module MyQuery = [%graphql
+ {|
+ query ($arg: SampleField!) {
+ enumInput(arg: $arg)
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/.gitignore b/tests_bucklescript/operations/errors/.gitignore
new file mode 100644
index 00000000..30a13570
--- /dev/null
+++ b/tests_bucklescript/operations/errors/.gitignore
@@ -0,0 +1,3 @@
+*
+!.gitignore
+!*.re
diff --git a/tests_bucklescript/operations/errors/InvalidObjectValues2.re b/tests_bucklescript/operations/errors/InvalidObjectValues2.re
new file mode 100644
index 00000000..e2410ba8
--- /dev/null
+++ b/tests_bucklescript/operations/errors/InvalidObjectValues2.re
@@ -0,0 +1,23 @@
+/**
+ * Missing field
+ */
+module MyQuery = [%graphql
+ {|
+ query {
+ invalidObjectValues(
+ nonRec: {
+ nullableArray: [""]
+ field: ""
+ enum: FIRST
+ }
+ rec: {
+ otherField: ""
+ inner: {
+ otherField: ""
+ }
+ enum: FIRST
+ }
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/InvalidObjectValues3.re b/tests_bucklescript/operations/errors/InvalidObjectValues3.re
new file mode 100644
index 00000000..0fc2495f
--- /dev/null
+++ b/tests_bucklescript/operations/errors/InvalidObjectValues3.re
@@ -0,0 +1,24 @@
+/**
+ * Mismatched simple type
+ */
+module MyQuery = [%graphql
+ {|
+ query {
+ invalidObjectValues(
+ nonRec: {
+ nonNullableField: 5
+ nullableArray: [""]
+ field: ""
+ enum: FIRST
+ }
+ rec: {
+ otherField: ""
+ inner: {
+ otherField: ""
+ }
+ enum: FIRST
+ }
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/InvalidObjectValues4.re b/tests_bucklescript/operations/errors/InvalidObjectValues4.re
new file mode 100644
index 00000000..78bbef16
--- /dev/null
+++ b/tests_bucklescript/operations/errors/InvalidObjectValues4.re
@@ -0,0 +1,24 @@
+/**
+ * Invalid list type
+ */
+module MyQuery = [%graphql
+ {|
+ query {
+ invalidObjectValues(
+ nonRec: {
+ nonNullableField: "!"
+ nullableArray: [2]
+ field: ""
+ enum: FIRST
+ }
+ rec: {
+ otherField: ""
+ inner: {
+ otherField: ""
+ }
+ enum: FIRST
+ }
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/InvalidObjectValues5.re b/tests_bucklescript/operations/errors/InvalidObjectValues5.re
new file mode 100644
index 00000000..3b360fc5
--- /dev/null
+++ b/tests_bucklescript/operations/errors/InvalidObjectValues5.re
@@ -0,0 +1,25 @@
+/**
+ * Custom scalars should not throw
+ */
+module MyQuery = [%graphql
+ {|
+ query {
+ invalidObjectValues(
+ nonRec: {
+ nonNullableField: "!"
+ nullableArray: [""]
+ field: ""
+ enum: FIRST
+ custom: { some: "value" }
+ }
+ rec: {
+ otherField: ""
+ inner: {
+ otherField: ""
+ }
+ enum: []
+ }
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/deprecatedFields.re b/tests_bucklescript/operations/errors/deprecatedFields.re
new file mode 100644
index 00000000..f9d85d31
--- /dev/null
+++ b/tests_bucklescript/operations/errors/deprecatedFields.re
@@ -0,0 +1,11 @@
+module MyQuery = [%graphql
+ {|
+ query {
+ deprecatedFields {
+ field1
+ field2
+ deprecatedField
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidArgVariableType1.re b/tests_bucklescript/operations/errors/invalidArgVariableType1.re
new file mode 100644
index 00000000..6450e7fe
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidArgVariableType1.re
@@ -0,0 +1,13 @@
+/**
+ * Required argument error should take prioroty over type error
+ * Expecting this to be a required related error, not a type one
+ */
+module MyQuery = [%graphql
+ {|
+ query invalidArgValues {
+ invalidArgValues(
+ stringRequired: $arg
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidArgVariableType2.re b/tests_bucklescript/operations/errors/invalidArgVariableType2.re
new file mode 100644
index 00000000..163f7d42
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidArgVariableType2.re
@@ -0,0 +1,12 @@
+/**
+ * If an arg is required but a variable is not, it should throw an error
+ */
+module MyQuery = [%graphql
+ {|
+ query invalidArgValues($arg: String) {
+ invalidArgValues(
+ stringRequired: $arg
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidArgVariableType3.re b/tests_bucklescript/operations/errors/invalidArgVariableType3.re
new file mode 100644
index 00000000..efd06da3
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidArgVariableType3.re
@@ -0,0 +1,13 @@
+/**
+ * These are just mismatched types, the optional string should throw an error
+ */
+module MyQuery = [%graphql
+ {|
+ query invalidArgValues($arg: String!, $arg2: Int) {
+ invalidArgValues(
+ stringRequired: $arg
+ string: $arg2
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidArgVariableType4.re b/tests_bucklescript/operations/errors/invalidArgVariableType4.re
new file mode 100644
index 00000000..c7748c75
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidArgVariableType4.re
@@ -0,0 +1,15 @@
+/**
+ * Custom scalars should accept anything, so the first line should not throw
+ * The second one should expect a generic Object type (no checking of fields), so it should throw
+ */
+module MyQuery = [%graphql
+ {|
+ query invalidArgValues($arg: EmbeddedInput!, $arg2: Int) {
+ invalidArgValues(
+ custom: $arg
+ obj: $arg2
+ stringRequired: ""
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidArgVariableType5.re b/tests_bucklescript/operations/errors/invalidArgVariableType5.re
new file mode 100644
index 00000000..e4581ea6
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidArgVariableType5.re
@@ -0,0 +1,13 @@
+/**
+ * ID should be equal to string, so the first line should not throw
+ */
+module MyQuery = [%graphql
+ {|
+ query invalidArgValues($arg: String) {
+ invalidArgValues(
+ id: $arg
+ stringRequired: $arg
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidArgVariableType6.re b/tests_bucklescript/operations/errors/invalidArgVariableType6.re
new file mode 100644
index 00000000..8bd46b19
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidArgVariableType6.re
@@ -0,0 +1,13 @@
+/**
+ * Lists should be generic and not their innermost type, so this should fail
+ */
+module MyQuery = [%graphql
+ {|
+ query invalidArgValues($arg: String) {
+ invalidArgValues(
+ list: $arg
+ stringRequired: ""
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidDefaultValue1.re b/tests_bucklescript/operations/errors/invalidDefaultValue1.re
new file mode 100644
index 00000000..de8647e4
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidDefaultValue1.re
@@ -0,0 +1,25 @@
+/**
+ * Should not throw
+ */
+module Case1 = [%graphql
+ {|
+ query invalidDefaultValues {
+ invalidDefaultValues(
+ custom: 5
+ )
+ }
+|}
+];
+
+/**
+ * Should fail with "String"
+ */
+module Case2 = [%graphql
+ {|
+ query invalidDefaultValues {
+ invalidDefaultValues(
+ int: "Some string"
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidDefaultValue2.re b/tests_bucklescript/operations/errors/invalidDefaultValue2.re
new file mode 100644
index 00000000..27d140bd
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidDefaultValue2.re
@@ -0,0 +1,12 @@
+/**
+ * Should throw with type "InputObject"
+ */
+module Case1 = [%graphql
+ {|
+ query invalidDefaultValues {
+ invalidDefaultValues(
+ int: {test: "xxx"}
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidDefaultValue3.re b/tests_bucklescript/operations/errors/invalidDefaultValue3.re
new file mode 100644
index 00000000..57521515
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidDefaultValue3.re
@@ -0,0 +1,25 @@
+/**
+ * Should not throw
+ */
+module Case1 = [%graphql
+ {|
+ query invalidDefaultValues {
+ invalidDefaultValues(
+ id: "Some Id"
+ )
+ }
+|}
+];
+
+/**
+ * Should throw with type "Int"
+ */
+module Case2 = [%graphql
+ {|
+ query invalidDefaultValues {
+ invalidDefaultValues(
+ id: 5
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidDefaultValue4.re b/tests_bucklescript/operations/errors/invalidDefaultValue4.re
new file mode 100644
index 00000000..893bae80
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidDefaultValue4.re
@@ -0,0 +1,12 @@
+/**
+ * Should throw with type List
+ */
+module Case1 = [%graphql
+ {|
+ query invalidDefaultValues {
+ invalidDefaultValues(
+ string: ["1", "2"]
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidObjectValues1.re b/tests_bucklescript/operations/errors/invalidObjectValues1.re
new file mode 100644
index 00000000..07cee1bf
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidObjectValues1.re
@@ -0,0 +1,27 @@
+/**
+ * Nested objects
+ */
+module MyQuery = [%graphql
+ {|
+ query {
+ invalidObjectValues(
+ nonRec: {
+ nonNullableField: "!"
+ nullableArray: [""]
+ field: ""
+ enum: FIRST
+ }
+ rec: {
+ otherField: ""
+ inner: {
+ otherField: ""
+ inner: {
+ otherField: 5
+ }
+ }
+ enum: FIRST
+ }
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidObjectValues6.re b/tests_bucklescript/operations/errors/invalidObjectValues6.re
new file mode 100644
index 00000000..96656923
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidObjectValues6.re
@@ -0,0 +1,24 @@
+/**
+ * This should not throw as it's an empty list
+ */
+module MyQuery = [%graphql
+ {|
+ query {
+ invalidObjectValuesLst(
+ embeddedList: []
+ )
+ }
+|}
+];
+/**
+ * This should throw as it's not a list
+ */
+module MyQuery2 = [%graphql
+ {|
+ query {
+ invalidObjectValuesLst(
+ embeddedList: {field: ""}
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/invalidObjectValues7.re b/tests_bucklescript/operations/errors/invalidObjectValues7.re
new file mode 100644
index 00000000..56c924ca
--- /dev/null
+++ b/tests_bucklescript/operations/errors/invalidObjectValues7.re
@@ -0,0 +1,24 @@
+/**
+ * This should not throw as it's the right object shape inside the list
+ */
+module MyQuery = [%graphql
+ {|
+ query {
+ invalidObjectValuesLst(
+ embeddedList: [{field: ""}]
+ )
+ }
+|}
+];
+/**
+ * This should throw as it's not the right shape
+ */
+module MyQuery2 = [%graphql
+ {|
+ query {
+ invalidObjectValuesLst(
+ embeddedList: [{field: 5}]
+ )
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/missingField1.re b/tests_bucklescript/operations/errors/missingField1.re
new file mode 100644
index 00000000..8c8ba686
--- /dev/null
+++ b/tests_bucklescript/operations/errors/missingField1.re
@@ -0,0 +1,11 @@
+module MyQuery = [%graphql
+ {|
+ query ($opt: CustomScalar, $req: CustomScalar!) {
+ customScalarField(argOptional: $opt, argRequired: $req) {
+ nullable
+ thisFieldDoesNotExist
+ nonNullable
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/missingField2.re b/tests_bucklescript/operations/errors/missingField2.re
new file mode 100644
index 00000000..b5cfe9a0
--- /dev/null
+++ b/tests_bucklescript/operations/errors/missingField2.re
@@ -0,0 +1,18 @@
+module Fragments = [%graphql
+ {|
+ fragment ListFragment on Lists {
+ nullableOfNullable
+ nullableOfNonNullable
+ }
+|}
+];
+
+module MyQuery = [%graphql
+ {|
+ query {
+ l1: thisTypeDoesNotExist {
+ ...Fragments
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/missingField3.re b/tests_bucklescript/operations/errors/missingField3.re
new file mode 100644
index 00000000..619dcd6f
--- /dev/null
+++ b/tests_bucklescript/operations/errors/missingField3.re
@@ -0,0 +1,19 @@
+module Fragments = [%graphql
+ {|
+ fragment ListFragment on Lists {
+ nullableOfNullable
+ nullableOfNonNullable
+ }
+|}
+];
+
+module MyQuery = [%graphql
+ {|
+ query {
+ l1: lists {
+ ...Fragments
+ doesNotExist
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/errors/missingFragment.re b/tests_bucklescript/operations/errors/missingFragment.re
new file mode 100644
index 00000000..1be50077
--- /dev/null
+++ b/tests_bucklescript/operations/errors/missingFragment.re
@@ -0,0 +1,8 @@
+module Fragment = [%graphql
+ {|
+ fragment ListFragment on UnknownFragment {
+ nullableOfNullable
+ nullableOfNonNullable
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/explicit_object_record.re b/tests_bucklescript/operations/explicit_object_record.re
new file mode 100644
index 00000000..af8e8ad5
--- /dev/null
+++ b/tests_bucklescript/operations/explicit_object_record.re
@@ -0,0 +1,27 @@
+module RecordsQuery = [%graphql
+ {|
+ {
+ lists {
+ nullableOfNullable
+ nullableOfNonNullable
+ nonNullableOfNullable
+ nonNullableOfNonNullable
+ }
+ }
+|};
+ {records: true}
+];
+
+module ObjectsQuery = [%graphql
+ {|
+ {
+ lists {
+ nullableOfNullable
+ nullableOfNonNullable
+ nonNullableOfNullable
+ nonNullableOfNonNullable
+ }
+ }
+|};
+ {objects: true}
+];
diff --git a/tests_bucklescript/operations/extensions.re b/tests_bucklescript/operations/extensions.re
new file mode 100644
index 00000000..7445d7c4
--- /dev/null
+++ b/tests_bucklescript/operations/extensions.re
@@ -0,0 +1,32 @@
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ type t_variables;
+ };
+ type t;
+ type t_variables;
+
+ let query: string;
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+};
+
+module Parent = {
+ module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => ();
+ };
+};
+
+[%graphql
+ {|
+ query Bla {
+ lists {
+ nullableOfNullable
+ nullableOfNonNullable
+ nonNullableOfNullable
+ nonNullableOfNonNullable
+ }
+ }
+ |};
+ {extend: "Parent.ExtendQuery"}
+];
diff --git a/tests_bucklescript/operations/fragmentDefinition.re b/tests_bucklescript/operations/fragmentDefinition.re
new file mode 100644
index 00000000..5e7d19e7
--- /dev/null
+++ b/tests_bucklescript/operations/fragmentDefinition.re
@@ -0,0 +1,76 @@
+module GraphQL_PPX = {
+ // mock
+ let deepMerge = (json1, _) => {
+ json1;
+ };
+};
+
+[%graphql
+ {|
+ fragment ListFragment on Lists {
+ nullableOfNullable
+ nullableOfNonNullable
+ }
+
+ # remove as soon as ListFragment is available via Fragments.ListFragment
+ fragment Another on Lists {
+ nullableOfNonNullable
+ }
+
+ fragment FragmentWithArgs on Lists @argumentDefinitions(arg1: {type: "String"}) {
+ listWithArg(arg1: $arg1)
+ }
+|}
+];
+
+module InlineFragment = {
+ [%graphql
+ {|
+ fragment InlineListFragment on Lists {
+ nullableOfNullable
+ nullableOfNonNullable
+ }
+ |};
+ {inline: true}
+ ];
+};
+
+[%graphql
+ {|
+ query MyQuery($arg1: String) {
+ l1: lists {
+ ...ListFragment
+ }
+
+ l2: lists {
+ ...ListFragment @ppxField(name: "frag1")
+ ...ListFragment @ppxField(name: "frag2")
+ }
+
+ l3: lists {
+ nullableOfNullable
+ ...ListFragment @bsField(name: "frag1")
+ ...ListFragment @bsField(name: "frag2")
+ }
+
+ l4: lists {
+ nullableOfNullable
+ ...InlineFragment
+ }
+
+ l5: lists {
+ ...FragmentWithArgs @arguments(arg1: $arg1)
+ }
+ }
+|}
+];
+
+module MyQuery2 = [%graphql
+ {|
+ query {
+ lists {
+ ...ListFragment
+ }
+ }
+ |}
+];
diff --git a/tests_bucklescript/operations/interface.re b/tests_bucklescript/operations/interface.re
new file mode 100644
index 00000000..c79863ee
--- /dev/null
+++ b/tests_bucklescript/operations/interface.re
@@ -0,0 +1,26 @@
+/* TODO: fix */
+/* module QueryWithFragments = [%graphql
+ {|
+ query {
+ users {
+ id
+ ... on AdminUser {
+ name
+ }
+ ... on AnonymousUser {
+ anonymousId
+ }
+ }
+ }
+ |}
+ ];
+
+ module QueryWithoutFragments = [%graphql
+ {|
+ query {
+ users {
+ id
+ }
+ }
+ |}
+ ]; */
diff --git a/tests_bucklescript/operations/lists.re b/tests_bucklescript/operations/lists.re
new file mode 100644
index 00000000..0e7e4fc5
--- /dev/null
+++ b/tests_bucklescript/operations/lists.re
@@ -0,0 +1,12 @@
+module MyQuery = [%graphql
+ {|
+ {
+ lists {
+ nullableOfNullable
+ nullableOfNonNullable
+ nonNullableOfNullable
+ nonNullableOfNonNullable
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/listsArgs.re b/tests_bucklescript/operations/listsArgs.re
new file mode 100644
index 00000000..868859e8
--- /dev/null
+++ b/tests_bucklescript/operations/listsArgs.re
@@ -0,0 +1,17 @@
+module MyQuery = [%graphql
+ {|
+ query (
+ $nullableOfNullable: [String],
+ $nullableOfNonNullable: [String!],
+ $nonNullableOfNullable: [String]!,
+ $nonNullableOfNonNullable: [String!]!,
+ ) {
+ listsInput(arg: {
+ nullableOfNullable: $nullableOfNullable,
+ nullableOfNonNullable: $nullableOfNonNullable,
+ nonNullableOfNullable: $nonNullableOfNullable,
+ nonNullableOfNonNullable: $nonNullableOfNonNullable,
+ })
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/listsInput.re b/tests_bucklescript/operations/listsInput.re
new file mode 100644
index 00000000..fe0525e0
--- /dev/null
+++ b/tests_bucklescript/operations/listsInput.re
@@ -0,0 +1,7 @@
+module MyQuery = [%graphql
+ {|
+ query ($arg: ListsInput!) {
+ listsInput(arg: $arg)
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/mutation.re b/tests_bucklescript/operations/mutation.re
new file mode 100644
index 00000000..8e5aa3a6
--- /dev/null
+++ b/tests_bucklescript/operations/mutation.re
@@ -0,0 +1,16 @@
+module MyQuery = [%graphql
+ {|
+ mutation {
+ mutationWithError {
+ value {
+ stringField
+ }
+
+ errors {
+ field
+ message
+ }
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/mutationWithArgs.re b/tests_bucklescript/operations/mutationWithArgs.re
new file mode 100644
index 00000000..58899cee
--- /dev/null
+++ b/tests_bucklescript/operations/mutationWithArgs.re
@@ -0,0 +1,7 @@
+module MyQuery = [%graphql
+ {|
+ mutation MyMutation($required: String!) {
+ optionalInputArgs(required: $required, anotherRequired: "val")
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/mutationWithArgsAndNoRecords.re b/tests_bucklescript/operations/mutationWithArgsAndNoRecords.re
new file mode 100644
index 00000000..8932b261
--- /dev/null
+++ b/tests_bucklescript/operations/mutationWithArgsAndNoRecords.re
@@ -0,0 +1,8 @@
+module MyQuery = [%graphql
+ {|
+ mutation MyMutation($required: String!) {
+ optionalInputArgs(required: $required, anotherRequired: "val")
+ }
+|};
+ {records: false}
+];
diff --git a/tests_bucklescript/operations/nested.re b/tests_bucklescript/operations/nested.re
new file mode 100644
index 00000000..4f3e5677
--- /dev/null
+++ b/tests_bucklescript/operations/nested.re
@@ -0,0 +1,36 @@
+type record = {
+ f1: string,
+ f2: string,
+};
+
+module MyQuery = [%graphql
+ {|
+ {
+ first: nestedObject {
+ inner {
+ inner {
+ field
+ }
+ }
+ }
+
+ second: nestedObject {
+ inner {
+ inner @bsRecord {
+ f1: field
+ f2: field
+ }
+ }
+ }
+
+ # reserved word
+ let: nestedObject {
+ inner {
+ inner {
+ field
+ }
+ }
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/nonrecursiveInput.re b/tests_bucklescript/operations/nonrecursiveInput.re
new file mode 100644
index 00000000..596ebc58
--- /dev/null
+++ b/tests_bucklescript/operations/nonrecursiveInput.re
@@ -0,0 +1,16 @@
+module MyQuery = [%graphql
+ {|
+ query ($arg: NonrecursiveInput!) {
+ nonrecursiveInput(arg: $arg)
+ }
+ |}
+];
+
+module MyQuery2 = [%graphql
+ {|
+ query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {
+ scalarsInput(arg: $arg)
+ more: scalarsInput(arg: $arg2)
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/omitFutureValueEnum.re b/tests_bucklescript/operations/omitFutureValueEnum.re
new file mode 100644
index 00000000..ed2d7ec2
--- /dev/null
+++ b/tests_bucklescript/operations/omitFutureValueEnum.re
@@ -0,0 +1,46 @@
+/**
+ * Normal
+ */
+module Normal = [%graphql
+ {|
+ mutation {
+ mutationWithError {
+ errors {
+ message
+ field
+ }
+ }
+ }
+|}
+];
+/**
+ * By config
+ */
+module ByConfig = [%graphql
+ {|
+ mutation {
+ mutationWithError {
+ errors {
+ message
+ field
+ }
+ }
+ }
+|};
+ {future_added_value: false}
+];
+/**
+ * By directive
+ */
+module ByDirective = [%graphql
+ {|
+ mutation {
+ mutationWithError {
+ errors {
+ message
+ field @ppxOmitFutureValue
+ }
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/omitFutureValueUnion.re b/tests_bucklescript/operations/omitFutureValueUnion.re
new file mode 100644
index 00000000..887d88d8
--- /dev/null
+++ b/tests_bucklescript/operations/omitFutureValueUnion.re
@@ -0,0 +1,58 @@
+/**
+ * Normal
+ */
+module Normal = [%graphql
+ {|
+ {
+ dogOrHuman {
+ ...on Dog {
+ name
+ barkVolume
+ }
+
+ ...on Human {
+ name
+ }
+ }
+ }
+|}
+];
+/**
+ * By config
+ */
+module ByConfig = [%graphql
+ {|
+ {
+ dogOrHuman {
+ ...on Dog {
+ name
+ barkVolume
+ }
+
+ ...on Human {
+ name
+ }
+ }
+ }
+|};
+ {future_added_value: false}
+];
+/**
+ * By directive
+ */
+module ByDirective = [%graphql
+ {|
+ {
+ dogOrHuman @ppxOmitFutureValue {
+ ...on Dog {
+ name
+ barkVolume
+ }
+
+ ...on Human {
+ name
+ }
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/pokedexApolloMode.re b/tests_bucklescript/operations/pokedexApolloMode.re
new file mode 100644
index 00000000..de0db7e2
--- /dev/null
+++ b/tests_bucklescript/operations/pokedexApolloMode.re
@@ -0,0 +1,11 @@
+module MyQuery = [%graphql
+ {|
+ {
+ pokemon(name: "Pikachu") {
+ id
+ name
+ }
+ }
+ |};
+ {schema: "../pokedex_schema.json"}
+];
diff --git a/tests_bucklescript/operations/pokedexScalars.re b/tests_bucklescript/operations/pokedexScalars.re
new file mode 100644
index 00000000..89e7de2d
--- /dev/null
+++ b/tests_bucklescript/operations/pokedexScalars.re
@@ -0,0 +1,11 @@
+module MyQuery = [%graphql
+ {|
+ query pokemon($id: String, $name: String) {
+ pokemon(name: $name, id: $id) {
+ id
+ name
+ }
+ }
+ |};
+ {schema: "../pokedex_schema.json"}
+];
diff --git a/tests_bucklescript/operations/record.re b/tests_bucklescript/operations/record.re
new file mode 100644
index 00000000..23dd10c0
--- /dev/null
+++ b/tests_bucklescript/operations/record.re
@@ -0,0 +1,70 @@
+type scalars = {
+ string,
+ int,
+};
+
+type dog = {
+ name: string,
+ barkVolume: float,
+};
+
+type oneFieldQuery = {nullableString: option(string)};
+module MyQuery = [%graphql
+ {|
+ {
+ variousScalars @ppxRecord @ppxAs(type: "scalars") {
+ string
+ int
+ }
+ }
+|}
+];
+module OneFieldQuery = [%graphql
+ {|
+ {
+ variousScalars @bsRecord {
+ nullableString
+ }
+ }
+|}
+];
+module ExternalFragmentQuery = [%graphql
+ {|
+ fragment Fragment on VariousScalars @bsRecord {
+ string
+ int
+ }
+ {
+ variousScalars {
+ ...Fragment
+ }
+ }
+|}
+];
+module InlineFragmentQuery = [%graphql
+ {|
+ {
+ dogOrHuman {
+ ...on Dog @bsRecord {
+ name
+ barkVolume
+ }
+ }
+ }
+|}
+];
+module UnionExternalFragmentQuery = [%graphql
+ {|
+ fragment DogFragment on Dog @bsRecord {
+ name
+ barkVolume
+ }
+ {
+ dogOrHuman {
+ ...on Dog {
+ ...DogFragment
+ }
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/recursiveInput.re b/tests_bucklescript/operations/recursiveInput.re
new file mode 100644
index 00000000..9f207fcd
--- /dev/null
+++ b/tests_bucklescript/operations/recursiveInput.re
@@ -0,0 +1,7 @@
+module MyQuery = [%graphql
+ {|
+ query ($arg: RecursiveInput!) {
+ recursiveInput(arg: $arg)
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/scalars.re b/tests_bucklescript/operations/scalars.re
new file mode 100644
index 00000000..44f5b131
--- /dev/null
+++ b/tests_bucklescript/operations/scalars.re
@@ -0,0 +1,18 @@
+module MyQuery = [%graphql
+ {|
+ {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/scalarsArgs.re b/tests_bucklescript/operations/scalarsArgs.re
new file mode 100644
index 00000000..e7c6944d
--- /dev/null
+++ b/tests_bucklescript/operations/scalarsArgs.re
@@ -0,0 +1,29 @@
+module MyQuery = [%graphql
+ {|
+ query (
+ $nullableString: String,
+ $string: String!,
+ $nullableInt: Int,
+ $int: Int!,
+ $nullableFloat: Float,
+ $float: Float!,
+ $nullableBoolean: Boolean,
+ $boolean: Boolean!,
+ $nullableID: ID,
+ $id: ID!,
+ ) {
+ scalarsInput(arg: {
+ nullableString: $nullableString,
+ string: $string,
+ nullableInt: $nullableInt,
+ int: $int,
+ nullableFloat: $nullableFloat,
+ float: $float,
+ nullableBoolean: $nullableBoolean,
+ boolean: $boolean,
+ nullableID: $nullableID,
+ id: $id,
+ })
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/scalarsInput.re b/tests_bucklescript/operations/scalarsInput.re
new file mode 100644
index 00000000..a78a85d5
--- /dev/null
+++ b/tests_bucklescript/operations/scalarsInput.re
@@ -0,0 +1,7 @@
+module MyQuery = [%graphql
+ {|
+ query ($arg: VariousScalarsInput!) {
+ scalarsInput(arg: $arg)
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/skipDirectives.re b/tests_bucklescript/operations/skipDirectives.re
new file mode 100644
index 00000000..4bb67f43
--- /dev/null
+++ b/tests_bucklescript/operations/skipDirectives.re
@@ -0,0 +1,14 @@
+module MyQuery = [%graphql
+ {|
+ query ($var: Boolean!) {
+ v1: variousScalars {
+ nullableString @skip(if: $var)
+ string @skip(if: $var)
+ }
+ v2: variousScalars {
+ nullableString @include(if: $var)
+ string @include(if: $var)
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/subscription.re b/tests_bucklescript/operations/subscription.re
new file mode 100644
index 00000000..fcf7574d
--- /dev/null
+++ b/tests_bucklescript/operations/subscription.re
@@ -0,0 +1,14 @@
+module MyQuery = [%graphql
+ {|
+ subscription {
+ simpleSubscription {
+ ...on Dog {
+ name
+ }
+ ...on Human {
+ name
+ }
+ }
+ }
+ |}
+];
diff --git a/tests_bucklescript/operations/tagged_template.re b/tests_bucklescript/operations/tagged_template.re
new file mode 100644
index 00000000..0612f2ef
--- /dev/null
+++ b/tests_bucklescript/operations/tagged_template.re
@@ -0,0 +1,83 @@
+module MyQuery = [%graphql
+ {|
+ {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+|};
+ {template_literal: graphql}
+];
+
+module MyQuery2 = [%graphql
+ {|
+ {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+|};
+ {
+ templateTag: graphql,
+ templateTagImport: "graphql",
+ templateTagLocation: "gatsby",
+ }
+];
+
+module MyQuery3 = [%graphql
+ {|
+ {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+|};
+ {templateTagImport: "graphql", templateTagLocation: "gatsby"}
+];
+
+module MyQuery4 = [%graphql
+ {|
+ {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+|};
+ {templateTag: graphql, templateTagLocation: "gatsby"}
+];
diff --git a/tests_bucklescript/operations/typename.re b/tests_bucklescript/operations/typename.re
new file mode 100644
index 00000000..a7ce1b3d
--- /dev/null
+++ b/tests_bucklescript/operations/typename.re
@@ -0,0 +1,16 @@
+module MyQuery = [%graphql
+ {|
+ {
+ first: nestedObject {
+ __typename
+ inner {
+ __typename
+ inner {
+ __typename
+ field
+ }
+ }
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/union.re b/tests_bucklescript/operations/union.re
new file mode 100644
index 00000000..54700aa1
--- /dev/null
+++ b/tests_bucklescript/operations/union.re
@@ -0,0 +1,33 @@
+module MyQuery = [%graphql
+ {|
+ {
+ dogOrHuman {
+ ...on Dog {
+ name
+ barkVolume
+ }
+ ...on Human {
+ name
+ }
+ }
+ }
+|}
+];
+
+module MyQueryNoError = [%graphql
+ {|
+ {
+ dogOrHuman {
+ # this is valid graphql and should pass
+ __typename
+ ...on Dog {
+ name
+ barkVolume
+ }
+ ...on Human {
+ name
+ }
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/unionPartial.re b/tests_bucklescript/operations/unionPartial.re
new file mode 100644
index 00000000..937de595
--- /dev/null
+++ b/tests_bucklescript/operations/unionPartial.re
@@ -0,0 +1,12 @@
+module MyQuery = [%graphql
+ {|
+ {
+ dogOrHuman {
+ ...on Dog {
+ name
+ barkVolume
+ }
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/operations/variant.re b/tests_bucklescript/operations/variant.re
new file mode 100644
index 00000000..90daa771
--- /dev/null
+++ b/tests_bucklescript/operations/variant.re
@@ -0,0 +1,26 @@
+module MyQuery = [%graphql
+ {|
+ mutation {
+ mutationForVariant @bsVariant {
+ baseType
+ baseTypeList
+ dog {
+ name
+ barkVolume
+ }
+ human {
+ name
+ }
+ dogOrHuman {
+ ...on Dog {
+ name
+ barkVolume
+ }
+ ...on Human {
+ name
+ }
+ }
+ }
+ }
+|}
+];
diff --git a/tests_bucklescript/package-lock.json b/tests_bucklescript/package-lock.json
index d5839fd7..3df4e093 100644
--- a/tests_bucklescript/package-lock.json
+++ b/tests_bucklescript/package-lock.json
@@ -587,27 +587,27 @@
}
},
"apollo-link": {
- "version": "1.2.12",
- "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.12.tgz",
- "integrity": "sha512-fsgIAXPKThyMVEMWQsUN22AoQI+J/pVXcjRGAShtk97h7D8O+SPskFinCGEkxPeQpE83uKaqafB2IyWdjN+J3Q==",
+ "version": "1.2.13",
+ "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.13.tgz",
+ "integrity": "sha512-+iBMcYeevMm1JpYgwDEIDt/y0BB7VWyvlm/7x+TIPNLHCTCMgcEgDuW5kH86iQZWo0I7mNwQiTOz+/3ShPFmBw==",
"dev": true,
"requires": {
"apollo-utilities": "^1.3.0",
"ts-invariant": "^0.4.0",
"tslib": "^1.9.3",
- "zen-observable-ts": "^0.8.19"
+ "zen-observable-ts": "^0.8.20"
}
},
"apollo-utilities": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.3.2.tgz",
- "integrity": "sha512-JWNHj8XChz7S4OZghV6yc9FNnzEXj285QYp/nLNh943iObycI5GTDO3NGR9Dth12LRrSFMeDOConPfPln+WGfg==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.3.3.tgz",
+ "integrity": "sha512-F14aX2R/fKNYMvhuP2t9GD9fggID7zp5I96MF5QeKYWDWTrkRdHRp4+SVfXUVN+cXOaB/IebfvRtzPf25CM0zw==",
"dev": true,
"requires": {
"@wry/equality": "^0.1.2",
"fast-json-stable-stringify": "^2.0.0",
"ts-invariant": "^0.4.0",
- "tslib": "^1.9.3"
+ "tslib": "^1.10.0"
}
},
"arr-diff": {
@@ -832,11 +832,14 @@
"dev": true
},
"bindings": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz",
- "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=",
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+ "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
- "optional": true
+ "optional": true,
+ "requires": {
+ "file-uri-to-path": "1.0.0"
+ }
},
"body-parser": {
"version": "1.19.0",
@@ -927,9 +930,9 @@
}
},
"bs-platform": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-7.1.1.tgz",
- "integrity": "sha512-ckZHR3J+yxyEKXOBHX8+hfzWG2XX5BxhQ4Iw9lulHFGYdAm9Ep9LgKkIah7G6RYADLmVfTxFE48igvY3kkkl+g==",
+ "version": "7.3.2",
+ "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-7.3.2.tgz",
+ "integrity": "sha512-seJL5g4anK9la4erv+B2o2sMHQCxDF6OCRl9en3hbaUos/S3JsusQ0sPp4ORsbx5eXfHLYBwPljwKXlgpXtsgQ==",
"dev": true
},
"bser": {
@@ -956,6 +959,15 @@
"requires": {
"bindings": "1.2.x",
"nan": "^2.0.5"
+ },
+ "dependencies": {
+ "bindings": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz",
+ "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=",
+ "dev": true,
+ "optional": true
+ }
}
},
"bytes": {
@@ -1203,9 +1215,9 @@
}
},
"commander": {
- "version": "2.20.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
- "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true
},
"component-emitter": {
@@ -1875,9 +1887,9 @@
"dev": true
},
"fast-json-stable-stringify": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
- "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"dev": true
},
"fast-levenshtein": {
@@ -1895,6 +1907,13 @@
"bser": "2.1.1"
}
},
+ "file-uri-to-path": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+ "dev": true,
+ "optional": true
+ },
"filename-regex": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
@@ -2008,14 +2027,15 @@
"dev": true
},
"fsevents": {
- "version": "1.2.9",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz",
- "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==",
+ "version": "1.2.11",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz",
+ "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==",
"dev": true,
"optional": true,
"requires": {
+ "bindings": "^1.5.0",
"nan": "^2.12.1",
- "node-pre-gyp": "^0.12.0"
+ "node-pre-gyp": "*"
},
"dependencies": {
"abbrev": {
@@ -2063,7 +2083,7 @@
}
},
"chownr": {
- "version": "1.1.1",
+ "version": "1.1.3",
"bundled": true,
"dev": true,
"optional": true
@@ -2093,7 +2113,7 @@
"optional": true
},
"debug": {
- "version": "4.1.1",
+ "version": "3.2.6",
"bundled": true,
"dev": true,
"optional": true,
@@ -2120,12 +2140,12 @@
"optional": true
},
"fs-minipass": {
- "version": "1.2.5",
+ "version": "1.2.7",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
- "minipass": "^2.2.1"
+ "minipass": "^2.6.0"
}
},
"fs.realpath": {
@@ -2151,7 +2171,7 @@
}
},
"glob": {
- "version": "7.1.3",
+ "version": "7.1.6",
"bundled": true,
"dev": true,
"optional": true,
@@ -2180,7 +2200,7 @@
}
},
"ignore-walk": {
- "version": "3.0.1",
+ "version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true,
@@ -2199,7 +2219,7 @@
}
},
"inherits": {
- "version": "2.0.3",
+ "version": "2.0.4",
"bundled": true,
"dev": true,
"optional": true
@@ -2241,7 +2261,7 @@
"optional": true
},
"minipass": {
- "version": "2.3.5",
+ "version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
@@ -2251,12 +2271,12 @@
}
},
"minizlib": {
- "version": "1.2.1",
+ "version": "1.3.3",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
- "minipass": "^2.2.1"
+ "minipass": "^2.9.0"
}
},
"mkdirp": {
@@ -2269,24 +2289,24 @@
}
},
"ms": {
- "version": "2.1.1",
+ "version": "2.1.2",
"bundled": true,
"dev": true,
"optional": true
},
"needle": {
- "version": "2.3.0",
+ "version": "2.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
- "debug": "^4.1.0",
+ "debug": "^3.2.6",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
}
},
"node-pre-gyp": {
- "version": "0.12.0",
+ "version": "0.14.0",
"bundled": true,
"dev": true,
"optional": true,
@@ -2300,7 +2320,7 @@
"rc": "^1.2.7",
"rimraf": "^2.6.1",
"semver": "^5.3.0",
- "tar": "^4"
+ "tar": "^4.4.2"
}
},
"nopt": {
@@ -2314,13 +2334,22 @@
}
},
"npm-bundled": {
- "version": "1.0.6",
+ "version": "1.1.1",
+ "bundled": true,
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "npm-normalize-package-bin": "^1.0.1"
+ }
+ },
+ "npm-normalize-package-bin": {
+ "version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
},
"npm-packlist": {
- "version": "1.4.1",
+ "version": "1.4.7",
"bundled": true,
"dev": true,
"optional": true,
@@ -2391,7 +2420,7 @@
"optional": true
},
"process-nextick-args": {
- "version": "2.0.0",
+ "version": "2.0.1",
"bundled": true,
"dev": true,
"optional": true
@@ -2432,7 +2461,7 @@
}
},
"rimraf": {
- "version": "2.6.3",
+ "version": "2.7.1",
"bundled": true,
"dev": true,
"optional": true,
@@ -2459,7 +2488,7 @@
"optional": true
},
"semver": {
- "version": "5.7.0",
+ "version": "5.7.1",
"bundled": true,
"dev": true,
"optional": true
@@ -2512,18 +2541,18 @@
"optional": true
},
"tar": {
- "version": "4.4.8",
+ "version": "4.4.13",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"chownr": "^1.1.1",
"fs-minipass": "^1.2.5",
- "minipass": "^2.3.4",
- "minizlib": "^1.1.1",
+ "minipass": "^2.8.6",
+ "minizlib": "^1.2.1",
"mkdirp": "^0.5.0",
"safe-buffer": "^5.1.2",
- "yallist": "^3.0.2"
+ "yallist": "^3.0.3"
}
},
"util-deprecate": {
@@ -2548,7 +2577,7 @@
"optional": true
},
"yallist": {
- "version": "3.0.3",
+ "version": "3.1.1",
"bundled": true,
"dev": true,
"optional": true
@@ -2666,9 +2695,9 @@
}
},
"graceful-fs": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.1.tgz",
- "integrity": "sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw==",
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
+ "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
"dev": true
},
"graphql": {
@@ -2687,9 +2716,9 @@
"dev": true
},
"graphql-tools": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.5.tgz",
- "integrity": "sha512-kQCh3IZsMqquDx7zfIGWBau42xe46gmqabwYkpPlCLIjcEY1XK+auP7iGRD9/205BPyoQdY8hT96MPpgERdC9Q==",
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.6.tgz",
+ "integrity": "sha512-jHLQw8x3xmSNRBCsaZqelXXsFfUSUSktSCUP8KYHiX1Z9qEuwcMpAf+FkdBzk8aTAFqOlPdNZ3OI4DKKqGKUqg==",
"dev": true,
"requires": {
"apollo-link": "^1.2.3",
@@ -3236,9 +3265,9 @@
}
},
"iterall": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz",
- "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==",
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz",
+ "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==",
"dev": true
},
"jest": {
@@ -3765,9 +3794,9 @@
}
},
"kind-of": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"dev": true
},
"kleur": {
@@ -3966,18 +3995,18 @@
"dev": true
},
"mime-db": {
- "version": "1.40.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
- "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
+ "version": "1.43.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz",
+ "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==",
"dev": true
},
"mime-types": {
- "version": "2.1.24",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
- "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
+ "version": "2.1.26",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz",
+ "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==",
"dev": true,
"requires": {
- "mime-db": "1.40.0"
+ "mime-db": "1.43.0"
}
},
"minimatch": {
@@ -4606,9 +4635,9 @@
}
},
"readable-stream": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
@@ -5073,12 +5102,12 @@
"dev": true
},
"source-map-resolve": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
- "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
+ "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
"dev": true,
"requires": {
- "atob": "^2.1.1",
+ "atob": "^2.1.2",
"decode-uri-component": "^0.2.0",
"resolve-url": "^0.2.1",
"source-map-url": "^0.4.0",
@@ -5543,6 +5572,13 @@
"nan": "~2.4.0"
},
"dependencies": {
+ "bindings": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz",
+ "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=",
+ "dev": true,
+ "optional": true
+ },
"nan": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz",
@@ -5577,9 +5613,9 @@
"dev": true
},
"uuid": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
- "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"dev": true
},
"validate-npm-package-license": {
@@ -5758,15 +5794,15 @@
}
},
"zen-observable": {
- "version": "0.8.14",
- "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.14.tgz",
- "integrity": "sha512-kQz39uonEjEESwh+qCi83kcC3rZJGh4mrZW7xjkSQYXkq//JZHTtKo+6yuVloTgMtzsIWOJrjIrKvk/dqm0L5g==",
+ "version": "0.8.15",
+ "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz",
+ "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==",
"dev": true
},
"zen-observable-ts": {
- "version": "0.8.19",
- "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.19.tgz",
- "integrity": "sha512-u1a2rpE13G+jSzrg3aiCqXU5tN2kw41b+cBZGmnc+30YimdkKiDj9bTowcB41eL77/17RF/h+393AuVgShyheQ==",
+ "version": "0.8.20",
+ "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.20.tgz",
+ "integrity": "sha512-2rkjiPALhOtRaDX6pWyNqK1fnP5KkJJybYebopNSn6wDG1lxBoFs2+nwwXKoA6glHIrtwrfBBy6da0stkKtTAA==",
"dev": true,
"requires": {
"tslib": "^1.9.3",
diff --git a/tests_bucklescript/package.json b/tests_bucklescript/package.json
index 1c72656d..d9c4e8e0 100644
--- a/tests_bucklescript/package.json
+++ b/tests_bucklescript/package.json
@@ -2,8 +2,8 @@
"name": "ppx_example",
"version": "0.1.0",
"scripts": {
- "test": "bsb -clean-world -make-world && jest --verbose lib/js",
- "generate-schema": "node ./node_modules/gql-tools/cli/gqlschema.js -o graphql_schema.json schema.graphql"
+ "test": "bsb -clean-world -make-world && jest --verbose .",
+ "generate-schema": "node ./node_modules/gql-tools/cli/gqlschema.js -o ../graphql_schema.json ../schema.graphql"
},
"keywords": [
"BuckleScript"
@@ -11,10 +11,10 @@
"license": "MIT",
"devDependencies": {
"@glennsl/bs-jest": "~0.4.9",
- "bs-platform": "~7.1.1",
+ "bs-platform": "~7.3.2",
"gql-tools": "^0.0.15",
"graphql": "^0.13.2",
"graphql-tag": "^2.6.1",
- "graphql-tools": "^4.0.3"
+ "graphql-tools": "^4.0.6"
}
}
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/GraphQL_PPX.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/GraphQL_PPX.re
new file mode 100644
index 00000000..67109305
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/GraphQL_PPX.re
@@ -0,0 +1,66 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+
+let%private clone: Js.Dict.t('a) => Js.Dict.t('a) =
+ a => Obj.magic(Js.Obj.assign(Obj.magic(Js.Obj.empty()), Obj.magic(a)));
+
+let rec deepMerge = (json1: Js.Json.t, json2: Js.Json.t) =>
+ switch (
+ (
+ Obj.magic(json1) == Js.null,
+ Js_array2.isArray(json1),
+ Js.typeof(json1) == "object",
+ ),
+ (
+ Obj.magic(json2) == Js.null,
+ Js_array2.isArray(json2),
+ Js.typeof(json2) == "object",
+ ),
+ ) {
+ | ((_, true, _), (_, true, _)) => (
+ Obj.magic(
+ Js.Array.mapi(
+ (el1, idx) => {
+ let el2 = Js.Array.unsafe_get(Obj.magic(json2), idx);
+
+ Js.typeof(el2) == "object" ? deepMerge(el1, el2) : el2;
+ },
+ Obj.magic(json1),
+ ),
+ ): Js.Json.t
+ )
+
+ | ((false, false, true), (false, false, true)) =>
+ let obj1 = clone(Obj.magic(json1));
+ let obj2 = Obj.magic(json2);
+ Js.Dict.keys(obj2)
+ |> Js.Array.forEach(key =>
+ let existingVal: Js.Json.t = Js.Dict.unsafeGet(obj1, key);
+ let newVal: Js.Json.t = Js.Dict.unsafeGet(obj2, key);
+ Js.Dict.set(
+ obj1,
+ key,
+ Js.typeof(existingVal) != "object"
+ ? newVal : Obj.magic(deepMerge(existingVal, newVal)),
+ );
+ );
+ Obj.magic(obj1);
+
+ | ((_, _, _), (_, _, _)) => json2
+ };
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/argNamedQuery.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/argNamedQuery.re
new file mode 100644
index 00000000..cdbf1c3b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/argNamedQuery.re
@@ -0,0 +1,108 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {argNamedQuery: int};
+ type t_variables = {query: int};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($query: Int!) {\nargNamedQuery(query: $query) \n}\n";
+ type t = {argNamedQuery: int};
+ type t_variables = {query: int};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ argNamedQuery: {
+ let value = (value: Raw.t).argNamedQuery;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let argNamedQuery = {
+ let value = (value: t).argNamedQuery;
+ value;
+ };
+ {argNamedQuery: argNamedQuery};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {query: (a => a)((inp: t_variables).query)};
+ let makeVariables = (~query, ()) =>
+ serializeVariables({query: query}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_query_82;
+ /**Variable **$query** has the following graphql type:
+
+```
+Int!
+```*/
+ let _graphql_query_82: _graphql_query_82 = Obj.magic(0);
+ type nonrec _graphql_query_75;
+ /**Argument **query** on field **argNamedQuery** has the following graphql type:
+
+```
+Int!
+```*/
+ let _graphql_query_75: _graphql_query_75 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/comment.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/comment.re
new file mode 100644
index 00000000..2d4ce90b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/comment.re
@@ -0,0 +1,307 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n";
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | `FIRST | `SECOND | `THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nonrecursiveInput: {
+ let value = (value: Raw.t).nonrecursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nonrecursiveInput = {
+ let value = (value: t).nonrecursiveInput;
+ value;
+ };
+ {nonrecursiveInput: nonrecursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_100;
+ /**Variable **$arg** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_100: _graphql_arg_100 = Obj.magic(0);
+ type nonrec _graphql_arg_95;
+ /**Argument **arg** on field **nonrecursiveInput** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_95: _graphql_arg_95 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/customDecoder.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/customDecoder.re
new file mode 100644
index 00000000..2e94d2d5
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/customDecoder.re
@@ -0,0 +1,144 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module StringOfInt = {
+ let parse = string_of_int;
+ let serialize = int_of_string;
+ type t = string;
+};
+module IntOfString = {
+ let parse = int_of_string;
+ let serialize = string_of_int;
+ type t = int;
+};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ string,
+ int,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\n__typename \nstring \nint \n}\n\n}\n";
+ type t_variousScalars = {
+ __typename: string,
+ string: IntOfString.t,
+ int: StringOfInt.t,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ IntOfString.parse(value);
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ StringOfInt.parse(value);
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let int = {
+ let value = (value: t_variousScalars).int;
+ StringOfInt.serialize(value);
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ IntOfString.serialize(value);
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {__typename, string, int};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/customScalars.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/customScalars.re
new file mode 100644
index 00000000..27901765
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/customScalars.re
@@ -0,0 +1,187 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_customScalarField = {
+ __typename: string,
+ nullable: Js.Nullable.t(Js.Json.t),
+ nonNullable: Js.Json.t,
+ };
+ type t = {customScalarField: t_customScalarField};
+ type t_variables = {
+ opt: Js.Nullable.t(Js.Json.t),
+ req: Js.Json.t,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($opt: CustomScalar, $req: CustomScalar!) {\ncustomScalarField(argOptional: $opt, argRequired: $req) {\n__typename \nnullable \nnonNullable \n}\n\n}\n";
+ type t_customScalarField = {
+ __typename: string,
+ nullable: option(Js.Json.t),
+ nonNullable: Js.Json.t,
+ };
+ type t = {customScalarField: t_customScalarField};
+ type t_variables = {
+ opt: option(Js.Json.t),
+ req: Js.Json.t,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ customScalarField: {
+ let value = (value: Raw.t).customScalarField;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_customScalarField).__typename;
+ value;
+ },
+ nullable: {
+ let value = (value: Raw.t_customScalarField).nullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ nonNullable: {
+ let value = (value: Raw.t_customScalarField).nonNullable;
+ value;
+ },
+ }: t_customScalarField
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let customScalarField = {
+ let value = (value: t).customScalarField;
+ (
+ {
+ let nonNullable = {
+ let value = (value: t_customScalarField).nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = (value: t_customScalarField).nullable;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_customScalarField).__typename;
+ value;
+ };
+ {__typename, nullable, nonNullable};
+ }: Raw.t_customScalarField
+ );
+ };
+ {customScalarField: customScalarField};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ opt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).opt,
+ ),
+ req: (a => a)((inp: t_variables).req),
+ };
+ let makeVariables = (~opt=?, ~req, ()) =>
+ serializeVariables({opt, req}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_opt_119;
+ /**Variable **$opt** has the following graphql type:
+
+```
+CustomScalar
+```*/
+ let _graphql_opt_119: _graphql_opt_119 = Obj.magic(0);
+ type nonrec _graphql_argOptional_106;
+ /**Argument **argOptional** on field **customScalarField** has the following graphql type:
+
+```
+CustomScalar
+```*/
+ let _graphql_argOptional_106: _graphql_argOptional_106 = Obj.magic(0);
+ type nonrec _graphql_req_138;
+ /**Variable **$req** has the following graphql type:
+
+```
+CustomScalar!
+```*/
+ let _graphql_req_138: _graphql_req_138 = Obj.magic(0);
+ type nonrec _graphql_argRequired_125;
+ /**Argument **argRequired** on field **customScalarField** has the following graphql type:
+
+```
+CustomScalar!
+```*/
+ let _graphql_argRequired_125: _graphql_argRequired_125 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/customTypes.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/customTypes.re
new file mode 100644
index 00000000..ab3731b0
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/customTypes.re
@@ -0,0 +1,204 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Color = {
+ type t =
+ | Red
+ | Green
+ | Blue;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some("green") => Green
+ | Some("blue") => Blue
+ | Some("red")
+ | Some(_)
+ | None => Red
+ };
+ let serialize = color =>
+ (
+ switch (color) {
+ | Red => "red"
+ | Green => "green"
+ | Blue => "blue"
+ }
+ )
+ |> Js.Json.string;
+};
+module DateTime = {
+ type t = Js.Date.t;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(str) => str |> Js.Date.fromString
+ | None => Js.Date.make()
+ };
+ let serialize = date => date |> Js.Date.toISOString |> Js.Json.string;
+};
+module MyQuery = {
+ module Raw = {
+ type t_customFields = {
+ __typename: string,
+ currentTime: Js.Json.t,
+ favoriteColor: Js.Json.t,
+ futureTime: Js.Nullable.t(Js.Json.t),
+ nullableColor: Js.Nullable.t(Js.Json.t),
+ };
+ type t = {customFields: t_customFields};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ncustomFields {\n__typename \ncurrentTime \nfavoriteColor \nfutureTime \nnullableColor \n}\n\n}\n";
+ type t_customFields = {
+ __typename: string,
+ currentTime: DateTime.t,
+ favoriteColor: Color.t,
+ futureTime: option(DateTime.t),
+ nullableColor: option(Color.t),
+ };
+ type t = {customFields: t_customFields};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ customFields: {
+ let value = (value: Raw.t).customFields;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_customFields).__typename;
+ value;
+ },
+ currentTime: {
+ let value = (value: Raw.t_customFields).currentTime;
+ DateTime.parse(value);
+ },
+ favoriteColor: {
+ let value = (value: Raw.t_customFields).favoriteColor;
+ Color.parse(value);
+ },
+ futureTime: {
+ let value = (value: Raw.t_customFields).futureTime;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(DateTime.parse(value))
+ | None => None
+ };
+ },
+ nullableColor: {
+ let value = (value: Raw.t_customFields).nullableColor;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(Color.parse(value))
+ | None => None
+ };
+ },
+ }: t_customFields
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let customFields = {
+ let value = (value: t).customFields;
+ (
+ {
+ let nullableColor = {
+ let value = (value: t_customFields).nullableColor;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(Color.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and futureTime = {
+ let value = (value: t_customFields).futureTime;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(DateTime.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and favoriteColor = {
+ let value = (value: t_customFields).favoriteColor;
+ Color.serialize(value);
+ }
+ and currentTime = {
+ let value = (value: t_customFields).currentTime;
+ DateTime.serialize(value);
+ }
+ and __typename = {
+ let value = (value: t_customFields).__typename;
+ value;
+ };
+ {
+ __typename,
+ currentTime,
+ favoriteColor,
+ futureTime,
+ nullableColor,
+ };
+ }: Raw.t_customFields
+ );
+ };
+ {customFields: customFields};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/defaultObjectValueOnScalar.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/defaultObjectValueOnScalar.re
new file mode 100644
index 00000000..27bf4062
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/defaultObjectValueOnScalar.re
@@ -0,0 +1,109 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {defaultObjectValueOnScalar: string};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndefaultObjectValueOnScalar(filter: {some: {json: \"value\"}}, arg: {field: \"otherValue\"}) \n}\n";
+ type t = {defaultObjectValueOnScalar: string};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ defaultObjectValueOnScalar: {
+ let value = (value: Raw.t).defaultObjectValueOnScalar;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let defaultObjectValueOnScalar = {
+ let value = (value: t).defaultObjectValueOnScalar;
+ value;
+ };
+ {defaultObjectValueOnScalar: defaultObjectValueOnScalar};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_filter_92;
+ /**Argument **filter** on field **defaultObjectValueOnScalar** has the following graphql type:
+
+```
+JsonScalar!
+```*/
+ let _graphql_filter_92: _graphql_filter_92 = Obj.magic(0);
+ type nonrec _graphql_arg_140;
+ /**Argument **arg** on field **defaultObjectValueOnScalar** has the following graphql type:
+
+```
+EmbeddedInput {
+ field: String
+}!
+```*/
+ let _graphql_arg_140: _graphql_arg_140 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/enumInput.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/enumInput.re
new file mode 100644
index 00000000..b1a57902
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/enumInput.re
@@ -0,0 +1,137 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {enumInput: string};
+ type t_variables = {arg: string};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: SampleField!) {\nenumInput(arg: $arg) \n}\n";
+ type t = {enumInput: string};
+ type t_variables = {arg: [ | `FIRST | `SECOND | `THIRD]};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ enumInput: {
+ let value = (value: Raw.t).enumInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let enumInput = {
+ let value = (value: t).enumInput;
+ value;
+ };
+ {enumInput: enumInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ (inp: t_variables).arg,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_82;
+ /**Variable **$arg** has the following graphql type:
+
+```
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}!
+```*/
+ let _graphql_arg_82: _graphql_arg_82 = Obj.magic(0);
+ type nonrec _graphql_arg_77;
+ /**Argument **arg** on field **enumInput** has the following graphql type:
+
+```
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}!
+```*/
+ let _graphql_arg_77: _graphql_arg_77 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_SampleField_47;
+ /**```
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}
+```*/
+ let _graphql_SampleField_47: _graphql_SampleField_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/explicit_object_record.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/explicit_object_record.re
new file mode 100644
index 00000000..282eb8be
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/explicit_object_record.re
@@ -0,0 +1,386 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module RecordsQuery = {
+ module Raw = {
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\n__typename \nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_lists).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_lists).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 RecordsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ObjectsQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ "__typename": string,
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\n__typename \nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ .
+ "__typename": string,
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {
+ "__typename": __typename,
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {
+ "__typename": __typename,
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ObjectsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/extensions.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/extensions.re
new file mode 100644
index 00000000..cee2ea9a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/extensions.re
@@ -0,0 +1,225 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ type t_variables;
+ };
+ type t;
+ type t_variables;
+
+ let query: string;
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+};
+
+module Parent = {
+ module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => ();
+ };
+};
+module Bla' = {
+ module Raw = {
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query Bla {\nlists {\n__typename \nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_lists).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_lists).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Bla = {
+ include Bla';
+ include Parent.ExtendQuery(Bla');
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/fragmentDefinition.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/fragmentDefinition.re
new file mode 100644
index 00000000..d4b6e283
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/fragmentDefinition.re
@@ -0,0 +1,1000 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module GraphQL_PPX = {
+ let deepMerge = (json1, _) => json1;
+};
+module ListFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment ListFragment on Lists {\n__typename \nnullableOfNullable \nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, nullableOfNullable, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = "ListFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Another = {
+ /**The GraphQL query string*/
+ let query = "fragment Another on Lists {\n__typename \nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {
+ __typename: string,
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ __typename: string,
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = "Another";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module FragmentWithArgs = {
+ /**The GraphQL query string*/
+ let query = "fragment FragmentWithArgs on Lists {\n__typename \nlistWithArg(arg1: $arg1) \n}\n";
+ module Raw = {
+ type t = {
+ __typename: string,
+ listWithArg: Js.Nullable.t(array(Js.Nullable.t(string))),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ __typename: string,
+ listWithArg: option(array(option(string))),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ listWithArg: {
+ let value = (value: Raw.t).listWithArg;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (~arg1 as _arg1: [ | `String], value: Raw.t) =>
+ parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listWithArg = {
+ let value = (value: t).listWithArg;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, listWithArg};
+ }: Raw.t
+ );
+ let name = "FragmentWithArgs";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+
+module InlineFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment InlineListFragment on Lists {\n__typename \nnullableOfNullable \nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, nullableOfNullable, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = "InlineListFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery = {
+ module Raw = {
+ type t_l2;
+ type t_l3;
+ type t_l4;
+ type t = {
+ l1: ListFragment.Raw.t,
+ l2: t_l2,
+ l3: t_l3,
+ l4: t_l4,
+ l5: FragmentWithArgs.Raw.t,
+ };
+ type t_variables = {arg1: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ "query MyQuery($arg1: String) {\nl1: lists {\n..."
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl2: lists {\n__typename \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl3: lists {\n__typename \nnullableOfNullable \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl4: lists {\n__typename \nnullableOfNullable \n..."
+ )
+ ++ InlineFragment.name
+ )
+ ++ " \n}\n\nl5: lists {\n..."
+ )
+ ++ FragmentWithArgs.name
+ )
+ ++ " \n}\n\n}\n"
+ )
+ ++ FragmentWithArgs.query
+ )
+ ++ InlineFragment.query
+ )
+ ++ ListFragment.query;
+ type t_l2 = {
+ __typename: string,
+ frag1: ListFragment.t_Lists,
+ frag2: ListFragment.t_Lists,
+ };
+ type t_l3 = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ frag1: ListFragment.t_Lists,
+ frag2: ListFragment.t_Lists,
+ };
+ type t_l4 = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ inlineFragment: InlineFragment.t_Lists,
+ };
+ type t = {
+ l1: ListFragment.t,
+ l2: t_l2,
+ l3: t_l3,
+ l4: t_l4,
+ l5: FragmentWithArgs.t,
+ };
+ type t_variables = {arg1: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ l1: {
+ let value = (value: Raw.t).l1;
+ ListFragment.verifyArgsAndParse(value);
+ },
+ l2: {
+ let value = (value: Raw.t).l2;
+ (
+ {
+ __typename: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "__typename"),
+ );
+ value;
+ },
+ frag1: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ frag2: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t_l2
+ );
+ },
+ l3: {
+ let value = (value: Raw.t).l3;
+ (
+ {
+ __typename: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "__typename"),
+ );
+ value;
+ },
+ nullableOfNullable: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "nullableOfNullable"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ frag1: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ frag2: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t_l3
+ );
+ },
+ l4: {
+ let value = (value: Raw.t).l4;
+ (
+ {
+ __typename: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "__typename"),
+ );
+ value;
+ },
+ nullableOfNullable: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "nullableOfNullable"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ inlineFragment: {
+ let value: InlineFragment.Raw.t = Obj.magic(value);
+ InlineFragment.verifyArgsAndParse(value);
+ },
+ }: t_l4
+ );
+ },
+ l5: {
+ let value = (value: Raw.t).l5;
+ FragmentWithArgs.verifyArgsAndParse(~arg1=`String, value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let l5 = {
+ let value = (value: t).l5;
+ FragmentWithArgs.serialize(value);
+ }
+ and l4 = {
+ let value = (value: t).l4;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = (value: t_l4).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_l4).__typename;
+ value;
+ };
+ {
+ "__typename": __typename,
+ "nullableOfNullable": nullableOfNullable,
+ };
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(
+ InlineFragment.serialize((value: t_l4).inlineFragment),
+ ): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l4
+ );
+ }
+ and l3 = {
+ let value = (value: t).l3;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = (value: t_l3).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_l3).__typename;
+ value;
+ };
+ {
+ "__typename": __typename,
+ "nullableOfNullable": nullableOfNullable,
+ };
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(ListFragment.serialize((value: t_l3).frag1)): Js.Json.t
+ ),
+ (
+ Obj.magic(ListFragment.serialize((value: t_l3).frag2)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l3
+ );
+ }
+ and l2 = {
+ let value = (value: t).l2;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let __typename = {
+ let value = (value: t_l2).__typename;
+ value;
+ };
+ {"__typename": __typename};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(ListFragment.serialize((value: t_l2).frag1)): Js.Json.t
+ ),
+ (
+ Obj.magic(ListFragment.serialize((value: t_l2).frag2)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l2
+ );
+ }
+ and l1 = {
+ let value = (value: t).l1;
+ ListFragment.serialize(value);
+ };
+ {l1, l2, l3, l4, l5};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg1:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).arg1,
+ ),
+ };
+ let makeVariables = (~arg1=?, ()) =>
+ serializeVariables({arg1: arg1}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {lists: ListFragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (("query {\nlists {\n..." ++ ListFragment.name) ++ " \n}\n\n}\n")
+ ++ ListFragment.query;
+ type t = {lists: ListFragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ ListFragment.serialize(value);
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/interface.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/interface.re
new file mode 100644
index 00000000..f23f4bb6
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/interface.re
@@ -0,0 +1,18 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/lists.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/lists.re
new file mode 100644
index 00000000..08e4dbfd
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/lists.re
@@ -0,0 +1,203 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\n__typename \nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ __typename: string,
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_lists).__typename;
+ value;
+ },
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_lists).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/listsArgs.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/listsArgs.re
new file mode 100644
index 00000000..8a9a61b1
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/listsArgs.re
@@ -0,0 +1,195 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {listsInput: string};
+ type t_variables = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \n}\n";
+ type t = {listsInput: string};
+ type t_variables = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listsInput: {
+ let value = (value: Raw.t).listsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listsInput = {
+ let value = (value: t).listsInput;
+ value;
+ };
+ {listsInput: listsInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ nullableOfNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables).nullableOfNullable,
+ ),
+ nullableOfNonNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ (inp: t_variables).nullableOfNonNullable,
+ ),
+ nonNullableOfNullable:
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ (inp: t_variables).nonNullableOfNullable,
+ ),
+ nonNullableOfNonNullable:
+ (a => Array.map(b => (a => a)(b), a))(
+ (inp: t_variables).nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_219;
+ /**Argument **arg** on field **listsInput** has the following graphql type:
+
+```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+```*/
+ let _graphql_arg_219: _graphql_arg_219 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/listsInput.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/listsInput.re
new file mode 100644
index 00000000..b8d25189
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/listsInput.re
@@ -0,0 +1,224 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {listsInput: string};
+ type t_variables = {arg: t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: ListsInput!) {\nlistsInput(arg: $arg) \n}\n";
+ type t = {listsInput: string};
+ type t_variables = {arg: t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listsInput: {
+ let value = (value: Raw.t).listsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listsInput = {
+ let value = (value: t).listsInput;
+ value;
+ };
+ {listsInput: listsInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg: (a => serializeInputObjectListsInput(a))((inp: t_variables).arg),
+ }
+ and serializeInputObjectListsInput:
+ t_variables_ListsInput => Raw.t_variables_ListsInput =
+ inp => {
+ nullableOfNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_ListsInput).nullableOfNullable,
+ ),
+ nullableOfNonNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ (inp: t_variables_ListsInput).nullableOfNonNullable,
+ ),
+ nonNullableOfNullable:
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ (inp: t_variables_ListsInput).nonNullableOfNullable,
+ ),
+ nonNullableOfNonNullable:
+ (a => Array.map(b => (a => a)(b), a))(
+ (inp: t_variables_ListsInput).nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectListsInput =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ )
+ : t_variables_ListsInput => {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_82;
+ /**Variable **$arg** has the following graphql type:
+
+```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+```*/
+ let _graphql_arg_82: _graphql_arg_82 = Obj.magic(0);
+ type nonrec _graphql_arg_77;
+ /**Argument **arg** on field **listsInput** has the following graphql type:
+
+```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+```*/
+ let _graphql_arg_77: _graphql_arg_77 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_ListsInput_47;
+ /**```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}
+```*/
+ let _graphql_ListsInput_47: _graphql_ListsInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/mutation.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/mutation.re
new file mode 100644
index 00000000..8583b69a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/mutation.re
@@ -0,0 +1,260 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationWithError_value = {
+ __typename: string,
+ stringField: string,
+ };
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ __typename: string,
+ field: t_mutationWithError_errors_field,
+ message: string,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ value: Js.Nullable.t(t_mutationWithError_value),
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\n__typename \nvalue {\n__typename \nstringField \n}\n\nerrors {\n__typename \nfield \nmessage \n}\n\n}\n\n}\n";
+ type t_mutationWithError_value = {
+ __typename: string,
+ stringField: string,
+ };
+ type t_mutationWithError_errors_field = [
+ | `FutureAddedValue(string)
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+ type t_mutationWithError_errors = {
+ __typename: string,
+ field: t_mutationWithError_errors_field,
+ message: string,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ value: option(t_mutationWithError_value),
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_mutationWithError).__typename;
+ value;
+ },
+ value: {
+ let value = (value: Raw.t_mutationWithError).value;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_value).__typename;
+ value;
+ },
+ stringField: {
+ let value =
+ (value: Raw.t_mutationWithError_value).stringField;
+ value;
+ },
+ }: t_mutationWithError_value,
+ )
+ | None => None
+ };
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).
+ __typename;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | other => `FutureAddedValue(other)
+ };
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ | `FutureAddedValue(other) => other
+ };
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_errors).__typename;
+ value;
+ };
+ {__typename, field, message};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and value = {
+ let value = (value: t_mutationWithError).value;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let stringField = {
+ let value =
+ (value: t_mutationWithError_value).stringField;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_value).__typename;
+ value;
+ };
+ {__typename, stringField};
+ }: Raw.t_mutationWithError_value,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_mutationWithError).__typename;
+ value;
+ };
+ {__typename, value, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/mutationWithArgs.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/mutationWithArgs.re
new file mode 100644
index 00000000..8c52df73
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/mutationWithArgs.re
@@ -0,0 +1,94 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {optionalInputArgs: string};
+ type t_variables = {required: string};
+ };
+ /**The GraphQL query string*/
+ let query = "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n";
+ type t = {optionalInputArgs: string};
+ type t_variables = {required: string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ optionalInputArgs: {
+ let value = (value: Raw.t).optionalInputArgs;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let optionalInputArgs = {
+ let value = (value: t).optionalInputArgs;
+ value;
+ };
+ {optionalInputArgs: optionalInputArgs};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {required: (a => a)((inp: t_variables).required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({required: required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/mutationWithArgsAndNoRecords.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/mutationWithArgsAndNoRecords.re
new file mode 100644
index 00000000..fa7dbd07
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/mutationWithArgsAndNoRecords.re
@@ -0,0 +1,91 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ };
+ /**The GraphQL query string*/
+ let query = "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n";
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"required": (a => a)(inp##required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({"required": required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/nested.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/nested.re
new file mode 100644
index 00000000..9ef5a7aa
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/nested.re
@@ -0,0 +1,465 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type record = {
+ f1: string,
+ f2: string,
+};
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner),
+ };
+ type t_second_inner_inner = {
+ __typename: string,
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_second_inner_inner),
+ };
+ type t_second = {
+ __typename: string,
+ inner: Js.Nullable.t(t_second_inner),
+ };
+ type t_let_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_let_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_let_inner_inner),
+ };
+ type t_let = {
+ __typename: string,
+ inner: Js.Nullable.t(t_let_inner),
+ };
+ type t = {
+ first: t_first,
+ second: t_second,
+ let_: t_let,
+ };
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nfirst: nestedObject {\n__typename \ninner {\n__typename \ninner {\n__typename \nfield \n}\n\n}\n\n}\n\nsecond: nestedObject {\n__typename \ninner {\n__typename \ninner {\n__typename \nf1: field \nf2: field \n}\n\n}\n\n}\n\nlet: nestedObject {\n__typename \ninner {\n__typename \ninner {\n__typename \nfield \n}\n\n}\n\n}\n\n}\n";
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: option(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: option(t_first_inner),
+ };
+ type t_second_inner_inner = {
+ __typename: string,
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {
+ __typename: string,
+ inner: option(t_second_inner_inner),
+ };
+ type t_second = {
+ __typename: string,
+ inner: option(t_second_inner),
+ };
+ type t_let_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_let_inner = {
+ __typename: string,
+ inner: option(t_let_inner_inner),
+ };
+ type t_let = {
+ __typename: string,
+ inner: option(t_let_inner),
+ };
+ type t = {
+ first: t_first,
+ second: t_second,
+ let_: t_let,
+ };
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ first: {
+ let value = (value: Raw.t).first;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_first).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_first_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_first_inner_inner).__typename;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_first_inner_inner).field;
+ value;
+ },
+ }: t_first_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first
+ );
+ },
+ second: {
+ let value = (value: Raw.t).second;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_second).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_second).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_second_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_second_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_second_inner_inner).__typename;
+ value;
+ },
+ f1: {
+ let value = (value: Raw.t_second_inner_inner).f1;
+ value;
+ },
+ f2: {
+ let value = (value: Raw.t_second_inner_inner).f2;
+ value;
+ },
+ }: t_second_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_second_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_second
+ );
+ },
+ let_: {
+ let value = (value: Raw.t).let_;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_let).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_let).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_let_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_let_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_let_inner_inner).__typename;
+ value;
+ },
+ field: {
+ let value = (value: Raw.t_let_inner_inner).field;
+ value;
+ },
+ }: t_let_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_let_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_let
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let let_ = {
+ let value = (value: t).let_;
+ (
+ {
+ let inner = {
+ let value = (value: t_let).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_let_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_let_inner_inner).field;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_let_inner_inner).__typename;
+ value;
+ };
+ {__typename, field};
+ }: Raw.t_let_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_let_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_let_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_let).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_let
+ );
+ }
+ and second = {
+ let value = (value: t).second;
+ (
+ {
+ let inner = {
+ let value = (value: t_second).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_second_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let f2 = {
+ let value = (value: t_second_inner_inner).f2;
+ value;
+ }
+ and f1 = {
+ let value = (value: t_second_inner_inner).f1;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_second_inner_inner).__typename;
+ value;
+ };
+ {__typename, f1, f2};
+ }: Raw.t_second_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_second_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_second_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_second).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_second
+ );
+ }
+ and first = {
+ let value = (value: t).first;
+ (
+ {
+ let inner = {
+ let value = (value: t_first).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_first_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_first_inner_inner).field;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_first_inner_inner).__typename;
+ value;
+ };
+ {__typename, field};
+ }: Raw.t_first_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first
+ );
+ };
+ {first, second, let_};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/nonrecursiveInput.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/nonrecursiveInput.re
new file mode 100644
index 00000000..fcc98102
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/nonrecursiveInput.re
@@ -0,0 +1,637 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n";
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | `FIRST | `SECOND | `THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nonrecursiveInput: {
+ let value = (value: Raw.t).nonrecursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nonrecursiveInput = {
+ let value = (value: t).nonrecursiveInput;
+ value;
+ };
+ {nonrecursiveInput: nonrecursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_100;
+ /**Variable **$arg** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_100: _graphql_arg_100 = Obj.magic(0);
+ type nonrec _graphql_arg_95;
+ /**Argument **arg** on field **nonrecursiveInput** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_95: _graphql_arg_95 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {
+ scalarsInput: string,
+ more: string,
+ };
+ type t_variables = {
+ arg: t_variables_NonrecursiveInput,
+ arg2: t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\nscalarsInput(arg: $arg) \nmore: scalarsInput(arg: $arg2) \n}\n";
+ type t = {
+ scalarsInput: string,
+ more: string,
+ };
+ type t_variables = {
+ arg: t_variables_NonrecursiveInput,
+ arg2: t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | `FIRST | `SECOND | `THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ more: {
+ let value = (value: Raw.t).more;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let more = {
+ let value = (value: t).more;
+ value;
+ }
+ and scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput, more};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ arg2:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg2,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ~arg2, ()) =>
+ serializeVariables({arg, arg2}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_240;
+ /**Variable **$arg** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_240: _graphql_arg_240 = Obj.magic(0);
+ type nonrec _graphql_arg_235;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+```*/
+ let _graphql_arg_235: _graphql_arg_235 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_169;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_169: _graphql_NonrecursiveInput_169 =
+ Obj.magic(0);
+ type nonrec _graphql_NonrecursiveInput_196;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_196: _graphql_NonrecursiveInput_196 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/omitFutureValueEnum.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/omitFutureValueEnum.re
new file mode 100644
index 00000000..b561b580
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/omitFutureValueEnum.re
@@ -0,0 +1,573 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\n__typename \nerrors {\n__typename \nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [
+ | `FutureAddedValue(string)
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_mutationWithError).__typename;
+ value;
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).
+ __typename;
+ value;
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | other => `FutureAddedValue(other)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ | `FutureAddedValue(other) => other
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_errors).__typename;
+ value;
+ };
+ {__typename, message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_mutationWithError).__typename;
+ value;
+ };
+ {__typename, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\n__typename \nerrors {\n__typename \nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [ | `FIRST | `SECOND | `THIRD];
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_mutationWithError).__typename;
+ value;
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).
+ __typename;
+ value;
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | _ => raise(Not_found)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_errors).__typename;
+ value;
+ };
+ {__typename, message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_mutationWithError).__typename;
+ value;
+ };
+ {__typename, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\n__typename \nerrors {\n__typename \nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [ | `FIRST | `SECOND | `THIRD];
+ type t_mutationWithError_errors = {
+ __typename: string,
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ __typename: string,
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_mutationWithError).__typename;
+ value;
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).
+ __typename;
+ value;
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | _ => raise(Not_found)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_mutationWithError_errors).__typename;
+ value;
+ };
+ {__typename, message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_mutationWithError).__typename;
+ value;
+ };
+ {__typename, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/omitFutureValueUnion.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/omitFutureValueUnion.re
new file mode 100644
index 00000000..e7c8f9a9
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/omitFutureValueUnion.re
@@ -0,0 +1,557 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\n__typename \nname \nbarkVolume \n}\n\n...on Human {\n__typename \nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\n__typename \nname \nbarkVolume \n}\n\n...on Human {\n__typename \nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\n__typename \nname \nbarkVolume \n}\n\n...on Human {\n__typename \nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/pokedexApolloMode.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/pokedexApolloMode.re
new file mode 100644
index 00000000..fd0a3666
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/pokedexApolloMode.re
@@ -0,0 +1,155 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ __typename: string,
+ id: string,
+ name: Js.Nullable.t(string),
+ };
+ type t = {pokemon: Js.Nullable.t(t_pokemon)};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\npokemon(name: \"Pikachu\") {\n__typename \nid \nname \n}\n\n}\n";
+ type t_pokemon = {
+ __typename: string,
+ id: string,
+ name: option(string),
+ };
+ type t = {pokemon: option(t_pokemon)};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ pokemon: {
+ let value = (value: Raw.t).pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_pokemon).__typename;
+ value;
+ },
+ id: {
+ let value = (value: Raw.t_pokemon).id;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_pokemon).name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_pokemon,
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let pokemon = {
+ let value = (value: t).pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = (value: t_pokemon).name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = (value: t_pokemon).id;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_pokemon).__typename;
+ value;
+ };
+ {__typename, id, name};
+ }: Raw.t_pokemon,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {pokemon: pokemon};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_name_52;
+ /**Argument **name** on field **pokemon** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_name_52: _graphql_name_52 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/pokedexScalars.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/pokedexScalars.re
new file mode 100644
index 00000000..e0899728
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/pokedexScalars.re
@@ -0,0 +1,205 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ __typename: string,
+ id: string,
+ name: Js.Nullable.t(string),
+ };
+ type t = {pokemon: Js.Nullable.t(t_pokemon)};
+ type t_variables = {
+ id: Js.Nullable.t(string),
+ name: Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query pokemon($id: String, $name: String) {\npokemon(name: $name, id: $id) {\n__typename \nid \nname \n}\n\n}\n";
+ type t_pokemon = {
+ __typename: string,
+ id: string,
+ name: option(string),
+ };
+ type t = {pokemon: option(t_pokemon)};
+ type t_variables = {
+ id: option(string),
+ name: option(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ pokemon: {
+ let value = (value: Raw.t).pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_pokemon).__typename;
+ value;
+ },
+ id: {
+ let value = (value: Raw.t_pokemon).id;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_pokemon).name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_pokemon,
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let pokemon = {
+ let value = (value: t).pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = (value: t_pokemon).name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = (value: t_pokemon).id;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_pokemon).__typename;
+ value;
+ };
+ {__typename, id, name};
+ }: Raw.t_pokemon,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {pokemon: pokemon};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ id:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).id,
+ ),
+ name:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).name,
+ ),
+ };
+ let makeVariables = (~id=?, ~name=?, ()) =>
+ serializeVariables({id, name}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_name_100;
+ /**Variable **$name** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_name_100: _graphql_name_100 = Obj.magic(0);
+ type nonrec _graphql_name_94;
+ /**Argument **name** on field **pokemon** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_name_94: _graphql_name_94 = Obj.magic(0);
+ type nonrec _graphql_id_111;
+ /**Variable **$id** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_id_111: _graphql_id_111 = Obj.magic(0);
+ type nonrec _graphql_id_107;
+ /**Argument **id** on field **pokemon** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_id_107: _graphql_id_107 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/record.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/record.re
new file mode 100644
index 00000000..13b817cd
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/record.re
@@ -0,0 +1,799 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type scalars = {
+ string,
+ int,
+};
+
+type dog = {
+ name: string,
+ barkVolume: float,
+};
+
+type oneFieldQuery = {nullableString: option(string)};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ string,
+ int,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\n__typename \nstring \nint \n}\n\n}\n";
+ type t = {variousScalars: scalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ }: scalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let int = {
+ let value = (value: scalars).int;
+ value;
+ }
+ and string = {
+ let value = (value: scalars).string;
+ value;
+ }
+ and __typename = {
+ let value = (value: scalars).__typename;
+ value;
+ };
+ {__typename, string, int};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module OneFieldQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\n__typename \nnullableString \n}\n\n}\n";
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {__typename, nullableString};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 OneFieldQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ExternalFragmentQuery = {
+ module Fragment = {
+ /**The GraphQL query string*/
+ let query = "fragment Fragment on VariousScalars {\n__typename \nstring \nint \n}\n";
+ module Raw = {
+ type t = {
+ __typename: string,
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ };
+ type t = {
+ __typename: string,
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ string: {
+ let value = (value: Raw.t).string;
+ value;
+ },
+ int: {
+ let value = (value: Raw.t).int;
+ value;
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let int = {
+ let value = (value: t).int;
+ value;
+ }
+ and string = {
+ let value = (value: t).string;
+ value;
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, string, int};
+ }: Raw.t
+ );
+ let name = "Fragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+VariousScalars {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t = {variousScalars: Fragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ ("query {\nvariousScalars {\n..." ++ Fragment.name)
+ ++ " \n}\n\n}\n"
+ )
+ ++ Fragment.query;
+ type t = {variousScalars: Fragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ Fragment.verifyArgsAndParse(value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ Fragment.serialize(value);
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+module InlineFragmentQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\n__typename \nname \nbarkVolume \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 InlineFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module UnionExternalFragmentQuery = {
+ module DogFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment DogFragment on Dog {\n__typename \nname \nbarkVolume \n}\n";
+ module Raw = {
+ type t = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ };
+ type t = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ __typename: {
+ let value = (value: Raw.t).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t).barkVolume;
+ value;
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let barkVolume = {
+ let value = (value: t).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t).__typename;
+ value;
+ };
+ {__typename, name, barkVolume};
+ }: Raw.t
+ );
+ let name = "DogFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Dog {
+ name: String!
+ barkVolume: Float!
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ "query {\ndogOrHuman {\n__typename\n...on Dog {\n..."
+ ++ DogFragment.name
+ )
+ ++ " \n}\n\n}\n\n}\n"
+ )
+ ++ DogFragment.query;
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(DogFragment.t)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: DogFragment.Raw.t = Obj.magic(value);
+ DogFragment.verifyArgsAndParse(value);
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(DogFragment.serialize(value)): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/recursiveInput.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/recursiveInput.re
new file mode 100644
index 00000000..932cdcb9
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/recursiveInput.re
@@ -0,0 +1,193 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {recursiveInput: string};
+ type t_variables = {arg: t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ otherField: Js.Nullable.t(string),
+ inner: Js.Nullable.t(t_variables_RecursiveInput),
+ enum: Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: RecursiveInput!) {\nrecursiveInput(arg: $arg) \n}\n";
+ type t = {recursiveInput: string};
+ type t_variables = {arg: t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ otherField: option(string),
+ inner: option(t_variables_RecursiveInput),
+ enum: option([ | `FIRST | `SECOND | `THIRD]),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ recursiveInput: {
+ let value = (value: Raw.t).recursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let recursiveInput = {
+ let value = (value: t).recursiveInput;
+ value;
+ };
+ {recursiveInput: recursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectRecursiveInput(a))((inp: t_variables).arg),
+ }
+ and serializeInputObjectRecursiveInput:
+ t_variables_RecursiveInput => Raw.t_variables_RecursiveInput =
+ inp => {
+ otherField:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_RecursiveInput).otherField,
+ ),
+ inner:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectRecursiveInput(a))(b),
+ )
+ }
+ )(
+ (inp: t_variables_RecursiveInput).inner,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_RecursiveInput).enum,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectRecursiveInput =
+ (~otherField=?, ~inner=?, ~enum=?, ()): t_variables_RecursiveInput => {
+ otherField,
+ inner,
+ enum,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_90;
+ /**Variable **$arg** has the following graphql type:
+
+```
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}!
+```*/
+ let _graphql_arg_90: _graphql_arg_90 = Obj.magic(0);
+ type nonrec _graphql_arg_85;
+ /**Argument **arg** on field **recursiveInput** has the following graphql type:
+
+```
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}!
+```*/
+ let _graphql_arg_85: _graphql_arg_85 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_RecursiveInput_47;
+ /**```
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}
+```*/
+ let _graphql_RecursiveInput_47: _graphql_RecursiveInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/scalars.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/scalars.re
new file mode 100644
index 00000000..81e4b57a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/scalars.re
@@ -0,0 +1,256 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\n__typename \nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n";
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/scalarsArgs.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/scalarsArgs.re
new file mode 100644
index 00000000..b4c13a19
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/scalarsArgs.re
@@ -0,0 +1,216 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {scalarsInput: string};
+ type t_variables = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \n}\n";
+ type t = {scalarsInput: string};
+ type t_variables = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput: scalarsInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ nullableString:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableString,
+ ),
+ string: (a => a)((inp: t_variables).string),
+ nullableInt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableInt,
+ ),
+ int: (a => a)((inp: t_variables).int),
+ nullableFloat:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableFloat,
+ ),
+ float: (a => a)((inp: t_variables).float),
+ nullableBoolean:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableBoolean,
+ ),
+ boolean: (a => a)((inp: t_variables).boolean),
+ nullableID:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableID,
+ ),
+ id: (a => a)((inp: t_variables).id),
+ };
+ let makeVariables =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_292;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+```*/
+ let _graphql_arg_292: _graphql_arg_292 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/scalarsInput.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/scalarsInput.re
new file mode 100644
index 00000000..ab139706
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/scalarsInput.re
@@ -0,0 +1,261 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {scalarsInput: string};
+ type t_variables = {arg: t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: VariousScalarsInput!) {\nscalarsInput(arg: $arg) \n}\n";
+ type t = {scalarsInput: string};
+ type t_variables = {arg: t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput: scalarsInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectVariousScalarsInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectVariousScalarsInput:
+ t_variables_VariousScalarsInput => Raw.t_variables_VariousScalarsInput =
+ inp => {
+ nullableString:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableString,
+ ),
+ string: (a => a)((inp: t_variables_VariousScalarsInput).string),
+ nullableInt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableInt,
+ ),
+ int: (a => a)((inp: t_variables_VariousScalarsInput).int),
+ nullableFloat:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableFloat,
+ ),
+ float: (a => a)((inp: t_variables_VariousScalarsInput).float),
+ nullableBoolean:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableBoolean,
+ ),
+ boolean: (a => a)((inp: t_variables_VariousScalarsInput).boolean),
+ nullableID:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableID,
+ ),
+ id: (a => a)((inp: t_variables_VariousScalarsInput).id),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectVariousScalarsInput =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ )
+ : t_variables_VariousScalarsInput => {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_93;
+ /**Variable **$arg** has the following graphql type:
+
+```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+```*/
+ let _graphql_arg_93: _graphql_arg_93 = Obj.magic(0);
+ type nonrec _graphql_arg_88;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+```*/
+ let _graphql_arg_88: _graphql_arg_88 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_VariousScalarsInput_47;
+ /**```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+```*/
+ let _graphql_VariousScalarsInput_47: _graphql_VariousScalarsInput_47 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/skipDirectives.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/skipDirectives.re
new file mode 100644
index 00000000..7b59e62f
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/skipDirectives.re
@@ -0,0 +1,214 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_v1 = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string: Js.Nullable.t(string),
+ };
+ type t_v2 = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string: Js.Nullable.t(string),
+ };
+ type t = {
+ v1: t_v1,
+ v2: t_v2,
+ };
+ type t_variables = {var: bool};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($var: Boolean!) {\nv1: variousScalars {\n__typename \nnullableString @skip(if: $var) \nstring @skip(if: $var) \n}\n\nv2: variousScalars {\n__typename \nnullableString @include(if: $var) \nstring @include(if: $var) \n}\n\n}\n";
+ type t_v1 = {
+ __typename: string,
+ nullableString: option(string),
+ string: option(string),
+ };
+ type t_v2 = {
+ __typename: string,
+ nullableString: option(string),
+ string: option(string),
+ };
+ type t = {
+ v1: t_v1,
+ v2: t_v2,
+ };
+ type t_variables = {var: bool};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ v1: {
+ let value = (value: Raw.t).v1;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_v1).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_v1).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_v1).string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_v1
+ );
+ },
+ v2: {
+ let value = (value: Raw.t).v2;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_v2).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_v2).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_v2).string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_v2
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let v2 = {
+ let value = (value: t).v2;
+ (
+ {
+ let string = {
+ let value = (value: t_v2).string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = (value: t_v2).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_v2).__typename;
+ value;
+ };
+ {__typename, nullableString, string};
+ }: Raw.t_v2
+ );
+ }
+ and v1 = {
+ let value = (value: t).v1;
+ (
+ {
+ let string = {
+ let value = (value: t_v1).string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = (value: t_v1).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_v1).__typename;
+ value;
+ };
+ {__typename, nullableString, string};
+ }: Raw.t_v1
+ );
+ };
+ {v1, v2};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {var: (a => a)((inp: t_variables).var)};
+ let makeVariables = (~var, ()) =>
+ serializeVariables({var: var}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/subscription.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/subscription.re
new file mode 100644
index 00000000..053b0854
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/subscription.re
@@ -0,0 +1,193 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_simpleSubscription_Dog = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription;
+ type t = {simpleSubscription: t_simpleSubscription};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "subscription {\nsimpleSubscription {\n__typename\n...on Dog {\n__typename \nname \n}\n\n...on Human {\n__typename \nname \n}\n\n}\n\n}\n";
+ type t_simpleSubscription_Dog = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_simpleSubscription_Dog)
+ | `Human(t_simpleSubscription_Human)
+ ];
+ type t = {simpleSubscription: t_simpleSubscription};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ simpleSubscription: {
+ let value = (value: Raw.t).simpleSubscription;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_simpleSubscription_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_simpleSubscription_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_simpleSubscription_Dog).name;
+ value;
+ },
+ }: t_simpleSubscription_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_simpleSubscription_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_simpleSubscription_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_simpleSubscription_Human).name;
+ value;
+ },
+ }: t_simpleSubscription_Human
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_simpleSubscription
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let simpleSubscription = {
+ let value = (value: t).simpleSubscription;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_simpleSubscription_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_simpleSubscription_Dog).__typename;
+ value;
+ };
+ {__typename: "Dog", name};
+ }: Raw.t_simpleSubscription_Dog,
+ ): Raw.t_simpleSubscription
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_simpleSubscription_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_simpleSubscription_Human).__typename;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_simpleSubscription_Human,
+ ): Raw.t_simpleSubscription
+ )
+ | `FutureAddedValue(value) => (
+ Obj.magic(value): Raw.t_simpleSubscription
+ )
+ };
+ };
+ {simpleSubscription: simpleSubscription};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/tagged_template.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/tagged_template.re
new file mode 100644
index 00000000..631451fa
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/tagged_template.re
@@ -0,0 +1,982 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\n__typename \nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n";
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let { graphql } = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n __typename\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery3 = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let { graphql } = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n __typename\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery3 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery4 = {
+ module Raw = {
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let graphql = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n __typename\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ __typename: string,
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_variousScalars).__typename;
+ value;
+ },
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_variousScalars).__typename;
+ value;
+ };
+ {
+ __typename,
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery4 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/typename.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/typename.re
new file mode 100644
index 00000000..97422484
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/typename.re
@@ -0,0 +1,205 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner),
+ };
+ type t = {first: t_first};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nfirst: nestedObject {\n__typename \ninner {\n__typename \ninner {\n__typename \nfield \n}\n\n}\n\n}\n\n}\n";
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: option(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: option(t_first_inner),
+ };
+ type t = {first: t_first};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ first: {
+ let value = (value: Raw.t).first;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_first).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_first_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_first_inner_inner).__typename;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_first_inner_inner).field;
+ value;
+ },
+ }: t_first_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let first = {
+ let value = (value: t).first;
+ (
+ {
+ let inner = {
+ let value = (value: t_first).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_first_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_first_inner_inner).field;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_first_inner_inner).__typename;
+ value;
+ };
+ {__typename, field};
+ }: Raw.t_first_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first
+ );
+ };
+ {first: first};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/union.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/union.re
new file mode 100644
index 00000000..579fd86a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/union.re
@@ -0,0 +1,380 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\n__typename \nname \nbarkVolume \n}\n\n...on Human {\n__typename \nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQueryNoError = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\n__typename \nname \nbarkVolume \n}\n\n...on Human {\n__typename \nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Human).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Human).__typename;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQueryNoError {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/unionPartial.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/unionPartial.re
new file mode 100644
index 00000000..9e43b640
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/unionPartial.re
@@ -0,0 +1,157 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\n__typename \nname \nbarkVolume \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_dogOrHuman_Dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ }
+ and __typename = {
+ let value = (value: t_dogOrHuman_Dog).__typename;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/apollo-mode/operations/variant.re b/tests_bucklescript/static_snapshots/apollo-mode/operations/variant.re
new file mode 100644
index 00000000..121e5851
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/apollo-mode/operations/variant.re
@@ -0,0 +1,302 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationForVariant_dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman;
+ type t_mutationForVariant;
+ type t = {mutationForVariant: t_mutationForVariant};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationForVariant {\nbaseType \nbaseTypeList \ndog {\n__typename \nname \nbarkVolume \n}\n\nhuman {\n__typename \nname \n}\n\ndogOrHuman {\n__typename\n...on Dog {\n__typename \nname \nbarkVolume \n}\n\n...on Human {\n__typename \nname \n}\n\n}\n\n}\n\n}\n";
+ type t_mutationForVariant_dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_mutationForVariant_dogOrHuman_Dog)
+ | `Human(t_mutationForVariant_dogOrHuman_Human)
+ ];
+ type t_mutationForVariant = [
+ | `BaseType(string)
+ | `BaseTypeList(array(string))
+ | `Dog(t_mutationForVariant_dog)
+ | `Human(t_mutationForVariant_human)
+ | `DogOrHuman(t_mutationForVariant_dogOrHuman)
+ ];
+ type t = {mutationForVariant: t_mutationForVariant};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationForVariant: {
+ let value = (value: Raw.t).mutationForVariant;
+ switch (Js.Json.decodeObject(Obj.magic(value): Js.Json.t)) {
+ | None =>
+ Js.Exn.raiseError(
+ "graphql-ppx: "
+ ++ "Expected type "
+ ++ "VariantTestResult"
+ ++ " to be an object",
+ )
+ | Some(value) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "baseType");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `BaseType(value);
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "baseTypeList");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `BaseTypeList(value |> Js.Array.map(value => value));
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "dog");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `Dog(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationForVariant_dog).__typename;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_mutationForVariant_dog).name;
+ value;
+ },
+ barkVolume: {
+ let value =
+ (value: Raw.t_mutationForVariant_dog).barkVolume;
+ value;
+ },
+ }: t_mutationForVariant_dog,
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "human");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `Human(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_mutationForVariant_human).__typename;
+ value;
+ },
+ name: {
+ let value =
+ (value: Raw.t_mutationForVariant_human).name;
+ value;
+ },
+ }: t_mutationForVariant_human,
+ );
+ | Some(_) =>
+ let temp =
+ Js.Dict.unsafeGet(Obj.magic(value), "dogOrHuman");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `DogOrHuman(
+ {
+ let typename: string =
+ Obj.magic(
+ Js.Dict.unsafeGet(
+ Obj.magic(value),
+ "__typename",
+ ),
+ );
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Dog =
+ Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ __typename;
+ value;
+ },
+ name: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ name;
+ value;
+ },
+ barkVolume: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ barkVolume;
+ value;
+ },
+ }: t_mutationForVariant_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Human =
+ Obj.magic(value);
+ (
+ {
+ __typename: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Human
+ ).
+ __typename;
+ value;
+ },
+ name: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Human
+ ).
+ name;
+ value;
+ },
+ }: t_mutationForVariant_dogOrHuman_Human
+ );
+ },
+ )
+ | _ =>
+ `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_mutationForVariant_dogOrHuman
+ );
+ },
+ );
+ | Some(_) =>
+ Js.Exn.raiseError(
+ "graphql-ppx: "
+ ++ "All fields on variant selection set on type "
+ ++ "VariantTestResult"
+ ++ " were null",
+ )
+ };
+ };
+ };
+ };
+ };
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationForVariant = {
+ let value = (value: t).mutationForVariant;
+ Obj.magic(Js.Json.null);
+ };
+ {mutationForVariant: mutationForVariant};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues2.txt b/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues2.txt
new file mode 100644
index 00000000..a5b5775a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues2.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues2.re 8:13-18
+
+ 6 ┆ query {
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nullableArray: [""]
+ 10 ┆ field: ""
+
+ Invalid argument. The field "nonNullableField" on argument "nonRec" is missing.
diff --git a/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues3.txt b/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues3.txt
new file mode 100644
index 00000000..cd62821e
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues3.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues3.re 9:35
+
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: 5
+ 10 ┆ nullableArray: [""]
+ 11 ┆ field: ""
+
+ Invalid argument. Expected "String!" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues4.txt b/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues4.txt
new file mode 100644
index 00000000..163233ac
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues4.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues4.re 10:32-34
+
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: "!"
+ 10 ┆ nullableArray: [2]
+ 11 ┆ field: ""
+ 12 ┆ enum: FIRST
+
+ Invalid argument. Expected "[String]" but received "[Int!]!".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues5.txt b/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues5.txt
new file mode 100644
index 00000000..10db2d09
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/InvalidObjectValues5.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues5.re 20:23-24
+
+ 18 ┆ otherField: ""
+ 19 ┆ }
+ 20 ┆ enum: []
+ 21 ┆ }
+ 22 ┆ )
+
+ Invalid argument. Expected "Enum" but received "EmptyList!".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/deprecatedFields.txt b/tests_bucklescript/static_snapshots/errors/operations/deprecatedFields.txt
new file mode 100644
index 00000000..0a582f0a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/deprecatedFields.txt
@@ -0,0 +1,4 @@
+File "operations/errors/deprecatedFields.re", line 7, characters 6-21:
+7 | deprecatedField
+ ^^^^^^^^^^^^^^^
+Alert deprecated: Field "deprecatedField" has been deprecated. Reason: Use something else instead
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType1.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType1.txt
new file mode 100644
index 00000000..dd99957a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType1.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType1.re 9:25-28
+
+ 7 ┆ query invalidArgValues {
+ 8 ┆ invalidArgValues(
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. The variable "$arg" on argument "stringRequired" is missing.
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType2.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType2.txt
new file mode 100644
index 00000000..60b2a625
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType2.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType2.re 8:25-28
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable "$arg" to the required argument "stringRequired".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType3.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType3.txt
new file mode 100644
index 00000000..92212cb2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType3.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType3.re 9:17-21
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ string: $arg2
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Expected "String" but received "Int".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType4.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType4.txt
new file mode 100644
index 00000000..03ab435f
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType4.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType4.re 10:14-18
+
+ 8 ┆ invalidArgValues(
+ 9 ┆ custom: $arg
+ 10 ┆ obj: $arg2
+ 11 ┆ stringRequired: ""
+ 12 ┆ )
+
+ Invalid argument. Expected "InputObject" but received "Int".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType5.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType5.txt
new file mode 100644
index 00000000..ee032f35
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType5.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType5.re 9:25-28
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ id: $arg
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable "$arg" to the required argument "stringRequired".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType6.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType6.txt
new file mode 100644
index 00000000..d68b3d30
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidArgVariableType6.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType6.re 8:15-18
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ list: $arg
+ 9 ┆ stringRequired: ""
+ 10 ┆ )
+
+ Invalid argument. Expected "[String]" but received "String".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue1.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue1.txt
new file mode 100644
index 00000000..737644cc
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue1.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue1.re 21:14-26
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ int: "Some string"
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected "Int" but received "String!".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue2.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue2.txt
new file mode 100644
index 00000000..3b3dc627
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue2.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue2.re 8:14-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ int: {test: "xxx"}
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected "Int" but received "InputObject!".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue3.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue3.txt
new file mode 100644
index 00000000..fe3d71df
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue3.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue3.re 21:13
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ id: 5
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected "ID" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue4.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue4.txt
new file mode 100644
index 00000000..a79e71df
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidDefaultValue4.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue4.re 8:17-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ string: ["1", "2"]
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected "String" but received "List".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidObjectValues1.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidObjectValues1.txt
new file mode 100644
index 00000000..cd910433
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidObjectValues1.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidObjectValues1.re 19:37
+
+ 17 ┆ otherField: ""
+ 18 ┆ inner: {
+ 19 ┆ otherField: 5
+ 20 ┆ }
+ 21 ┆ }
+
+ Invalid argument. Expected "String" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidObjectValues6.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidObjectValues6.txt
new file mode 100644
index 00000000..5141729d
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidObjectValues6.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidObjectValues6.re 20:27-37
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: {field: ""}
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected "[InputObject]!" but received "InputObject!".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/invalidObjectValues7.txt b/tests_bucklescript/static_snapshots/errors/operations/invalidObjectValues7.txt
new file mode 100644
index 00000000..4f123fbf
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/invalidObjectValues7.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidObjectValues7.re 20:36
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: [{field: 5}]
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected "String!" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/errors/operations/missingField1.txt b/tests_bucklescript/static_snapshots/errors/operations/missingField1.txt
new file mode 100644
index 00000000..572b6cbd
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/missingField1.txt
@@ -0,0 +1,7 @@
+File "operations/errors/missingField1.re", line 6, characters 6-27:
+6 | thisFieldDoesNotExist
+ ^^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisFieldDoesNotExist' on type CustomScalarObject
+
+ We've found a bug for you!
+ operations/errors/missingField1.re
diff --git a/tests_bucklescript/static_snapshots/errors/operations/missingField2.txt b/tests_bucklescript/static_snapshots/errors/operations/missingField2.txt
new file mode 100644
index 00000000..ef9b79eb
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/missingField2.txt
@@ -0,0 +1,7 @@
+File "operations/errors/missingField2.re", line 13, characters 8-28:
+13 | l1: thisTypeDoesNotExist {
+ ^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisTypeDoesNotExist' on type Query
+
+ We've found a bug for you!
+ operations/errors/missingField2.re
diff --git a/tests_bucklescript/static_snapshots/errors/operations/missingField3.txt b/tests_bucklescript/static_snapshots/errors/operations/missingField3.txt
new file mode 100644
index 00000000..1ae6f235
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/missingField3.txt
@@ -0,0 +1,7 @@
+File "operations/errors/missingField3.re", line 15, characters 6-18:
+15 | doesNotExist
+ ^^^^^^^^^^^^
+Error: Unknown field 'doesNotExist' on type Lists
+
+ We've found a bug for you!
+ operations/errors/missingField3.re
diff --git a/tests_bucklescript/static_snapshots/errors/operations/missingFragment.txt b/tests_bucklescript/static_snapshots/errors/operations/missingFragment.txt
new file mode 100644
index 00000000..2cde476e
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/errors/operations/missingFragment.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/missingFragment.re 3:28-42
+
+ 1 │ module Fragment = [%graphql
+ 2 │ {|
+ 3 │ fragment ListFragment on UnknownFragment {
+ 4 │ nullableOfNullable
+ 5 │ nullableOfNonNullable
+
+ Unknown type "UnknownFragment"
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/GraphQL_PPX.re b/tests_bucklescript/static_snapshots/legacy/operations/GraphQL_PPX.re
new file mode 100644
index 00000000..67109305
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/GraphQL_PPX.re
@@ -0,0 +1,66 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+
+let%private clone: Js.Dict.t('a) => Js.Dict.t('a) =
+ a => Obj.magic(Js.Obj.assign(Obj.magic(Js.Obj.empty()), Obj.magic(a)));
+
+let rec deepMerge = (json1: Js.Json.t, json2: Js.Json.t) =>
+ switch (
+ (
+ Obj.magic(json1) == Js.null,
+ Js_array2.isArray(json1),
+ Js.typeof(json1) == "object",
+ ),
+ (
+ Obj.magic(json2) == Js.null,
+ Js_array2.isArray(json2),
+ Js.typeof(json2) == "object",
+ ),
+ ) {
+ | ((_, true, _), (_, true, _)) => (
+ Obj.magic(
+ Js.Array.mapi(
+ (el1, idx) => {
+ let el2 = Js.Array.unsafe_get(Obj.magic(json2), idx);
+
+ Js.typeof(el2) == "object" ? deepMerge(el1, el2) : el2;
+ },
+ Obj.magic(json1),
+ ),
+ ): Js.Json.t
+ )
+
+ | ((false, false, true), (false, false, true)) =>
+ let obj1 = clone(Obj.magic(json1));
+ let obj2 = Obj.magic(json2);
+ Js.Dict.keys(obj2)
+ |> Js.Array.forEach(key =>
+ let existingVal: Js.Json.t = Js.Dict.unsafeGet(obj1, key);
+ let newVal: Js.Json.t = Js.Dict.unsafeGet(obj2, key);
+ Js.Dict.set(
+ obj1,
+ key,
+ Js.typeof(existingVal) != "object"
+ ? newVal : Obj.magic(deepMerge(existingVal, newVal)),
+ );
+ );
+ Obj.magic(obj1);
+
+ | ((_, _, _), (_, _, _)) => json2
+ };
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/argNamedQuery.re b/tests_bucklescript/static_snapshots/legacy/operations/argNamedQuery.re
new file mode 100644
index 00000000..a10f7bda
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/argNamedQuery.re
@@ -0,0 +1,101 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "argNamedQuery": int};
+ type t_variables = {. "query": int};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($query: Int!) {\nargNamedQuery(query: $query) \n}\n";
+ type t = {. "argNamedQuery": int};
+ type t_variables = {. "query": int};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let argNamedQuery = {
+ let value = value##argNamedQuery;
+ value;
+ };
+ {"argNamedQuery": argNamedQuery};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let argNamedQuery = {
+ let value = value##argNamedQuery;
+ value;
+ };
+ {"argNamedQuery": argNamedQuery};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"query": (a => a)(inp##query)};
+ let make = (~query, ()) => {
+ "query": query,
+ "variables": serializeVariables({"query": query}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~query, ()) =>
+ serializeVariables({"query": query}: t_variables);
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/comment.re b/tests_bucklescript/static_snapshots/legacy/operations/comment.re
new file mode 100644
index 00000000..f0fb0e1b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/comment.re
@@ -0,0 +1,284 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "nonrecursiveInput": string};
+ type t_variables = {. "arg": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "field": Js.Nullable.t(string),
+ "enum": Js.Nullable.t(string),
+ "embeddedInput":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ "custom": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n";
+ type t = {. "nonrecursiveInput": string};
+ type t_variables = {. "arg": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": option(array(option(string))),
+ "field": option(string),
+ "enum": option([ | `FIRST | `SECOND | `THIRD]),
+ "embeddedInput": option(array(option(t_variables_EmbeddedInput))),
+ "custom": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {"nonrecursiveInput": nonrecursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {"nonrecursiveInput": nonrecursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ "nonNullableField": (a => a)(inp##nonNullableField),
+ "nullableArray":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ "enum":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ "embeddedInput":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ "custom":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let make = (~arg, ()) => {
+ "query": query,
+ "variables": serializeVariables({"arg": arg}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ "nonNullableField": nonNullableField,
+ "nullableArray": nullableArray,
+ "field": field,
+ "enum": enum,
+ "embeddedInput": embeddedInput,
+ "custom": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ "field": field,
+ };
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/customDecoder.re b/tests_bucklescript/static_snapshots/legacy/operations/customDecoder.re
new file mode 100644
index 00000000..708c9ed9
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/customDecoder.re
@@ -0,0 +1,131 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module StringOfInt = {
+ let parse = string_of_int;
+ let serialize = int_of_string;
+ type t = string;
+};
+module IntOfString = {
+ let parse = int_of_string;
+ let serialize = string_of_int;
+ type t = int;
+};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "string": string,
+ "int": int,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nstring \nint \n}\n\n}\n";
+ type t_variousScalars = {
+ .
+ "string": IntOfString.t,
+ "int": StringOfInt.t,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = value##int;
+ StringOfInt.parse(value);
+ }
+ and string = {
+ let value = value##string;
+ IntOfString.parse(value);
+ };
+ {"string": string, "int": int};
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = value##int;
+ StringOfInt.serialize(value);
+ }
+ and string = {
+ let value = value##string;
+ IntOfString.serialize(value);
+ };
+ {"string": string, "int": int};
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/customScalars.re b/tests_bucklescript/static_snapshots/legacy/operations/customScalars.re
new file mode 100644
index 00000000..e0718fa0
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/customScalars.re
@@ -0,0 +1,153 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_customScalarField = {
+ .
+ "nullable": Js.Nullable.t(Js.Json.t),
+ "nonNullable": Js.Json.t,
+ };
+ type t = {. "customScalarField": t_customScalarField};
+ type t_variables = {
+ .
+ "opt": Js.Nullable.t(Js.Json.t),
+ "req": Js.Json.t,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($opt: CustomScalar, $req: CustomScalar!) {\ncustomScalarField(argOptional: $opt, argRequired: $req) {\nnullable \nnonNullable \n}\n\n}\n";
+ type t_customScalarField = {
+ .
+ "nullable": option(Js.Json.t),
+ "nonNullable": Js.Json.t,
+ };
+ type t = {. "customScalarField": t_customScalarField};
+ type t_variables = {
+ .
+ "opt": option(Js.Json.t),
+ "req": Js.Json.t,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let customScalarField = {
+ let value = value##customScalarField;
+ let nonNullable = {
+ let value = value##nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = value##nullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {"nullable": nullable, "nonNullable": nonNullable};
+ };
+ {"customScalarField": customScalarField};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let customScalarField = {
+ let value = value##customScalarField;
+ let nonNullable = {
+ let value = value##nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = value##nullable;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullable": nullable, "nonNullable": nonNullable};
+ };
+ {"customScalarField": customScalarField};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "opt":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##opt,
+ ),
+ "req": (a => a)(inp##req),
+ };
+ let make = (~opt=?, ~req, ()) => {
+ "query": query,
+ "variables": serializeVariables({"opt": opt, "req": req}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~opt=?, ~req, ()) =>
+ serializeVariables({"opt": opt, "req": req}: t_variables);
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/customTypes.re b/tests_bucklescript/static_snapshots/legacy/operations/customTypes.re
new file mode 100644
index 00000000..2623b68a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/customTypes.re
@@ -0,0 +1,195 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Color = {
+ type t =
+ | Red
+ | Green
+ | Blue;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some("green") => Green
+ | Some("blue") => Blue
+ | Some("red")
+ | Some(_)
+ | None => Red
+ };
+ let serialize = color =>
+ (
+ switch (color) {
+ | Red => "red"
+ | Green => "green"
+ | Blue => "blue"
+ }
+ )
+ |> Js.Json.string;
+};
+module DateTime = {
+ type t = Js.Date.t;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(str) => str |> Js.Date.fromString
+ | None => Js.Date.make()
+ };
+ let serialize = date => date |> Js.Date.toISOString |> Js.Json.string;
+};
+module MyQuery = {
+ module Raw = {
+ type t_customFields = {
+ .
+ "currentTime": Js.Json.t,
+ "favoriteColor": Js.Json.t,
+ "futureTime": Js.Nullable.t(Js.Json.t),
+ "nullableColor": Js.Nullable.t(Js.Json.t),
+ };
+ type t = {. "customFields": t_customFields};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ncustomFields {\ncurrentTime \nfavoriteColor \nfutureTime \nnullableColor \n}\n\n}\n";
+ type t_customFields = {
+ .
+ "currentTime": DateTime.t,
+ "favoriteColor": Color.t,
+ "futureTime": option(DateTime.t),
+ "nullableColor": option(Color.t),
+ };
+ type t = {. "customFields": t_customFields};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let customFields = {
+ let value = value##customFields;
+ let nullableColor = {
+ let value = value##nullableColor;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(Color.parse(value))
+ | None => None
+ };
+ }
+ and futureTime = {
+ let value = value##futureTime;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(DateTime.parse(value))
+ | None => None
+ };
+ }
+ and favoriteColor = {
+ let value = value##favoriteColor;
+ Color.parse(value);
+ }
+ and currentTime = {
+ let value = value##currentTime;
+ DateTime.parse(value);
+ };
+ {
+ "currentTime": currentTime,
+ "favoriteColor": favoriteColor,
+ "futureTime": futureTime,
+ "nullableColor": nullableColor,
+ };
+ };
+ {"customFields": customFields};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let customFields = {
+ let value = value##customFields;
+ let nullableColor = {
+ let value = value##nullableColor;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(Color.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and futureTime = {
+ let value = value##futureTime;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(DateTime.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and favoriteColor = {
+ let value = value##favoriteColor;
+ Color.serialize(value);
+ }
+ and currentTime = {
+ let value = value##currentTime;
+ DateTime.serialize(value);
+ };
+ {
+ "currentTime": currentTime,
+ "favoriteColor": favoriteColor,
+ "futureTime": futureTime,
+ "nullableColor": nullableColor,
+ };
+ };
+ {"customFields": customFields};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/defaultObjectValueOnScalar.re b/tests_bucklescript/static_snapshots/legacy/operations/defaultObjectValueOnScalar.re
new file mode 100644
index 00000000..7e8166f1
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/defaultObjectValueOnScalar.re
@@ -0,0 +1,95 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "defaultObjectValueOnScalar": string};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndefaultObjectValueOnScalar(filter: {some: {json: \"value\"}}, arg: {field: \"otherValue\"}) \n}\n";
+ type t = {. "defaultObjectValueOnScalar": string};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let defaultObjectValueOnScalar = {
+ let value = value##defaultObjectValueOnScalar;
+ value;
+ };
+ {"defaultObjectValueOnScalar": defaultObjectValueOnScalar};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let defaultObjectValueOnScalar = {
+ let value = value##defaultObjectValueOnScalar;
+ value;
+ };
+ {"defaultObjectValueOnScalar": defaultObjectValueOnScalar};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/enumInput.re b/tests_bucklescript/static_snapshots/legacy/operations/enumInput.re
new file mode 100644
index 00000000..c8a64db0
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/enumInput.re
@@ -0,0 +1,122 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "enumInput": string};
+ type t_variables = {. "arg": string};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: SampleField!) {\nenumInput(arg: $arg) \n}\n";
+ type t = {. "enumInput": string};
+ type t_variables = {. "arg": [ | `FIRST | `SECOND | `THIRD]};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let enumInput = {
+ let value = value##enumInput;
+ value;
+ };
+ {"enumInput": enumInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let enumInput = {
+ let value = value##enumInput;
+ value;
+ };
+ {"enumInput": enumInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg":
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ inp##arg,
+ ),
+ };
+ let make = (~arg, ()) => {
+ "query": query,
+ "variables": serializeVariables({"arg": arg}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables);
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_SampleField_47;
+ /**```
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}
+```*/
+ let _graphql_SampleField_47: _graphql_SampleField_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/explicit_object_record.re b/tests_bucklescript/static_snapshots/legacy/operations/explicit_object_record.re
new file mode 100644
index 00000000..df680c12
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/explicit_object_record.re
@@ -0,0 +1,373 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module RecordsQuery = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 RecordsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ObjectsQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ObjectsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/extensions.re b/tests_bucklescript/static_snapshots/legacy/operations/extensions.re
new file mode 100644
index 00000000..ebc3d9d4
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/extensions.re
@@ -0,0 +1,216 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ type t_variables;
+ };
+ type t;
+ type t_variables;
+
+ let query: string;
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+};
+
+module Parent = {
+ module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => ();
+ };
+};
+module Bla' = {
+ module Raw = {
+ type t_lists = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query Bla {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Bla = {
+ include Bla';
+ include Parent.ExtendQuery(Bla');
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/fragmentDefinition.re b/tests_bucklescript/static_snapshots/legacy/operations/fragmentDefinition.re
new file mode 100644
index 00000000..aa60fe6f
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/fragmentDefinition.re
@@ -0,0 +1,915 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module GraphQL_PPX = {
+ let deepMerge = (json1, _) => json1;
+};
+module ListFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment ListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ };
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ };
+ };
+ let name = "ListFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Another = {
+ /**The GraphQL query string*/
+ let query = "fragment Another on Lists {\nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {. "nullableOfNonNullable": Js.Nullable.t(array(string))};
+ type nonrec t_Lists = t;
+ };
+ type t = {. "nullableOfNonNullable": option(array(string))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ };
+ {"nullableOfNonNullable": nullableOfNonNullable};
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableOfNonNullable": nullableOfNonNullable};
+ };
+ let name = "Another";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module FragmentWithArgs = {
+ /**The GraphQL query string*/
+ let query = "fragment FragmentWithArgs on Lists {\nlistWithArg(arg1: $arg1) \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "listWithArg": Js.Nullable.t(array(Js.Nullable.t(string))),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {. "listWithArg": option(array(option(string)))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listWithArg = {
+ let value = value##listWithArg;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {"listWithArg": listWithArg};
+ };
+ let verifyArgsAndParse = (~arg1 as _arg1: [ | `String], value: Raw.t) =>
+ parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listWithArg = {
+ let value = value##listWithArg;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"listWithArg": listWithArg};
+ };
+ let name = "FragmentWithArgs";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+
+module InlineFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment InlineListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ };
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ };
+ };
+ let name = "InlineListFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery = {
+ module Raw = {
+ type t_l2;
+ type t_l3;
+ type t_l4;
+ type t = {
+ .
+ "l1": ListFragment.Raw.t,
+ "l2": t_l2,
+ "l3": t_l3,
+ "l4": t_l4,
+ "l5": FragmentWithArgs.Raw.t,
+ };
+ type t_variables = {. "arg1": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ "query MyQuery($arg1: String) {\nl1: lists {\n..."
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl2: lists {\n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl3: lists {\nnullableOfNullable \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl4: lists {\nnullableOfNullable \n..."
+ )
+ ++ InlineFragment.name
+ )
+ ++ " \n}\n\nl5: lists {\n..."
+ )
+ ++ FragmentWithArgs.name
+ )
+ ++ " \n}\n\n}\n"
+ )
+ ++ FragmentWithArgs.query
+ )
+ ++ InlineFragment.query
+ )
+ ++ ListFragment.query;
+ type t_l2 = {
+ .
+ "frag1": ListFragment.t_Lists,
+ "frag2": ListFragment.t_Lists,
+ };
+ type t_l3 = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "frag1": ListFragment.t_Lists,
+ "frag2": ListFragment.t_Lists,
+ };
+ type t_l4 = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "inlineFragment": InlineFragment.t_Lists,
+ };
+ type t = {
+ .
+ "l1": ListFragment.t,
+ "l2": t_l2,
+ "l3": t_l3,
+ "l4": t_l4,
+ "l5": FragmentWithArgs.t,
+ };
+ type t_variables = {. "arg1": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let l5 = {
+ let value = value##l5;
+ FragmentWithArgs.verifyArgsAndParse(~arg1=`String, value);
+ }
+ and l4 = {
+ let value = value##l4;
+ let inlineFragment = {
+ let value: InlineFragment.Raw.t = Obj.magic(value);
+ InlineFragment.verifyArgsAndParse(value);
+ }
+ and nullableOfNullable = {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "nullableOfNullable"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "inlineFragment": inlineFragment,
+ };
+ }
+ and l3 = {
+ let value = value##l3;
+ let frag2 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and frag1 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and nullableOfNullable = {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "nullableOfNullable"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "frag1": frag1,
+ "frag2": frag2,
+ };
+ }
+ and l2 = {
+ let value = value##l2;
+ let frag2 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and frag1 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {"frag1": frag1, "frag2": frag2};
+ }
+ and l1 = {
+ let value = value##l1;
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {"l1": l1, "l2": l2, "l3": l3, "l4": l4, "l5": l5};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let l5 = {
+ let value = value##l5;
+ FragmentWithArgs.serialize(value);
+ }
+ and l4 = {
+ let value = value##l4;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableOfNullable": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(InlineFragment.serialize(value##inlineFragment)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l4
+ );
+ }
+ and l3 = {
+ let value = value##l3;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableOfNullable": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (Obj.magic(ListFragment.serialize(value##frag1)): Js.Json.t),
+ (Obj.magic(ListFragment.serialize(value##frag2)): Js.Json.t),
+ |],
+ ),
+ ): Raw.t_l3
+ );
+ }
+ and l2 = {
+ let value = value##l2;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(Js.Dict.empty): Js.Json.t,
+ [|
+ (Obj.magic(ListFragment.serialize(value##frag1)): Js.Json.t),
+ (Obj.magic(ListFragment.serialize(value##frag2)): Js.Json.t),
+ |],
+ ),
+ ): Raw.t_l2
+ );
+ }
+ and l1 = {
+ let value = value##l1;
+ ListFragment.serialize(value);
+ };
+ {"l1": l1, "l2": l2, "l3": l3, "l4": l4, "l5": l5};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg1":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##arg1,
+ ),
+ };
+ let make = (~arg1=?, ()) => {
+ "query": query,
+ "variables": serializeVariables({"arg1": arg1}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~arg1=?, ()) =>
+ serializeVariables({"arg1": arg1}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {. "lists": ListFragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (("query {\nlists {\n..." ++ ListFragment.name) ++ " \n}\n\n}\n")
+ ++ ListFragment.query;
+ type t = {. "lists": ListFragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ ListFragment.serialize(value);
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/interface.re b/tests_bucklescript/static_snapshots/legacy/operations/interface.re
new file mode 100644
index 00000000..f23f4bb6
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/interface.re
@@ -0,0 +1,18 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/lists.re b/tests_bucklescript/static_snapshots/legacy/operations/lists.re
new file mode 100644
index 00000000..b06ca13a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/lists.re
@@ -0,0 +1,194 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/listsArgs.re b/tests_bucklescript/static_snapshots/legacy/operations/listsArgs.re
new file mode 100644
index 00000000..284425d2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/listsArgs.re
@@ -0,0 +1,207 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "listsInput": string};
+ type t_variables = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \n}\n";
+ type t = {. "listsInput": string};
+ type t_variables = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {"listsInput": listsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {"listsInput": listsInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "nullableOfNullable":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableOfNullable,
+ ),
+ "nullableOfNonNullable":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ inp##nullableOfNonNullable,
+ ),
+ "nonNullableOfNullable":
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ inp##nonNullableOfNullable,
+ ),
+ "nonNullableOfNonNullable":
+ (a => Array.map(b => (a => a)(b), a))(
+ inp##nonNullableOfNonNullable,
+ ),
+ };
+ let make =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) => {
+ "query": query,
+ "variables":
+ serializeVariables(
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ }: t_variables,
+ ),
+ "parse": parse,
+ }
+ and makeVariables =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ }: t_variables,
+ );
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/listsInput.re b/tests_bucklescript/static_snapshots/legacy/operations/listsInput.re
new file mode 100644
index 00000000..556cda06
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/listsInput.re
@@ -0,0 +1,207 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "listsInput": string};
+ type t_variables = {. "arg": t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: ListsInput!) {\nlistsInput(arg: $arg) \n}\n";
+ type t = {. "listsInput": string};
+ type t_variables = {. "arg": t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {"listsInput": listsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {"listsInput": listsInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {"arg": (a => serializeInputObjectListsInput(a))(inp##arg)}
+ and serializeInputObjectListsInput:
+ t_variables_ListsInput => Raw.t_variables_ListsInput =
+ inp => {
+ "nullableOfNullable":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableOfNullable,
+ ),
+ "nullableOfNonNullable":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ inp##nullableOfNonNullable,
+ ),
+ "nonNullableOfNullable":
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ inp##nonNullableOfNullable,
+ ),
+ "nonNullableOfNonNullable":
+ (a => Array.map(b => (a => a)(b), a))(
+ inp##nonNullableOfNonNullable,
+ ),
+ };
+ let make = (~arg, ()) => {
+ "query": query,
+ "variables": serializeVariables({"arg": arg}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectListsInput =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ )
+ : t_variables_ListsInput => {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_ListsInput_47;
+ /**```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}
+```*/
+ let _graphql_ListsInput_47: _graphql_ListsInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/mutation.re b/tests_bucklescript/static_snapshots/legacy/operations/mutation.re
new file mode 100644
index 00000000..d4ad49e3
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/mutation.re
@@ -0,0 +1,208 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationWithError_value = {. "stringField": string};
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ "field": t_mutationWithError_errors_field,
+ "message": string,
+ };
+ type t_mutationWithError = {
+ .
+ "value": Js.Nullable.t(t_mutationWithError_value),
+ "errors": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nvalue {\nstringField \n}\n\nerrors {\nfield \nmessage \n}\n\n}\n\n}\n";
+ type t_mutationWithError_value = {. "stringField": string};
+ type t_mutationWithError_errors_field = [
+ | `FutureAddedValue(string)
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+ type t_mutationWithError_errors = {
+ .
+ "field": t_mutationWithError_errors_field,
+ "message": string,
+ };
+ type t_mutationWithError = {
+ .
+ "value": option(t_mutationWithError_value),
+ "errors": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let message = {
+ let value = value##message;
+ value;
+ }
+ and field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | other => `FutureAddedValue(other)
+ };
+ };
+ {"field": field, "message": message};
+ ),
+ )
+ | None => None
+ };
+ }
+ and value = {
+ let value = value##value;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let stringField = {
+ let value = value##stringField;
+ value;
+ };
+ {"stringField": stringField};
+ },
+ )
+ | None => None
+ };
+ };
+ {"value": value, "errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let message = {
+ let value = value##message;
+ value;
+ }
+ and field = {
+ let value = value##field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ | `FutureAddedValue(other) => other
+ };
+ };
+ {"field": field, "message": message};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and value = {
+ let value = value##value;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let stringField = {
+ let value = value##stringField;
+ value;
+ };
+ {"stringField": stringField};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"value": value, "errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/mutationWithArgs.re b/tests_bucklescript/static_snapshots/legacy/operations/mutationWithArgs.re
new file mode 100644
index 00000000..6ad8b3eb
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/mutationWithArgs.re
@@ -0,0 +1,101 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ };
+ /**The GraphQL query string*/
+ let query = "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n";
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"required": (a => a)(inp##required)};
+ let make = (~required, ()) => {
+ "query": query,
+ "variables": serializeVariables({"required": required}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~required, ()) =>
+ serializeVariables({"required": required}: t_variables);
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/mutationWithArgsAndNoRecords.re b/tests_bucklescript/static_snapshots/legacy/operations/mutationWithArgsAndNoRecords.re
new file mode 100644
index 00000000..6ad8b3eb
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/mutationWithArgsAndNoRecords.re
@@ -0,0 +1,101 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ };
+ /**The GraphQL query string*/
+ let query = "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n";
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"required": (a => a)(inp##required)};
+ let make = (~required, ()) => {
+ "query": query,
+ "variables": serializeVariables({"required": required}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~required, ()) =>
+ serializeVariables({"required": required}: t_variables);
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/nested.re b/tests_bucklescript/static_snapshots/legacy/operations/nested.re
new file mode 100644
index 00000000..5765852e
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/nested.re
@@ -0,0 +1,326 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type record = {
+ f1: string,
+ f2: string,
+};
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {. "field": string};
+ type t_first_inner = {. "inner": Js.Nullable.t(t_first_inner_inner)};
+ type t_first = {. "inner": Js.Nullable.t(t_first_inner)};
+ type t_second_inner_inner = {
+ .
+ "f1": string,
+ "f2": string,
+ };
+ type t_second_inner = {. "inner": Js.Nullable.t(t_second_inner_inner)};
+ type t_second = {. "inner": Js.Nullable.t(t_second_inner)};
+ type t_let_inner_inner = {. "field": string};
+ type t_let_inner = {. "inner": Js.Nullable.t(t_let_inner_inner)};
+ type t_let = {. "inner": Js.Nullable.t(t_let_inner)};
+ type t = {
+ .
+ "first": t_first,
+ "second": t_second,
+ "let_": t_let,
+ };
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nfirst: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\nsecond: nestedObject {\ninner {\ninner {\nf1: field \nf2: field \n}\n\n}\n\n}\n\nlet: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\n}\n";
+ type t_first_inner_inner = {. "field": string};
+ type t_first_inner = {. "inner": option(t_first_inner_inner)};
+ type t_first = {. "inner": option(t_first_inner)};
+ type t_second_inner_inner = {
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {. "inner": option(t_second_inner_inner)};
+ type t_second = {. "inner": option(t_second_inner)};
+ type t_let_inner_inner = {. "field": string};
+ type t_let_inner = {. "inner": option(t_let_inner_inner)};
+ type t_let = {. "inner": option(t_let_inner)};
+ type t = {
+ .
+ "first": t_first,
+ "second": t_second,
+ "let_": t_let,
+ };
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let let_ = {
+ let value = value##let_;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {"field": field};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ }
+ and second = {
+ let value = value##second;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let f2 = {
+ let value = value##f2;
+ value;
+ }
+ and f1 = {
+ let value = value##f1;
+ value;
+ };
+ {f1, f2};
+ }: t_second_inner_inner,
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ }
+ and first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {"field": field};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ };
+ {"first": first, "second": second, "let_": let_};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let let_ = {
+ let value = value##let_;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {"field": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ }
+ and second = {
+ let value = value##second;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let f2 = {
+ let value = (value: t_second_inner_inner).f2;
+ value;
+ }
+ and f1 = {
+ let value = (value: t_second_inner_inner).f1;
+ value;
+ };
+ {"f1": f1, "f2": f2};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ }
+ and first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {"field": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ };
+ {"first": first, "second": second, "let_": let_};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/nonrecursiveInput.re b/tests_bucklescript/static_snapshots/legacy/operations/nonrecursiveInput.re
new file mode 100644
index 00000000..c54ee080
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/nonrecursiveInput.re
@@ -0,0 +1,588 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "nonrecursiveInput": string};
+ type t_variables = {. "arg": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "field": Js.Nullable.t(string),
+ "enum": Js.Nullable.t(string),
+ "embeddedInput":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ "custom": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n";
+ type t = {. "nonrecursiveInput": string};
+ type t_variables = {. "arg": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": option(array(option(string))),
+ "field": option(string),
+ "enum": option([ | `FIRST | `SECOND | `THIRD]),
+ "embeddedInput": option(array(option(t_variables_EmbeddedInput))),
+ "custom": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {"nonrecursiveInput": nonrecursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {"nonrecursiveInput": nonrecursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ "nonNullableField": (a => a)(inp##nonNullableField),
+ "nullableArray":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ "enum":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ "embeddedInput":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ "custom":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let make = (~arg, ()) => {
+ "query": query,
+ "variables": serializeVariables({"arg": arg}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ "nonNullableField": nonNullableField,
+ "nullableArray": nullableArray,
+ "field": field,
+ "enum": enum,
+ "embeddedInput": embeddedInput,
+ "custom": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ "field": field,
+ };
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {
+ .
+ "scalarsInput": string,
+ "more": string,
+ };
+ type t_variables = {
+ .
+ "arg": t_variables_NonrecursiveInput,
+ "arg2": t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "field": Js.Nullable.t(string),
+ "enum": Js.Nullable.t(string),
+ "embeddedInput":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ "custom": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\nscalarsInput(arg: $arg) \nmore: scalarsInput(arg: $arg2) \n}\n";
+ type t = {
+ .
+ "scalarsInput": string,
+ "more": string,
+ };
+ type t_variables = {
+ .
+ "arg": t_variables_NonrecursiveInput,
+ "arg2": t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": option(array(option(string))),
+ "field": option(string),
+ "enum": option([ | `FIRST | `SECOND | `THIRD]),
+ "embeddedInput": option(array(option(t_variables_EmbeddedInput))),
+ "custom": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let more = {
+ let value = value##more;
+ value;
+ }
+ and scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput, "more": more};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let more = {
+ let value = value##more;
+ value;
+ }
+ and scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput, "more": more};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ "arg2": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg2),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ "nonNullableField": (a => a)(inp##nonNullableField),
+ "nullableArray":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ "enum":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ "embeddedInput":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ "custom":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let make = (~arg, ~arg2, ()) => {
+ "query": query,
+ "variables": serializeVariables({"arg": arg, "arg2": arg2}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~arg, ~arg2, ()) =>
+ serializeVariables({"arg": arg, "arg2": arg2}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ "nonNullableField": nonNullableField,
+ "nullableArray": nullableArray,
+ "field": field,
+ "enum": enum,
+ "embeddedInput": embeddedInput,
+ "custom": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ "field": field,
+ };
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_169;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_169: _graphql_NonrecursiveInput_169 =
+ Obj.magic(0);
+ type nonrec _graphql_NonrecursiveInput_196;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_196: _graphql_NonrecursiveInput_196 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/omitFutureValueEnum.re b/tests_bucklescript/static_snapshots/legacy/operations/omitFutureValueEnum.re
new file mode 100644
index 00000000..309171d3
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/omitFutureValueEnum.re
@@ -0,0 +1,468 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [
+ | `FutureAddedValue(string)
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | other => `FutureAddedValue(other)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ | `FutureAddedValue(other) => other
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [ | `FIRST | `SECOND | `THIRD];
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | _ => raise(Not_found)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [ | `FIRST | `SECOND | `THIRD];
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | _ => raise(Not_found)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/omitFutureValueUnion.re b/tests_bucklescript/static_snapshots/legacy/operations/omitFutureValueUnion.re
new file mode 100644
index 00000000..5b4d9d2f
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/omitFutureValueUnion.re
@@ -0,0 +1,494 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/pokedexApolloMode.re b/tests_bucklescript/static_snapshots/legacy/operations/pokedexApolloMode.re
new file mode 100644
index 00000000..5c57b1e2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/pokedexApolloMode.re
@@ -0,0 +1,143 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ .
+ "id": string,
+ "name": Js.Nullable.t(string),
+ };
+ type t = {. "pokemon": Js.Nullable.t(t_pokemon)};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\npokemon(name: \"Pikachu\") {\nid \nname \n}\n\n}\n";
+ type t_pokemon = {
+ .
+ "id": string,
+ "name": option(string),
+ };
+ type t = {. "pokemon": option(t_pokemon)};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let name = {
+ let value = value##name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {"id": id, "name": name};
+ },
+ )
+ | None => None
+ };
+ };
+ {"pokemon": pokemon};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = value##name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {"id": id, "name": name};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"pokemon": pokemon};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/pokedexScalars.re b/tests_bucklescript/static_snapshots/legacy/operations/pokedexScalars.re
new file mode 100644
index 00000000..ed9e740f
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/pokedexScalars.re
@@ -0,0 +1,179 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ .
+ "id": string,
+ "name": Js.Nullable.t(string),
+ };
+ type t = {. "pokemon": Js.Nullable.t(t_pokemon)};
+ type t_variables = {
+ .
+ "id": Js.Nullable.t(string),
+ "name": Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query pokemon($id: String, $name: String) {\npokemon(name: $name, id: $id) {\nid \nname \n}\n\n}\n";
+ type t_pokemon = {
+ .
+ "id": string,
+ "name": option(string),
+ };
+ type t = {. "pokemon": option(t_pokemon)};
+ type t_variables = {
+ .
+ "id": option(string),
+ "name": option(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let name = {
+ let value = value##name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {"id": id, "name": name};
+ },
+ )
+ | None => None
+ };
+ };
+ {"pokemon": pokemon};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = value##name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {"id": id, "name": name};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"pokemon": pokemon};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "id":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##id,
+ ),
+ "name":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##name,
+ ),
+ };
+ let make = (~id=?, ~name=?, ()) => {
+ "query": query,
+ "variables": serializeVariables({"id": id, "name": name}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~id=?, ~name=?, ()) =>
+ serializeVariables({"id": id, "name": name}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/record.re b/tests_bucklescript/static_snapshots/legacy/operations/record.re
new file mode 100644
index 00000000..8c0cc75d
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/record.re
@@ -0,0 +1,754 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type scalars = {
+ string,
+ int,
+};
+
+type dog = {
+ name: string,
+ barkVolume: float,
+};
+
+type oneFieldQuery = {nullableString: option(string)};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "string": string,
+ "int": int,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nstring \nint \n}\n\n}\n";
+ type t = {. "variousScalars": scalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ (
+ {
+ let int = {
+ let value = value##int;
+ value;
+ }
+ and string = {
+ let value = value##string;
+ value;
+ };
+ {string, int};
+ }: scalars
+ );
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = (value: scalars).int;
+ value;
+ }
+ and string = {
+ let value = (value: scalars).string;
+ value;
+ };
+ {"string": string, "int": int};
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module OneFieldQuery = {
+ module Raw = {
+ type t_variousScalars = {. "nullableString": Js.Nullable.t(string)};
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nnullableString \n}\n\n}\n";
+ type t_variousScalars = {nullableString: option(string)};
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ (
+ {
+ let nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {nullableString: nullableString};
+ }: t_variousScalars
+ );
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableString": nullableString};
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 OneFieldQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ExternalFragmentQuery = {
+ module Fragment = {
+ /**The GraphQL query string*/
+ let query = "fragment Fragment on VariousScalars {\nstring \nint \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "string": string,
+ "int": int,
+ };
+ type nonrec t_VariousScalars = t;
+ };
+ type t = {
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ let int = {
+ let value = value##int;
+ value;
+ }
+ and string = {
+ let value = value##string;
+ value;
+ };
+ {string, int};
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let int = {
+ let value = (value: t).int;
+ value;
+ }
+ and string = {
+ let value = (value: t).string;
+ value;
+ };
+ {"string": string, "int": int};
+ };
+ let name = "Fragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+VariousScalars {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t = {. "variousScalars": Fragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ ("query {\nvariousScalars {\n..." ++ Fragment.name)
+ ++ " \n}\n\n}\n"
+ )
+ ++ Fragment.query;
+ type t = {. "variousScalars": Fragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ Fragment.verifyArgsAndParse(value);
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ Fragment.serialize(value);
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+module InlineFragmentQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {name, barkVolume};
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 InlineFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module UnionExternalFragmentQuery = {
+ module DogFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment DogFragment on Dog {\nname \nbarkVolume \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type nonrec t_Dog = t;
+ };
+ type t = {
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {name, barkVolume};
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let barkVolume = {
+ let value = (value: t).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t).name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ };
+ let name = "DogFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Dog {
+ name: String!
+ barkVolume: Float!
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ "query {\ndogOrHuman {\n__typename\n...on Dog {\n..."
+ ++ DogFragment.name
+ )
+ ++ " \n}\n\n}\n\n}\n"
+ )
+ ++ DogFragment.query;
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(DogFragment.t)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: DogFragment.Raw.t = Obj.magic(value);
+ DogFragment.verifyArgsAndParse(value);
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(DogFragment.serialize(value)): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/recursiveInput.re b/tests_bucklescript/static_snapshots/legacy/operations/recursiveInput.re
new file mode 100644
index 00000000..24ed4ff3
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/recursiveInput.re
@@ -0,0 +1,177 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "recursiveInput": string};
+ type t_variables = {. "arg": t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ .
+ "otherField": Js.Nullable.t(string),
+ "inner": Js.Nullable.t(t_variables_RecursiveInput),
+ "enum": Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: RecursiveInput!) {\nrecursiveInput(arg: $arg) \n}\n";
+ type t = {. "recursiveInput": string};
+ type t_variables = {. "arg": t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ .
+ "otherField": option(string),
+ "inner": option(t_variables_RecursiveInput),
+ "enum": option([ | `FIRST | `SECOND | `THIRD]),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let recursiveInput = {
+ let value = value##recursiveInput;
+ value;
+ };
+ {"recursiveInput": recursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let recursiveInput = {
+ let value = value##recursiveInput;
+ value;
+ };
+ {"recursiveInput": recursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {"arg": (a => serializeInputObjectRecursiveInput(a))(inp##arg)}
+ and serializeInputObjectRecursiveInput:
+ t_variables_RecursiveInput => Raw.t_variables_RecursiveInput =
+ inp => {
+ "otherField":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##otherField,
+ ),
+ "inner":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectRecursiveInput(a))(b),
+ )
+ }
+ )(
+ inp##inner,
+ ),
+ "enum":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ };
+ let make = (~arg, ()) => {
+ "query": query,
+ "variables": serializeVariables({"arg": arg}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectRecursiveInput =
+ (~otherField=?, ~inner=?, ~enum=?, ()): t_variables_RecursiveInput => {
+ "otherField": otherField,
+ "inner": inner,
+ "enum": enum,
+ };
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_RecursiveInput_47;
+ /**```
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}
+```*/
+ let _graphql_RecursiveInput_47: _graphql_RecursiveInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/scalars.re b/tests_bucklescript/static_snapshots/legacy/operations/scalars.re
new file mode 100644
index 00000000..e2461fec
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/scalars.re
@@ -0,0 +1,253 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n";
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/scalarsArgs.re b/tests_bucklescript/static_snapshots/legacy/operations/scalarsArgs.re
new file mode 100644
index 00000000..c8ee8604
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/scalarsArgs.re
@@ -0,0 +1,234 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "scalarsInput": string};
+ type t_variables = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \n}\n";
+ type t = {. "scalarsInput": string};
+ type t_variables = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "nullableString":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableString,
+ ),
+ "string": (a => a)(inp##string),
+ "nullableInt":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableInt,
+ ),
+ "int": (a => a)(inp##int),
+ "nullableFloat":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableFloat,
+ ),
+ "float": (a => a)(inp##float),
+ "nullableBoolean":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableBoolean,
+ ),
+ "boolean": (a => a)(inp##boolean),
+ "nullableID":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableID,
+ ),
+ "id": (a => a)(inp##id),
+ };
+ let make =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) => {
+ "query": query,
+ "variables":
+ serializeVariables(
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ }: t_variables,
+ ),
+ "parse": parse,
+ }
+ and makeVariables =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ }: t_variables,
+ );
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/scalarsInput.re b/tests_bucklescript/static_snapshots/legacy/operations/scalarsInput.re
new file mode 100644
index 00000000..cc2f7152
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/scalarsInput.re
@@ -0,0 +1,231 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "scalarsInput": string};
+ type t_variables = {. "arg": t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: VariousScalarsInput!) {\nscalarsInput(arg: $arg) \n}\n";
+ type t = {. "scalarsInput": string};
+ type t_variables = {. "arg": t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg": (a => serializeInputObjectVariousScalarsInput(a))(inp##arg),
+ }
+ and serializeInputObjectVariousScalarsInput:
+ t_variables_VariousScalarsInput => Raw.t_variables_VariousScalarsInput =
+ inp => {
+ "nullableString":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableString,
+ ),
+ "string": (a => a)(inp##string),
+ "nullableInt":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableInt,
+ ),
+ "int": (a => a)(inp##int),
+ "nullableFloat":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableFloat,
+ ),
+ "float": (a => a)(inp##float),
+ "nullableBoolean":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableBoolean,
+ ),
+ "boolean": (a => a)(inp##boolean),
+ "nullableID":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableID,
+ ),
+ "id": (a => a)(inp##id),
+ };
+ let make = (~arg, ()) => {
+ "query": query,
+ "variables": serializeVariables({"arg": arg}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectVariousScalarsInput =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ )
+ : t_variables_VariousScalarsInput => {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_VariousScalarsInput_47;
+ /**```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+```*/
+ let _graphql_VariousScalarsInput_47: _graphql_VariousScalarsInput_47 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/skipDirectives.re b/tests_bucklescript/static_snapshots/legacy/operations/skipDirectives.re
new file mode 100644
index 00000000..5698f150
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/skipDirectives.re
@@ -0,0 +1,193 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_v1 = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": Js.Nullable.t(string),
+ };
+ type t_v2 = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": Js.Nullable.t(string),
+ };
+ type t = {
+ .
+ "v1": t_v1,
+ "v2": t_v2,
+ };
+ type t_variables = {. "var": bool};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($var: Boolean!) {\nv1: variousScalars {\nnullableString @skip(if: $var) \nstring @skip(if: $var) \n}\n\nv2: variousScalars {\nnullableString @include(if: $var) \nstring @include(if: $var) \n}\n\n}\n";
+ type t_v1 = {
+ .
+ "nullableString": option(string),
+ "string": option(string),
+ };
+ type t_v2 = {
+ .
+ "nullableString": option(string),
+ "string": option(string),
+ };
+ type t = {
+ .
+ "v1": t_v1,
+ "v2": t_v2,
+ };
+ type t_variables = {. "var": bool};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let v2 = {
+ let value = value##v2;
+ let string = {
+ let value = value##string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {"nullableString": nullableString, "string": string};
+ }
+ and v1 = {
+ let value = value##v1;
+ let string = {
+ let value = value##string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {"nullableString": nullableString, "string": string};
+ };
+ {"v1": v1, "v2": v2};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let v2 = {
+ let value = value##v2;
+ let string = {
+ let value = value##string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableString": nullableString, "string": string};
+ }
+ and v1 = {
+ let value = value##v1;
+ let string = {
+ let value = value##string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableString": nullableString, "string": string};
+ };
+ {"v1": v1, "v2": v2};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"var": (a => a)(inp##var)};
+ let make = (~var, ()) => {
+ "query": query,
+ "variables": serializeVariables({"var": var}: t_variables),
+ "parse": parse,
+ }
+ and makeVariables = (~var, ()) =>
+ serializeVariables({"var": var}: t_variables);
+ let makeWithVariables = variables => {
+ "query": query,
+ "variables": serializeVariables(variables),
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/subscription.re b/tests_bucklescript/static_snapshots/legacy/operations/subscription.re
new file mode 100644
index 00000000..92f37960
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/subscription.re
@@ -0,0 +1,167 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_simpleSubscription_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_simpleSubscription_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_simpleSubscription;
+ type t = {. "simpleSubscription": t_simpleSubscription};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "subscription {\nsimpleSubscription {\n__typename\n...on Dog {\nname \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_simpleSubscription_Dog = {. "name": string};
+ type t_simpleSubscription_Human = {. "name": string};
+ type t_simpleSubscription = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_simpleSubscription_Dog)
+ | `Human(t_simpleSubscription_Human)
+ ];
+ type t = {. "simpleSubscription": t_simpleSubscription};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let simpleSubscription = {
+ let value = value##simpleSubscription;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_simpleSubscription_Dog = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_simpleSubscription_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_simpleSubscription
+ );
+ };
+ {"simpleSubscription": simpleSubscription};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let simpleSubscription = {
+ let value = value##simpleSubscription;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name};
+ },
+ ): Raw.t_simpleSubscription
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_simpleSubscription
+ )
+ | `FutureAddedValue(value) => (
+ Obj.magic(value): Raw.t_simpleSubscription
+ )
+ };
+ };
+ {"simpleSubscription": simpleSubscription};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/tagged_template.re b/tests_bucklescript/static_snapshots/legacy/operations/tagged_template.re
new file mode 100644
index 00000000..a2055ab5
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/tagged_template.re
@@ -0,0 +1,970 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n";
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let { graphql } = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery3 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let { graphql } = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery3 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery4 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let graphql = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery4 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/typename.re b/tests_bucklescript/static_snapshots/legacy/operations/typename.re
new file mode 100644
index 00000000..ee3325f4
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/typename.re
@@ -0,0 +1,205 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ .
+ "__typename": string,
+ "field": string,
+ };
+ type t_first_inner = {
+ .
+ "__typename": string,
+ "inner": Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ .
+ "__typename": string,
+ "inner": Js.Nullable.t(t_first_inner),
+ };
+ type t = {. "first": t_first};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nfirst: nestedObject {\n__typename \ninner {\n__typename \ninner {\n__typename \nfield \n}\n\n}\n\n}\n\n}\n";
+ type t_first_inner_inner = {
+ .
+ "__typename": string,
+ "field": string,
+ };
+ type t_first_inner = {
+ .
+ "__typename": string,
+ "inner": option(t_first_inner_inner),
+ };
+ type t_first = {
+ .
+ "__typename": string,
+ "inner": option(t_first_inner),
+ };
+ type t = {. "first": t_first};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "field": field};
+ },
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "inner": inner};
+ },
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "inner": inner};
+ };
+ {"first": first};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "field": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "inner": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "inner": inner};
+ };
+ {"first": first};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/union.re b/tests_bucklescript/static_snapshots/legacy/operations/union.re
new file mode 100644
index 00000000..01c4d2f3
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/union.re
@@ -0,0 +1,338 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQueryNoError = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQueryNoError {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/unionPartial.re b/tests_bucklescript/static_snapshots/legacy/operations/unionPartial.re
new file mode 100644
index 00000000..c7f14bea
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/unionPartial.re
@@ -0,0 +1,149 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/legacy/operations/variant.re b/tests_bucklescript/static_snapshots/legacy/operations/variant.re
new file mode 100644
index 00000000..84de35c0
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/legacy/operations/variant.re
@@ -0,0 +1,253 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationForVariant_dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_mutationForVariant_human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_mutationForVariant_dogOrHuman;
+ type t_mutationForVariant;
+ type t = {. "mutationForVariant": t_mutationForVariant};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationForVariant {\nbaseType \nbaseTypeList \ndog {\nname \nbarkVolume \n}\n\nhuman {\nname \n}\n\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n\n}\n";
+ type t_mutationForVariant_dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_mutationForVariant_human = {. "name": string};
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {. "name": string};
+ type t_mutationForVariant_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_mutationForVariant_dogOrHuman_Dog)
+ | `Human(t_mutationForVariant_dogOrHuman_Human)
+ ];
+ type t_mutationForVariant = [
+ | `BaseType(string)
+ | `BaseTypeList(array(string))
+ | `Dog(t_mutationForVariant_dog)
+ | `Human(t_mutationForVariant_human)
+ | `DogOrHuman(t_mutationForVariant_dogOrHuman)
+ ];
+ type t = {. "mutationForVariant": t_mutationForVariant};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationForVariant = {
+ let value = value##mutationForVariant;
+ switch (Js.Json.decodeObject(Obj.magic(value): Js.Json.t)) {
+ | None =>
+ Js.Exn.raiseError(
+ "graphql-ppx: "
+ ++ "Expected type "
+ ++ "VariantTestResult"
+ ++ " to be an object",
+ )
+ | Some(value) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "baseType");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `BaseType(value);
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "baseTypeList");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `BaseTypeList(value |> Js.Array.map(value => value));
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "dog");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `Dog(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "human");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `Human(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "dogOrHuman");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `DogOrHuman(
+ {
+ let typename: string =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "__typename"),
+ );
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Dog =
+ Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Human =
+ Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_mutationForVariant_dogOrHuman
+ );
+ },
+ );
+ | Some(_) =>
+ Js.Exn.raiseError(
+ "graphql-ppx: "
+ ++ "All fields on variant selection set on type "
+ ++ "VariantTestResult"
+ ++ " were null",
+ )
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ {"mutationForVariant": mutationForVariant};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationForVariant = {
+ let value = value##mutationForVariant;
+ Obj.magic(Js.Json.null);
+ };
+ {"mutationForVariant": mutationForVariant};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ let make = () => {
+ "query": query,
+ "variables": Js.Json.null,
+ "parse": parse,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues2.txt b/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues2.txt
new file mode 100644
index 00000000..a5b5775a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues2.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues2.re 8:13-18
+
+ 6 ┆ query {
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nullableArray: [""]
+ 10 ┆ field: ""
+
+ Invalid argument. The field "nonNullableField" on argument "nonRec" is missing.
diff --git a/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues3.txt b/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues3.txt
new file mode 100644
index 00000000..cd62821e
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues3.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues3.re 9:35
+
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: 5
+ 10 ┆ nullableArray: [""]
+ 11 ┆ field: ""
+
+ Invalid argument. Expected "String!" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues4.txt b/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues4.txt
new file mode 100644
index 00000000..163233ac
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues4.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues4.re 10:32-34
+
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: "!"
+ 10 ┆ nullableArray: [2]
+ 11 ┆ field: ""
+ 12 ┆ enum: FIRST
+
+ Invalid argument. Expected "[String]" but received "[Int!]!".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues5.txt b/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues5.txt
new file mode 100644
index 00000000..10db2d09
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/InvalidObjectValues5.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues5.re 20:23-24
+
+ 18 ┆ otherField: ""
+ 19 ┆ }
+ 20 ┆ enum: []
+ 21 ┆ }
+ 22 ┆ )
+
+ Invalid argument. Expected "Enum" but received "EmptyList!".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/deprecatedFields.txt b/tests_bucklescript/static_snapshots/objects/errors/deprecatedFields.txt
new file mode 100644
index 00000000..5811eee7
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/deprecatedFields.txt
@@ -0,0 +1,4 @@
+File "operations/errors/deprecatedFields.re", line 7, characters 6-21:
+7 | deprecatedField
+ ^^^^^^^^^^^^^^^
+Warning 22: Field "deprecatedField" has been deprecated. Reason: Use something else instead
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType1.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType1.txt
new file mode 100644
index 00000000..dd99957a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType1.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType1.re 9:25-28
+
+ 7 ┆ query invalidArgValues {
+ 8 ┆ invalidArgValues(
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. The variable "$arg" on argument "stringRequired" is missing.
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType2.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType2.txt
new file mode 100644
index 00000000..60b2a625
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType2.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType2.re 8:25-28
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable "$arg" to the required argument "stringRequired".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType3.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType3.txt
new file mode 100644
index 00000000..92212cb2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType3.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType3.re 9:17-21
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ string: $arg2
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Expected "String" but received "Int".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType4.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType4.txt
new file mode 100644
index 00000000..03ab435f
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType4.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType4.re 10:14-18
+
+ 8 ┆ invalidArgValues(
+ 9 ┆ custom: $arg
+ 10 ┆ obj: $arg2
+ 11 ┆ stringRequired: ""
+ 12 ┆ )
+
+ Invalid argument. Expected "InputObject" but received "Int".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType5.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType5.txt
new file mode 100644
index 00000000..ee032f35
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType5.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType5.re 9:25-28
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ id: $arg
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable "$arg" to the required argument "stringRequired".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType6.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType6.txt
new file mode 100644
index 00000000..d68b3d30
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidArgVariableType6.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType6.re 8:15-18
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ list: $arg
+ 9 ┆ stringRequired: ""
+ 10 ┆ )
+
+ Invalid argument. Expected "[String]" but received "String".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue1.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue1.txt
new file mode 100644
index 00000000..737644cc
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue1.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue1.re 21:14-26
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ int: "Some string"
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected "Int" but received "String!".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue2.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue2.txt
new file mode 100644
index 00000000..3b3dc627
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue2.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue2.re 8:14-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ int: {test: "xxx"}
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected "Int" but received "InputObject!".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue3.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue3.txt
new file mode 100644
index 00000000..fe3d71df
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue3.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue3.re 21:13
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ id: 5
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected "ID" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue4.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue4.txt
new file mode 100644
index 00000000..a79e71df
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidDefaultValue4.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue4.re 8:17-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ string: ["1", "2"]
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected "String" but received "List".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidObjectValues1.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidObjectValues1.txt
new file mode 100644
index 00000000..cd910433
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidObjectValues1.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidObjectValues1.re 19:37
+
+ 17 ┆ otherField: ""
+ 18 ┆ inner: {
+ 19 ┆ otherField: 5
+ 20 ┆ }
+ 21 ┆ }
+
+ Invalid argument. Expected "String" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidObjectValues6.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidObjectValues6.txt
new file mode 100644
index 00000000..5141729d
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidObjectValues6.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidObjectValues6.re 20:27-37
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: {field: ""}
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected "[InputObject]!" but received "InputObject!".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/invalidObjectValues7.txt b/tests_bucklescript/static_snapshots/objects/errors/invalidObjectValues7.txt
new file mode 100644
index 00000000..4f123fbf
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/invalidObjectValues7.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidObjectValues7.re 20:36
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: [{field: 5}]
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected "String!" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/objects/errors/missingField1.txt b/tests_bucklescript/static_snapshots/objects/errors/missingField1.txt
new file mode 100644
index 00000000..572b6cbd
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/missingField1.txt
@@ -0,0 +1,7 @@
+File "operations/errors/missingField1.re", line 6, characters 6-27:
+6 | thisFieldDoesNotExist
+ ^^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisFieldDoesNotExist' on type CustomScalarObject
+
+ We've found a bug for you!
+ operations/errors/missingField1.re
diff --git a/tests_bucklescript/static_snapshots/objects/errors/missingField2.txt b/tests_bucklescript/static_snapshots/objects/errors/missingField2.txt
new file mode 100644
index 00000000..ef9b79eb
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/missingField2.txt
@@ -0,0 +1,7 @@
+File "operations/errors/missingField2.re", line 13, characters 8-28:
+13 | l1: thisTypeDoesNotExist {
+ ^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisTypeDoesNotExist' on type Query
+
+ We've found a bug for you!
+ operations/errors/missingField2.re
diff --git a/tests_bucklescript/static_snapshots/objects/errors/missingField3.txt b/tests_bucklescript/static_snapshots/objects/errors/missingField3.txt
new file mode 100644
index 00000000..1ae6f235
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/missingField3.txt
@@ -0,0 +1,7 @@
+File "operations/errors/missingField3.re", line 15, characters 6-18:
+15 | doesNotExist
+ ^^^^^^^^^^^^
+Error: Unknown field 'doesNotExist' on type Lists
+
+ We've found a bug for you!
+ operations/errors/missingField3.re
diff --git a/tests_bucklescript/static_snapshots/objects/errors/missingFragment.txt b/tests_bucklescript/static_snapshots/objects/errors/missingFragment.txt
new file mode 100644
index 00000000..2cde476e
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/errors/missingFragment.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/missingFragment.re 3:28-42
+
+ 1 │ module Fragment = [%graphql
+ 2 │ {|
+ 3 │ fragment ListFragment on UnknownFragment {
+ 4 │ nullableOfNullable
+ 5 │ nullableOfNonNullable
+
+ Unknown type "UnknownFragment"
diff --git a/tests_bucklescript/static_snapshots/objects/operations/GraphQL_PPX.re b/tests_bucklescript/static_snapshots/objects/operations/GraphQL_PPX.re
new file mode 100644
index 00000000..67109305
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/GraphQL_PPX.re
@@ -0,0 +1,66 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+
+let%private clone: Js.Dict.t('a) => Js.Dict.t('a) =
+ a => Obj.magic(Js.Obj.assign(Obj.magic(Js.Obj.empty()), Obj.magic(a)));
+
+let rec deepMerge = (json1: Js.Json.t, json2: Js.Json.t) =>
+ switch (
+ (
+ Obj.magic(json1) == Js.null,
+ Js_array2.isArray(json1),
+ Js.typeof(json1) == "object",
+ ),
+ (
+ Obj.magic(json2) == Js.null,
+ Js_array2.isArray(json2),
+ Js.typeof(json2) == "object",
+ ),
+ ) {
+ | ((_, true, _), (_, true, _)) => (
+ Obj.magic(
+ Js.Array.mapi(
+ (el1, idx) => {
+ let el2 = Js.Array.unsafe_get(Obj.magic(json2), idx);
+
+ Js.typeof(el2) == "object" ? deepMerge(el1, el2) : el2;
+ },
+ Obj.magic(json1),
+ ),
+ ): Js.Json.t
+ )
+
+ | ((false, false, true), (false, false, true)) =>
+ let obj1 = clone(Obj.magic(json1));
+ let obj2 = Obj.magic(json2);
+ Js.Dict.keys(obj2)
+ |> Js.Array.forEach(key =>
+ let existingVal: Js.Json.t = Js.Dict.unsafeGet(obj1, key);
+ let newVal: Js.Json.t = Js.Dict.unsafeGet(obj2, key);
+ Js.Dict.set(
+ obj1,
+ key,
+ Js.typeof(existingVal) != "object"
+ ? newVal : Obj.magic(deepMerge(existingVal, newVal)),
+ );
+ );
+ Obj.magic(obj1);
+
+ | ((_, _, _), (_, _, _)) => json2
+ };
diff --git a/tests_bucklescript/static_snapshots/objects/operations/argNamedQuery.js b/tests_bucklescript/static_snapshots/objects/operations/argNamedQuery.js
new file mode 100644
index 00000000..c35183e3
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/argNamedQuery.js
@@ -0,0 +1,46 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ argNamedQuery: value.argNamedQuery
+ };
+}
+
+function serialize(value) {
+ return {
+ argNamedQuery: value.argNamedQuery
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ query: inp.query
+ };
+}
+
+function makeVariables(query, param) {
+ return serializeVariables({
+ query: query
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($query: Int!) {\nargNamedQuery(query: $query) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/argNamedQuery.re b/tests_bucklescript/static_snapshots/objects/operations/argNamedQuery.re
new file mode 100644
index 00000000..136d20f2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/argNamedQuery.re
@@ -0,0 +1,91 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "argNamedQuery": int};
+ type t_variables = {. "query": int};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($query: Int!) {\nargNamedQuery(query: $query) \n}\n";
+ type t = {. "argNamedQuery": int};
+ type t_variables = {. "query": int};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let argNamedQuery = {
+ let value = value##argNamedQuery;
+ value;
+ };
+ {"argNamedQuery": argNamedQuery};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let argNamedQuery = {
+ let value = value##argNamedQuery;
+ value;
+ };
+ {"argNamedQuery": argNamedQuery};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"query": (a => a)(inp##query)};
+ let makeVariables = (~query, ()) =>
+ serializeVariables({"query": query}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/comment.js b/tests_bucklescript/static_snapshots/objects/operations/comment.js
new file mode 100644
index 00000000..8aaf074a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/comment.js
@@ -0,0 +1,107 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require("bs-platform/lib/js/array.js");
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serialize(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serializeInputObjectEmbeddedInput(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput(Caml_option.valFromOption(b));
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectNonrecursiveInput(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_NonrecursiveInput_49: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput,
+ makeVariables: makeVariables,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/comment.re b/tests_bucklescript/static_snapshots/objects/operations/comment.re
new file mode 100644
index 00000000..71f85416
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/comment.re
@@ -0,0 +1,274 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "nonrecursiveInput": string};
+ type t_variables = {. "arg": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "field": Js.Nullable.t(string),
+ "enum": Js.Nullable.t(string),
+ "embeddedInput":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ "custom": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n";
+ type t = {. "nonrecursiveInput": string};
+ type t_variables = {. "arg": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": option(array(option(string))),
+ "field": option(string),
+ "enum": option([ | `FIRST | `SECOND | `THIRD]),
+ "embeddedInput": option(array(option(t_variables_EmbeddedInput))),
+ "custom": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {"nonrecursiveInput": nonrecursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {"nonrecursiveInput": nonrecursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ "nonNullableField": (a => a)(inp##nonNullableField),
+ "nullableArray":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ "enum":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ "embeddedInput":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ "custom":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ "nonNullableField": nonNullableField,
+ "nullableArray": nullableArray,
+ "field": field,
+ "enum": enum,
+ "embeddedInput": embeddedInput,
+ "custom": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ "field": field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/customDecoder.js b/tests_bucklescript/static_snapshots/objects/operations/customDecoder.js
new file mode 100644
index 00000000..a0d68138
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/customDecoder.js
@@ -0,0 +1,88 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_format = require("bs-platform/lib/js/caml_format.js");
+
+function parse(prim) {
+ return String(prim);
+}
+
+var serialize = Caml_format.caml_int_of_string;
+
+var StringOfInt = {
+ parse: parse,
+ serialize: serialize
+};
+
+var parse$1 = Caml_format.caml_int_of_string;
+
+function serialize$1(prim) {
+ return String(prim);
+}
+
+var IntOfString = {
+ parse: parse$1,
+ serialize: serialize$1
+};
+
+var Raw = { };
+
+function parse$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var $$int = String(value$2);
+ var value$3 = value$1.string;
+ var string = Caml_format.caml_int_of_string(value$3);
+ return {
+ variousScalars: {
+ string: string,
+ int: $$int
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var $$int = Caml_format.caml_int_of_string(value$2);
+ var value$3 = value$1.string;
+ var string = String(value$3);
+ return {
+ variousScalars: {
+ string: string,
+ int: $$int
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nvariousScalars {\nstring \nint \n}\n\n}\n",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.StringOfInt = StringOfInt;
+exports.IntOfString = IntOfString;
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/customDecoder.re b/tests_bucklescript/static_snapshots/objects/operations/customDecoder.re
new file mode 100644
index 00000000..40aae477
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/customDecoder.re
@@ -0,0 +1,126 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module StringOfInt = {
+ let parse = string_of_int;
+ let serialize = int_of_string;
+ type t = string;
+};
+module IntOfString = {
+ let parse = int_of_string;
+ let serialize = string_of_int;
+ type t = int;
+};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "string": string,
+ "int": int,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nstring \nint \n}\n\n}\n";
+ type t_variousScalars = {
+ .
+ "string": IntOfString.t,
+ "int": StringOfInt.t,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = value##int;
+ StringOfInt.parse(value);
+ }
+ and string = {
+ let value = value##string;
+ IntOfString.parse(value);
+ };
+ {"string": string, "int": int};
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = value##int;
+ StringOfInt.serialize(value);
+ }
+ and string = {
+ let value = value##string;
+ IntOfString.serialize(value);
+ };
+ {"string": string, "int": int};
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/customScalars.js b/tests_bucklescript/static_snapshots/objects/operations/customScalars.js
new file mode 100644
index 00000000..95158505
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/customScalars.js
@@ -0,0 +1,64 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.customScalarField;
+ var value$2 = value$1.nonNullable;
+ var value$3 = value$1.nullable;
+ var nullable = !(value$3 == null) ? Caml_option.some(value$3) : undefined;
+ return {
+ customScalarField: {
+ nullable: nullable,
+ nonNullable: value$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.customScalarField;
+ var value$2 = value$1.nonNullable;
+ var value$3 = value$1.nullable;
+ var nullable = value$3 !== undefined ? Caml_option.valFromOption(value$3) : null;
+ return {
+ customScalarField: {
+ nullable: nullable,
+ nonNullable: value$2
+ }
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.opt;
+ return {
+ opt: a !== undefined ? Caml_option.valFromOption(a) : undefined,
+ req: inp.req
+ };
+}
+
+function makeVariables(opt, req, param) {
+ return serializeVariables({
+ opt: opt,
+ req: req
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($opt: CustomScalar, $req: CustomScalar!) {\ncustomScalarField(argOptional: $opt, argRequired: $req) {\nnullable \nnonNullable \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/customScalars.re b/tests_bucklescript/static_snapshots/objects/operations/customScalars.re
new file mode 100644
index 00000000..845f63d9
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/customScalars.re
@@ -0,0 +1,143 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_customScalarField = {
+ .
+ "nullable": Js.Nullable.t(Js.Json.t),
+ "nonNullable": Js.Json.t,
+ };
+ type t = {. "customScalarField": t_customScalarField};
+ type t_variables = {
+ .
+ "opt": Js.Nullable.t(Js.Json.t),
+ "req": Js.Json.t,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($opt: CustomScalar, $req: CustomScalar!) {\ncustomScalarField(argOptional: $opt, argRequired: $req) {\nnullable \nnonNullable \n}\n\n}\n";
+ type t_customScalarField = {
+ .
+ "nullable": option(Js.Json.t),
+ "nonNullable": Js.Json.t,
+ };
+ type t = {. "customScalarField": t_customScalarField};
+ type t_variables = {
+ .
+ "opt": option(Js.Json.t),
+ "req": Js.Json.t,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let customScalarField = {
+ let value = value##customScalarField;
+ let nonNullable = {
+ let value = value##nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = value##nullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {"nullable": nullable, "nonNullable": nonNullable};
+ };
+ {"customScalarField": customScalarField};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let customScalarField = {
+ let value = value##customScalarField;
+ let nonNullable = {
+ let value = value##nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = value##nullable;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullable": nullable, "nonNullable": nonNullable};
+ };
+ {"customScalarField": customScalarField};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "opt":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##opt,
+ ),
+ "req": (a => a)(inp##req),
+ };
+ let makeVariables = (~opt=?, ~req, ()) =>
+ serializeVariables({"opt": opt, "req": req}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/customTypes.js b/tests_bucklescript/static_snapshots/objects/operations/customTypes.js
new file mode 100644
index 00000000..a86d1d9b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/customTypes.js
@@ -0,0 +1,131 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Js_json = require("bs-platform/lib/js/js_json.js");
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+function parse(json) {
+ var match = Js_json.decodeString(json);
+ if (match === undefined) {
+ return /* Red */0;
+ }
+ switch (match) {
+ case "blue" :
+ return /* Blue */2;
+ case "green" :
+ return /* Green */1;
+ case "red" :
+ return /* Red */0;
+ default:
+ return /* Red */0;
+ }
+}
+
+function serialize(color) {
+ switch (color) {
+ case /* Red */0 :
+ return "red";
+ case /* Green */1 :
+ return "green";
+ case /* Blue */2 :
+ return "blue";
+
+ }
+}
+
+var Color = {
+ parse: parse,
+ serialize: serialize
+};
+
+function parse$1(json) {
+ var str = Js_json.decodeString(json);
+ if (str !== undefined) {
+ return new Date(str);
+ } else {
+ return new Date();
+ }
+}
+
+function serialize$1(date) {
+ return date.toISOString();
+}
+
+var DateTime = {
+ parse: parse$1,
+ serialize: serialize$1
+};
+
+var Raw = { };
+
+function parse$2(value) {
+ var value$1 = value.customFields;
+ var value$2 = value$1.nullableColor;
+ var nullableColor = !(value$2 == null) ? parse(value$2) : undefined;
+ var value$3 = value$1.futureTime;
+ var futureTime = !(value$3 == null) ? Caml_option.some(parse$1(value$3)) : undefined;
+ var value$4 = value$1.favoriteColor;
+ var favoriteColor = parse(value$4);
+ var value$5 = value$1.currentTime;
+ var currentTime = parse$1(value$5);
+ return {
+ customFields: {
+ currentTime: currentTime,
+ favoriteColor: favoriteColor,
+ futureTime: futureTime,
+ nullableColor: nullableColor
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.customFields;
+ var value$2 = value$1.nullableColor;
+ var nullableColor = value$2 !== undefined ? serialize(value$2) : null;
+ var value$3 = value$1.futureTime;
+ var futureTime = value$3 !== undefined ? Caml_option.valFromOption(value$3).toISOString() : null;
+ var value$4 = value$1.favoriteColor;
+ var favoriteColor = serialize(value$4);
+ var value$5 = value$1.currentTime;
+ var currentTime = value$5.toISOString();
+ return {
+ customFields: {
+ currentTime: currentTime,
+ favoriteColor: favoriteColor,
+ futureTime: futureTime,
+ nullableColor: nullableColor
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\ncustomFields {\ncurrentTime \nfavoriteColor \nfutureTime \nnullableColor \n}\n\n}\n",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.Color = Color;
+exports.DateTime = DateTime;
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/customTypes.re b/tests_bucklescript/static_snapshots/objects/operations/customTypes.re
new file mode 100644
index 00000000..13562530
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/customTypes.re
@@ -0,0 +1,190 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Color = {
+ type t =
+ | Red
+ | Green
+ | Blue;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some("green") => Green
+ | Some("blue") => Blue
+ | Some("red")
+ | Some(_)
+ | None => Red
+ };
+ let serialize = color =>
+ (
+ switch (color) {
+ | Red => "red"
+ | Green => "green"
+ | Blue => "blue"
+ }
+ )
+ |> Js.Json.string;
+};
+module DateTime = {
+ type t = Js.Date.t;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(str) => str |> Js.Date.fromString
+ | None => Js.Date.make()
+ };
+ let serialize = date => date |> Js.Date.toISOString |> Js.Json.string;
+};
+module MyQuery = {
+ module Raw = {
+ type t_customFields = {
+ .
+ "currentTime": Js.Json.t,
+ "favoriteColor": Js.Json.t,
+ "futureTime": Js.Nullable.t(Js.Json.t),
+ "nullableColor": Js.Nullable.t(Js.Json.t),
+ };
+ type t = {. "customFields": t_customFields};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ncustomFields {\ncurrentTime \nfavoriteColor \nfutureTime \nnullableColor \n}\n\n}\n";
+ type t_customFields = {
+ .
+ "currentTime": DateTime.t,
+ "favoriteColor": Color.t,
+ "futureTime": option(DateTime.t),
+ "nullableColor": option(Color.t),
+ };
+ type t = {. "customFields": t_customFields};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let customFields = {
+ let value = value##customFields;
+ let nullableColor = {
+ let value = value##nullableColor;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(Color.parse(value))
+ | None => None
+ };
+ }
+ and futureTime = {
+ let value = value##futureTime;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(DateTime.parse(value))
+ | None => None
+ };
+ }
+ and favoriteColor = {
+ let value = value##favoriteColor;
+ Color.parse(value);
+ }
+ and currentTime = {
+ let value = value##currentTime;
+ DateTime.parse(value);
+ };
+ {
+ "currentTime": currentTime,
+ "favoriteColor": favoriteColor,
+ "futureTime": futureTime,
+ "nullableColor": nullableColor,
+ };
+ };
+ {"customFields": customFields};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let customFields = {
+ let value = value##customFields;
+ let nullableColor = {
+ let value = value##nullableColor;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(Color.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and futureTime = {
+ let value = value##futureTime;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(DateTime.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and favoriteColor = {
+ let value = value##favoriteColor;
+ Color.serialize(value);
+ }
+ and currentTime = {
+ let value = value##currentTime;
+ DateTime.serialize(value);
+ };
+ {
+ "currentTime": currentTime,
+ "favoriteColor": favoriteColor,
+ "futureTime": futureTime,
+ "nullableColor": nullableColor,
+ };
+ };
+ {"customFields": customFields};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/defaultObjectValueOnScalar.js b/tests_bucklescript/static_snapshots/objects/operations/defaultObjectValueOnScalar.js
new file mode 100644
index 00000000..84cd7360
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/defaultObjectValueOnScalar.js
@@ -0,0 +1,47 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ defaultObjectValueOnScalar: value.defaultObjectValueOnScalar
+ };
+}
+
+function serialize(value) {
+ return {
+ defaultObjectValueOnScalar: value.defaultObjectValueOnScalar
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\ndefaultObjectValueOnScalar(filter: {some: {json: \"value\"}}, arg: {field: \"otherValue\"}) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/defaultObjectValueOnScalar.re b/tests_bucklescript/static_snapshots/objects/operations/defaultObjectValueOnScalar.re
new file mode 100644
index 00000000..c630ac87
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/defaultObjectValueOnScalar.re
@@ -0,0 +1,90 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "defaultObjectValueOnScalar": string};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndefaultObjectValueOnScalar(filter: {some: {json: \"value\"}}, arg: {field: \"otherValue\"}) \n}\n";
+ type t = {. "defaultObjectValueOnScalar": string};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let defaultObjectValueOnScalar = {
+ let value = value##defaultObjectValueOnScalar;
+ value;
+ };
+ {"defaultObjectValueOnScalar": defaultObjectValueOnScalar};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let defaultObjectValueOnScalar = {
+ let value = value##defaultObjectValueOnScalar;
+ value;
+ };
+ {"defaultObjectValueOnScalar": defaultObjectValueOnScalar};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/enumInput.js b/tests_bucklescript/static_snapshots/objects/operations/enumInput.js
new file mode 100644
index 00000000..45ce1afa
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/enumInput.js
@@ -0,0 +1,50 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ enumInput: value.enumInput
+ };
+}
+
+function serialize(value) {
+ return {
+ enumInput: value.enumInput
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.arg;
+ return {
+ arg: a !== 225952583 ? (
+ a >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_SampleField_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: SampleField!) {\nenumInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/enumInput.re b/tests_bucklescript/static_snapshots/objects/operations/enumInput.re
new file mode 100644
index 00000000..94fa3770
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/enumInput.re
@@ -0,0 +1,112 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "enumInput": string};
+ type t_variables = {. "arg": string};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: SampleField!) {\nenumInput(arg: $arg) \n}\n";
+ type t = {. "enumInput": string};
+ type t_variables = {. "arg": [ | `FIRST | `SECOND | `THIRD]};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let enumInput = {
+ let value = value##enumInput;
+ value;
+ };
+ {"enumInput": enumInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let enumInput = {
+ let value = value##enumInput;
+ value;
+ };
+ {"enumInput": enumInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg":
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ inp##arg,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_SampleField_47;
+ /**```
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}
+```*/
+ let _graphql_SampleField_47: _graphql_SampleField_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/explicit_object_record.js b/tests_bucklescript/static_snapshots/objects/operations/explicit_object_record.js
new file mode 100644
index 00000000..51390845
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/explicit_object_record.js
@@ -0,0 +1,202 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nullableOfNullable;
+ var value$3 = value$1.nullableOfNonNullable;
+ var value$4 = value$1.nonNullableOfNullable;
+ var value$5 = value$1.nonNullableOfNonNullable;
+ return {
+ lists: {
+ nullableOfNullable: !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$3 == null) ? value$3.map((function (value) {
+ return value;
+ })) : undefined,
+ nonNullableOfNullable: value$4.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })),
+ nonNullableOfNonNullable: value$5.map((function (value) {
+ return value;
+ }))
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ var lists = {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var RecordsQuery = {
+ Raw: Raw,
+ query: "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$4 == null) ? value$4.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ObjectsQuery = {
+ Raw: Raw$1,
+ query: "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.RecordsQuery = RecordsQuery;
+exports.ObjectsQuery = ObjectsQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/explicit_object_record.re b/tests_bucklescript/static_snapshots/objects/operations/explicit_object_record.re
new file mode 100644
index 00000000..4d329ead
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/explicit_object_record.re
@@ -0,0 +1,363 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module RecordsQuery = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 RecordsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ObjectsQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ObjectsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/extensions.js b/tests_bucklescript/static_snapshots/objects/operations/extensions.js
new file mode 100644
index 00000000..2e186fa6
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/extensions.js
@@ -0,0 +1,138 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+function ExtendQuery(M) {
+ var use = function (param) {
+
+ };
+ return {
+ use: use
+ };
+}
+
+var Parent = {
+ ExtendQuery: ExtendQuery
+};
+
+var Raw = { };
+
+var query = "query Bla {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$4 == null) ? value$4.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Bla$prime = {
+ Raw: Raw,
+ query: query,
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+function use(param) {
+
+}
+
+var Bla = {
+ Raw: Raw,
+ query: query,
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL,
+ use: use
+};
+
+exports.Parent = Parent;
+exports.Bla$prime = Bla$prime;
+exports.Bla = Bla;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/extensions.re b/tests_bucklescript/static_snapshots/objects/operations/extensions.re
new file mode 100644
index 00000000..ea6cbc6d
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/extensions.re
@@ -0,0 +1,211 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ type t_variables;
+ };
+ type t;
+ type t_variables;
+
+ let query: string;
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+};
+
+module Parent = {
+ module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => ();
+ };
+};
+module Bla' = {
+ module Raw = {
+ type t_lists = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query Bla {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Bla = {
+ include Bla';
+ include Parent.ExtendQuery(Bla');
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/fragmentDefinition.js b/tests_bucklescript/static_snapshots/objects/operations/fragmentDefinition.js
new file mode 100644
index 00000000..1adef6f1
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/fragmentDefinition.js
@@ -0,0 +1,403 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+function deepMerge(json1, param) {
+ return json1;
+}
+
+var GraphQL_PPX = {
+ deepMerge: deepMerge
+};
+
+var query = "fragment ListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$1 == null) ? value$1.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var verifyArgsAndParse = parse;
+
+function serialize(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = value$2 !== undefined ? value$2.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var name = "ListFragment";
+
+var Z__INTERNAL = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var ListFragment = {
+ query: query,
+ Raw: Raw,
+ parse: parse,
+ verifyArgsAndParse: verifyArgsAndParse,
+ serialize: serialize,
+ name: name,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.nullableOfNonNullable;
+ return {
+ nullableOfNonNullable: !(value$1 == null) ? value$1.map((function (value) {
+ return value;
+ })) : undefined
+ };
+}
+
+var verifyArgsAndParse$1 = parse$1;
+
+function serialize$1(value) {
+ var value$1 = value.nullableOfNonNullable;
+ return {
+ nullableOfNonNullable: value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null
+ };
+}
+
+var Z__INTERNAL$1 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var Another = {
+ query: "fragment Another on Lists {\nnullableOfNonNullable \n}\n",
+ Raw: Raw$1,
+ parse: parse$1,
+ verifyArgsAndParse: verifyArgsAndParse$1,
+ serialize: serialize$1,
+ name: "Another",
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var query$1 = "fragment FragmentWithArgs on Lists {\nlistWithArg(arg1: $arg1) \n}\n";
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.listWithArg;
+ return {
+ listWithArg: !(value$1 == null) ? value$1.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined
+ };
+}
+
+function verifyArgsAndParse$2(_arg1, value) {
+ return parse$2(value);
+}
+
+function serialize$2(value) {
+ var value$1 = value.listWithArg;
+ return {
+ listWithArg: value$1 !== undefined ? value$1.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ };
+}
+
+var name$1 = "FragmentWithArgs";
+
+var Z__INTERNAL$2 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var FragmentWithArgs = {
+ query: query$1,
+ Raw: Raw$2,
+ parse: parse$2,
+ verifyArgsAndParse: verifyArgsAndParse$2,
+ serialize: serialize$2,
+ name: name$1,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var query$2 = "fragment InlineListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+
+var Raw$3 = { };
+
+function parse$3(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$1 == null) ? value$1.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var verifyArgsAndParse$3 = parse$3;
+
+function serialize$3(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = value$2 !== undefined ? value$2.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var name$2 = "InlineListFragment";
+
+var Z__INTERNAL$3 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var InlineFragment = {
+ query: query$2,
+ Raw: Raw$3,
+ parse: parse$3,
+ verifyArgsAndParse: verifyArgsAndParse$3,
+ serialize: serialize$3,
+ name: name$2,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+var Raw$4 = { };
+
+var query$3 = "query MyQuery($arg1: String) {\nl1: lists {\n...ListFragment \n}\n\nl2: lists {\n...ListFragment \n...ListFragment \n}\n\nl3: lists {\nnullableOfNullable \n...ListFragment \n...ListFragment \n}\n\nl4: lists {\nnullableOfNullable \n...InlineListFragment \n}\n\nl5: lists {\n...FragmentWithArgs \n}\n\n}\nfragment FragmentWithArgs on Lists {\nlistWithArg(arg1: $arg1) \n}\nfragment InlineListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\nfragment ListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+
+function parse$4(value) {
+ var value$1 = value.l5;
+ var l5 = parse$2(value$1);
+ var value$2 = value.l4;
+ var inlineFragment = parse$3(value$2);
+ var value$3 = value$2["nullableOfNullable"];
+ var nullableOfNullable = !(value$3 == null) ? value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ var l4 = {
+ nullableOfNullable: nullableOfNullable,
+ inlineFragment: inlineFragment
+ };
+ var value$4 = value.l3;
+ var frag2 = parse(value$4);
+ var frag1 = parse(value$4);
+ var value$5 = value$4["nullableOfNullable"];
+ var nullableOfNullable$1 = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ var l3 = {
+ nullableOfNullable: nullableOfNullable$1,
+ frag1: frag1,
+ frag2: frag2
+ };
+ var value$6 = value.l2;
+ var frag2$1 = parse(value$6);
+ var frag1$1 = parse(value$6);
+ var l2 = {
+ frag1: frag1$1,
+ frag2: frag2$1
+ };
+ var value$7 = value.l1;
+ var l1 = parse(value$7);
+ return {
+ l1: l1,
+ l2: l2,
+ l3: l3,
+ l4: l4,
+ l5: l5
+ };
+}
+
+function serialize$4(value) {
+ var value$1 = value.l5;
+ var l5 = serialize$2(value$1);
+ var value$2 = value.l4;
+ var value$3 = value$2.nullableOfNullable;
+ var l4 = [serialize$3(value$2.inlineFragment)].reduce(deepMerge, {
+ nullableOfNullable: value$3 !== undefined ? value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ });
+ var value$4 = value.l3;
+ var value$5 = value$4.nullableOfNullable;
+ var l3 = [
+ serialize(value$4.frag1),
+ serialize(value$4.frag2)
+ ].reduce(deepMerge, {
+ nullableOfNullable: value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ });
+ var value$6 = value.l2;
+ var l2 = [
+ serialize(value$6.frag1),
+ serialize(value$6.frag2)
+ ].reduce(deepMerge, (function (prim) {
+ return { };
+ }));
+ var value$7 = value.l1;
+ var l1 = serialize(value$7);
+ return {
+ l1: l1,
+ l2: l2,
+ l3: l3,
+ l4: l4,
+ l5: l5
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.arg1;
+ return {
+ arg1: a !== undefined ? a : undefined
+ };
+}
+
+function makeVariables(arg1, param) {
+ return serializeVariables({
+ arg1: arg1
+ });
+}
+
+function makeDefaultVariables(param) {
+ return makeVariables(undefined, undefined);
+}
+
+var Z__INTERNAL$4 = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw$4,
+ query: query$3,
+ parse: parse$4,
+ serialize: serialize$4,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL$4
+};
+
+var Raw$5 = { };
+
+var query$4 = "query {\nlists {\n...ListFragment \n}\n\n}\nfragment ListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+
+function parse$5(value) {
+ var value$1 = value.lists;
+ return {
+ lists: parse(value$1)
+ };
+}
+
+function serialize$5(value) {
+ var value$1 = value.lists;
+ return {
+ lists: serialize(value$1)
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$5 = {
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$5,
+ query: query$4,
+ parse: parse$5,
+ serialize: serialize$5,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$5
+};
+
+exports.GraphQL_PPX = GraphQL_PPX;
+exports.ListFragment = ListFragment;
+exports.Another = Another;
+exports.FragmentWithArgs = FragmentWithArgs;
+exports.InlineFragment = InlineFragment;
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/fragmentDefinition.re b/tests_bucklescript/static_snapshots/objects/operations/fragmentDefinition.re
new file mode 100644
index 00000000..0b609126
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/fragmentDefinition.re
@@ -0,0 +1,900 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module GraphQL_PPX = {
+ let deepMerge = (json1, _) => json1;
+};
+module ListFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment ListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ };
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ };
+ };
+ let name = "ListFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Another = {
+ /**The GraphQL query string*/
+ let query = "fragment Another on Lists {\nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {. "nullableOfNonNullable": Js.Nullable.t(array(string))};
+ type nonrec t_Lists = t;
+ };
+ type t = {. "nullableOfNonNullable": option(array(string))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ };
+ {"nullableOfNonNullable": nullableOfNonNullable};
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableOfNonNullable": nullableOfNonNullable};
+ };
+ let name = "Another";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module FragmentWithArgs = {
+ /**The GraphQL query string*/
+ let query = "fragment FragmentWithArgs on Lists {\nlistWithArg(arg1: $arg1) \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "listWithArg": Js.Nullable.t(array(Js.Nullable.t(string))),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {. "listWithArg": option(array(option(string)))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listWithArg = {
+ let value = value##listWithArg;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {"listWithArg": listWithArg};
+ };
+ let verifyArgsAndParse = (~arg1 as _arg1: [ | `String], value: Raw.t) =>
+ parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listWithArg = {
+ let value = value##listWithArg;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"listWithArg": listWithArg};
+ };
+ let name = "FragmentWithArgs";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+
+module InlineFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment InlineListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ };
+ };
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ };
+ };
+ let name = "InlineListFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery = {
+ module Raw = {
+ type t_l2;
+ type t_l3;
+ type t_l4;
+ type t = {
+ .
+ "l1": ListFragment.Raw.t,
+ "l2": t_l2,
+ "l3": t_l3,
+ "l4": t_l4,
+ "l5": FragmentWithArgs.Raw.t,
+ };
+ type t_variables = {. "arg1": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ "query MyQuery($arg1: String) {\nl1: lists {\n..."
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl2: lists {\n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl3: lists {\nnullableOfNullable \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl4: lists {\nnullableOfNullable \n..."
+ )
+ ++ InlineFragment.name
+ )
+ ++ " \n}\n\nl5: lists {\n..."
+ )
+ ++ FragmentWithArgs.name
+ )
+ ++ " \n}\n\n}\n"
+ )
+ ++ FragmentWithArgs.query
+ )
+ ++ InlineFragment.query
+ )
+ ++ ListFragment.query;
+ type t_l2 = {
+ .
+ "frag1": ListFragment.t_Lists,
+ "frag2": ListFragment.t_Lists,
+ };
+ type t_l3 = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "frag1": ListFragment.t_Lists,
+ "frag2": ListFragment.t_Lists,
+ };
+ type t_l4 = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "inlineFragment": InlineFragment.t_Lists,
+ };
+ type t = {
+ .
+ "l1": ListFragment.t,
+ "l2": t_l2,
+ "l3": t_l3,
+ "l4": t_l4,
+ "l5": FragmentWithArgs.t,
+ };
+ type t_variables = {. "arg1": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let l5 = {
+ let value = value##l5;
+ FragmentWithArgs.verifyArgsAndParse(~arg1=`String, value);
+ }
+ and l4 = {
+ let value = value##l4;
+ let inlineFragment = {
+ let value: InlineFragment.Raw.t = Obj.magic(value);
+ InlineFragment.verifyArgsAndParse(value);
+ }
+ and nullableOfNullable = {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "nullableOfNullable"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "inlineFragment": inlineFragment,
+ };
+ }
+ and l3 = {
+ let value = value##l3;
+ let frag2 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and frag1 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and nullableOfNullable = {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "nullableOfNullable"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "frag1": frag1,
+ "frag2": frag2,
+ };
+ }
+ and l2 = {
+ let value = value##l2;
+ let frag2 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ }
+ and frag1 = {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {"frag1": frag1, "frag2": frag2};
+ }
+ and l1 = {
+ let value = value##l1;
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {"l1": l1, "l2": l2, "l3": l3, "l4": l4, "l5": l5};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let l5 = {
+ let value = value##l5;
+ FragmentWithArgs.serialize(value);
+ }
+ and l4 = {
+ let value = value##l4;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableOfNullable": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(InlineFragment.serialize(value##inlineFragment)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l4
+ );
+ }
+ and l3 = {
+ let value = value##l3;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableOfNullable": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (Obj.magic(ListFragment.serialize(value##frag1)): Js.Json.t),
+ (Obj.magic(ListFragment.serialize(value##frag2)): Js.Json.t),
+ |],
+ ),
+ ): Raw.t_l3
+ );
+ }
+ and l2 = {
+ let value = value##l2;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(Js.Dict.empty): Js.Json.t,
+ [|
+ (Obj.magic(ListFragment.serialize(value##frag1)): Js.Json.t),
+ (Obj.magic(ListFragment.serialize(value##frag2)): Js.Json.t),
+ |],
+ ),
+ ): Raw.t_l2
+ );
+ }
+ and l1 = {
+ let value = value##l1;
+ ListFragment.serialize(value);
+ };
+ {"l1": l1, "l2": l2, "l3": l3, "l4": l4, "l5": l5};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg1":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##arg1,
+ ),
+ };
+ let makeVariables = (~arg1=?, ()) =>
+ serializeVariables({"arg1": arg1}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {. "lists": ListFragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (("query {\nlists {\n..." ++ ListFragment.name) ++ " \n}\n\n}\n")
+ ++ ListFragment.query;
+ type t = {. "lists": ListFragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ ListFragment.verifyArgsAndParse(value);
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ ListFragment.serialize(value);
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/interface.js b/tests_bucklescript/static_snapshots/objects/operations/interface.js
new file mode 100644
index 00000000..40fed0f7
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/interface.js
@@ -0,0 +1,2 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/interface.re b/tests_bucklescript/static_snapshots/objects/operations/interface.re
new file mode 100644
index 00000000..f23f4bb6
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/interface.re
@@ -0,0 +1,18 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
diff --git a/tests_bucklescript/static_snapshots/objects/operations/lists.js b/tests_bucklescript/static_snapshots/objects/operations/lists.js
new file mode 100644
index 00000000..d058c0c5
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/lists.js
@@ -0,0 +1,105 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$4 == null) ? value$4.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/lists.re b/tests_bucklescript/static_snapshots/objects/operations/lists.re
new file mode 100644
index 00000000..4ecd4656
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/lists.re
@@ -0,0 +1,189 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/listsArgs.js b/tests_bucklescript/static_snapshots/objects/operations/listsArgs.js
new file mode 100644
index 00000000..08676634
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/listsArgs.js
@@ -0,0 +1,71 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require("bs-platform/lib/js/array.js");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serialize(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.nullableOfNullable;
+ var a$1 = inp.nullableOfNonNullable;
+ var a$2 = inp.nonNullableOfNullable;
+ var a$3 = inp.nonNullableOfNonNullable;
+ return {
+ nullableOfNullable: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ nullableOfNonNullable: a$1 !== undefined ? $$Array.map((function (b) {
+ return b;
+ }), a$1) : undefined,
+ nonNullableOfNullable: $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a$2),
+ nonNullableOfNonNullable: $$Array.map((function (b) {
+ return b;
+ }), a$3)
+ };
+}
+
+function makeVariables(nullableOfNullable, nullableOfNonNullable, nonNullableOfNullable, nonNullableOfNonNullable, param) {
+ return serializeVariables({
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/listsArgs.re b/tests_bucklescript/static_snapshots/objects/operations/listsArgs.re
new file mode 100644
index 00000000..5c16f515
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/listsArgs.re
@@ -0,0 +1,182 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "listsInput": string};
+ type t_variables = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \n}\n";
+ type t = {. "listsInput": string};
+ type t_variables = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {"listsInput": listsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {"listsInput": listsInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "nullableOfNullable":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableOfNullable,
+ ),
+ "nullableOfNonNullable":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ inp##nullableOfNonNullable,
+ ),
+ "nonNullableOfNullable":
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ inp##nonNullableOfNullable,
+ ),
+ "nonNullableOfNonNullable":
+ (a => Array.map(b => (a => a)(b), a))(
+ inp##nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/listsInput.js b/tests_bucklescript/static_snapshots/objects/operations/listsInput.js
new file mode 100644
index 00000000..09b23c8d
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/listsInput.js
@@ -0,0 +1,86 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require("bs-platform/lib/js/array.js");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serialize(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serializeInputObjectListsInput(inp) {
+ var a = inp.nullableOfNullable;
+ var a$1 = inp.nullableOfNonNullable;
+ var a$2 = inp.nonNullableOfNullable;
+ var a$3 = inp.nonNullableOfNonNullable;
+ return {
+ nullableOfNullable: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ nullableOfNonNullable: a$1 !== undefined ? $$Array.map((function (b) {
+ return b;
+ }), a$1) : undefined,
+ nonNullableOfNullable: $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a$2),
+ nonNullableOfNonNullable: $$Array.map((function (b) {
+ return b;
+ }), a$3)
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectListsInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectListsInput(nullableOfNullable, nullableOfNonNullable, nonNullableOfNullable, nonNullableOfNonNullable, param) {
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_ListsInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: ListsInput!) {\nlistsInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectListsInput: serializeInputObjectListsInput,
+ makeVariables: makeVariables,
+ makeInputObjectListsInput: makeInputObjectListsInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/listsInput.re b/tests_bucklescript/static_snapshots/objects/operations/listsInput.re
new file mode 100644
index 00000000..000f3940
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/listsInput.re
@@ -0,0 +1,197 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "listsInput": string};
+ type t_variables = {. "arg": t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: ListsInput!) {\nlistsInput(arg: $arg) \n}\n";
+ type t = {. "listsInput": string};
+ type t_variables = {. "arg": t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {"listsInput": listsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let listsInput = {
+ let value = value##listsInput;
+ value;
+ };
+ {"listsInput": listsInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {"arg": (a => serializeInputObjectListsInput(a))(inp##arg)}
+ and serializeInputObjectListsInput:
+ t_variables_ListsInput => Raw.t_variables_ListsInput =
+ inp => {
+ "nullableOfNullable":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableOfNullable,
+ ),
+ "nullableOfNonNullable":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ inp##nullableOfNonNullable,
+ ),
+ "nonNullableOfNullable":
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ inp##nonNullableOfNullable,
+ ),
+ "nonNullableOfNonNullable":
+ (a => Array.map(b => (a => a)(b), a))(
+ inp##nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectListsInput =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ )
+ : t_variables_ListsInput => {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_ListsInput_47;
+ /**```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}
+```*/
+ let _graphql_ListsInput_47: _graphql_ListsInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/mutation.js b/tests_bucklescript/static_snapshots/objects/operations/mutation.js
new file mode 100644
index 00000000..2a900a15
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/mutation.js
@@ -0,0 +1,104 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.message;
+ var value$2 = value.field;
+ var field;
+ switch (value$2) {
+ case "FIRST" :
+ field = /* FIRST */-24399856;
+ break;
+ case "SECOND" :
+ field = /* SECOND */382368628;
+ break;
+ case "THIRD" :
+ field = /* THIRD */225952583;
+ break;
+ default:
+ field = /* `FutureAddedValue */[
+ -31101740,
+ value$2
+ ];
+ }
+ return {
+ field: field,
+ message: value$1
+ };
+ })) : undefined;
+ var value$3 = value$1.value;
+ var value$4 = !(value$3 == null) ? ({
+ stringField: value$3.stringField
+ }) : undefined;
+ return {
+ mutationWithError: {
+ value: value$4,
+ errors: errors
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.message;
+ var value$2 = value.field;
+ var field = typeof value$2 === "number" ? (
+ value$2 !== 225952583 ? (
+ value$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : value$2[1];
+ return {
+ field: field,
+ message: value$1
+ };
+ })) : null;
+ var value$3 = value$1.value;
+ var value$4 = value$3 !== undefined ? ({
+ stringField: Caml_option.valFromOption(value$3).stringField
+ }) : null;
+ return {
+ mutationWithError: {
+ value: value$4,
+ errors: errors
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "mutation {\nmutationWithError {\nvalue {\nstringField \n}\n\nerrors {\nfield \nmessage \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/mutation.re b/tests_bucklescript/static_snapshots/objects/operations/mutation.re
new file mode 100644
index 00000000..49f39d00
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/mutation.re
@@ -0,0 +1,203 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationWithError_value = {. "stringField": string};
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ "field": t_mutationWithError_errors_field,
+ "message": string,
+ };
+ type t_mutationWithError = {
+ .
+ "value": Js.Nullable.t(t_mutationWithError_value),
+ "errors": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nvalue {\nstringField \n}\n\nerrors {\nfield \nmessage \n}\n\n}\n\n}\n";
+ type t_mutationWithError_value = {. "stringField": string};
+ type t_mutationWithError_errors_field = [
+ | `FutureAddedValue(string)
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+ type t_mutationWithError_errors = {
+ .
+ "field": t_mutationWithError_errors_field,
+ "message": string,
+ };
+ type t_mutationWithError = {
+ .
+ "value": option(t_mutationWithError_value),
+ "errors": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let message = {
+ let value = value##message;
+ value;
+ }
+ and field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | other => `FutureAddedValue(other)
+ };
+ };
+ {"field": field, "message": message};
+ ),
+ )
+ | None => None
+ };
+ }
+ and value = {
+ let value = value##value;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let stringField = {
+ let value = value##stringField;
+ value;
+ };
+ {"stringField": stringField};
+ },
+ )
+ | None => None
+ };
+ };
+ {"value": value, "errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let message = {
+ let value = value##message;
+ value;
+ }
+ and field = {
+ let value = value##field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ | `FutureAddedValue(other) => other
+ };
+ };
+ {"field": field, "message": message};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and value = {
+ let value = value##value;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let stringField = {
+ let value = value##stringField;
+ value;
+ };
+ {"stringField": stringField};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"value": value, "errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgs.js b/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgs.js
new file mode 100644
index 00000000..714ed0f5
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgs.js
@@ -0,0 +1,46 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serialize(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ required: inp.required
+ };
+}
+
+function makeVariables(required, param) {
+ return serializeVariables({
+ required: required
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgs.re b/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgs.re
new file mode 100644
index 00000000..fa7dbd07
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgs.re
@@ -0,0 +1,91 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ };
+ /**The GraphQL query string*/
+ let query = "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n";
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"required": (a => a)(inp##required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({"required": required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgsAndNoRecords.js b/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgsAndNoRecords.js
new file mode 100644
index 00000000..714ed0f5
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgsAndNoRecords.js
@@ -0,0 +1,46 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serialize(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ required: inp.required
+ };
+}
+
+function makeVariables(required, param) {
+ return serializeVariables({
+ required: required
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgsAndNoRecords.re b/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgsAndNoRecords.re
new file mode 100644
index 00000000..fa7dbd07
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/mutationWithArgsAndNoRecords.re
@@ -0,0 +1,91 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ };
+ /**The GraphQL query string*/
+ let query = "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n";
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"required": (a => a)(inp##required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({"required": required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/nested.js b/tests_bucklescript/static_snapshots/objects/operations/nested.js
new file mode 100644
index 00000000..7bd14ea1
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/nested.js
@@ -0,0 +1,166 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.let_;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 == null) {
+ inner = undefined;
+ } else {
+ var value$3 = value$2.inner;
+ inner = {
+ inner: !(value$3 == null) ? ({
+ field: value$3.field
+ }) : undefined
+ };
+ }
+ var let_ = {
+ inner: inner
+ };
+ var value$4 = value.second;
+ var value$5 = value$4.inner;
+ var inner$1;
+ if (value$5 == null) {
+ inner$1 = undefined;
+ } else {
+ var value$6 = value$5.inner;
+ var tmp;
+ if (value$6 == null) {
+ tmp = undefined;
+ } else {
+ var value$7 = value$6.f2;
+ var value$8 = value$6.f1;
+ tmp = {
+ f1: value$8,
+ f2: value$7
+ };
+ }
+ inner$1 = {
+ inner: tmp
+ };
+ }
+ var second = {
+ inner: inner$1
+ };
+ var value$9 = value.first;
+ var value$10 = value$9.inner;
+ var inner$2;
+ if (value$10 == null) {
+ inner$2 = undefined;
+ } else {
+ var value$11 = value$10.inner;
+ inner$2 = {
+ inner: !(value$11 == null) ? ({
+ field: value$11.field
+ }) : undefined
+ };
+ }
+ var first = {
+ inner: inner$2
+ };
+ return {
+ first: first,
+ second: second,
+ let_: let_
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.let_;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 !== undefined) {
+ var value$3 = Caml_option.valFromOption(value$2).inner;
+ inner = {
+ inner: value$3 !== undefined ? ({
+ field: Caml_option.valFromOption(value$3).field
+ }) : null
+ };
+ } else {
+ inner = null;
+ }
+ var let_ = {
+ inner: inner
+ };
+ var value$4 = value.second;
+ var value$5 = value$4.inner;
+ var inner$1;
+ if (value$5 !== undefined) {
+ var value$6 = Caml_option.valFromOption(value$5).inner;
+ var tmp;
+ if (value$6 !== undefined) {
+ var value$7 = value$6.f2;
+ var value$8 = value$6.f1;
+ tmp = {
+ f1: value$8,
+ f2: value$7
+ };
+ } else {
+ tmp = null;
+ }
+ inner$1 = {
+ inner: tmp
+ };
+ } else {
+ inner$1 = null;
+ }
+ var second = {
+ inner: inner$1
+ };
+ var value$9 = value.first;
+ var value$10 = value$9.inner;
+ var inner$2;
+ if (value$10 !== undefined) {
+ var value$11 = Caml_option.valFromOption(value$10).inner;
+ inner$2 = {
+ inner: value$11 !== undefined ? ({
+ field: Caml_option.valFromOption(value$11).field
+ }) : null
+ };
+ } else {
+ inner$2 = null;
+ }
+ var first = {
+ inner: inner$2
+ };
+ return {
+ first: first,
+ second: second,
+ let_: let_
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nfirst: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\nsecond: nestedObject {\ninner {\ninner {\nf1: field \nf2: field \n}\n\n}\n\n}\n\nlet: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/nested.re b/tests_bucklescript/static_snapshots/objects/operations/nested.re
new file mode 100644
index 00000000..3e47a594
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/nested.re
@@ -0,0 +1,321 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type record = {
+ f1: string,
+ f2: string,
+};
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {. "field": string};
+ type t_first_inner = {. "inner": Js.Nullable.t(t_first_inner_inner)};
+ type t_first = {. "inner": Js.Nullable.t(t_first_inner)};
+ type t_second_inner_inner = {
+ .
+ "f1": string,
+ "f2": string,
+ };
+ type t_second_inner = {. "inner": Js.Nullable.t(t_second_inner_inner)};
+ type t_second = {. "inner": Js.Nullable.t(t_second_inner)};
+ type t_let_inner_inner = {. "field": string};
+ type t_let_inner = {. "inner": Js.Nullable.t(t_let_inner_inner)};
+ type t_let = {. "inner": Js.Nullable.t(t_let_inner)};
+ type t = {
+ .
+ "first": t_first,
+ "second": t_second,
+ "let_": t_let,
+ };
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nfirst: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\nsecond: nestedObject {\ninner {\ninner {\nf1: field \nf2: field \n}\n\n}\n\n}\n\nlet: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\n}\n";
+ type t_first_inner_inner = {. "field": string};
+ type t_first_inner = {. "inner": option(t_first_inner_inner)};
+ type t_first = {. "inner": option(t_first_inner)};
+ type t_second_inner_inner = {
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {. "inner": option(t_second_inner_inner)};
+ type t_second = {. "inner": option(t_second_inner)};
+ type t_let_inner_inner = {. "field": string};
+ type t_let_inner = {. "inner": option(t_let_inner_inner)};
+ type t_let = {. "inner": option(t_let_inner)};
+ type t = {
+ .
+ "first": t_first,
+ "second": t_second,
+ "let_": t_let,
+ };
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let let_ = {
+ let value = value##let_;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {"field": field};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ }
+ and second = {
+ let value = value##second;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let f2 = {
+ let value = value##f2;
+ value;
+ }
+ and f1 = {
+ let value = value##f1;
+ value;
+ };
+ {f1, f2};
+ }: t_second_inner_inner,
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ }
+ and first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {"field": field};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => None
+ };
+ };
+ {"inner": inner};
+ };
+ {"first": first, "second": second, "let_": let_};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let let_ = {
+ let value = value##let_;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {"field": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ }
+ and second = {
+ let value = value##second;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let f2 = {
+ let value = (value: t_second_inner_inner).f2;
+ value;
+ }
+ and f1 = {
+ let value = (value: t_second_inner_inner).f1;
+ value;
+ };
+ {"f1": f1, "f2": f2};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ }
+ and first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ };
+ {"field": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"inner": inner};
+ };
+ {"first": first, "second": second, "let_": let_};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/nonrecursiveInput.js b/tests_bucklescript/static_snapshots/objects/operations/nonrecursiveInput.js
new file mode 100644
index 00000000..14b63470
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/nonrecursiveInput.js
@@ -0,0 +1,216 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require("bs-platform/lib/js/array.js");
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serialize(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serializeInputObjectEmbeddedInput(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput(Caml_option.valFromOption(b));
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectNonrecursiveInput(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_NonrecursiveInput_49: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput,
+ makeVariables: makeVariables,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.more;
+ var value$2 = value.scalarsInput;
+ return {
+ scalarsInput: value$2,
+ more: value$1
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.more;
+ var value$2 = value.scalarsInput;
+ return {
+ scalarsInput: value$2,
+ more: value$1
+ };
+}
+
+function serializeInputObjectEmbeddedInput$1(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput$1(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput$1(Caml_option.valFromOption(b));
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables$1(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput$1(inp.arg),
+ arg2: serializeInputObjectNonrecursiveInput$1(inp.arg2)
+ };
+}
+
+function makeVariables$1(arg, arg2, param) {
+ return serializeVariables$1({
+ arg: arg,
+ arg2: arg2
+ });
+}
+
+function makeInputObjectNonrecursiveInput$1(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput$1(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL$1 = {
+ _graphql_NonrecursiveInput_169: 0,
+ _graphql_NonrecursiveInput_196: 0,
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$1,
+ query: "query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\nscalarsInput(arg: $arg) \nmore: scalarsInput(arg: $arg2) \n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput$1,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput$1,
+ makeVariables: makeVariables$1,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput$1,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/nonrecursiveInput.re b/tests_bucklescript/static_snapshots/objects/operations/nonrecursiveInput.re
new file mode 100644
index 00000000..035a1ba2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/nonrecursiveInput.re
@@ -0,0 +1,568 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "nonrecursiveInput": string};
+ type t_variables = {. "arg": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "field": Js.Nullable.t(string),
+ "enum": Js.Nullable.t(string),
+ "embeddedInput":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ "custom": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n";
+ type t = {. "nonrecursiveInput": string};
+ type t_variables = {. "arg": t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": option(array(option(string))),
+ "field": option(string),
+ "enum": option([ | `FIRST | `SECOND | `THIRD]),
+ "embeddedInput": option(array(option(t_variables_EmbeddedInput))),
+ "custom": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {"nonrecursiveInput": nonrecursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let nonrecursiveInput = {
+ let value = value##nonrecursiveInput;
+ value;
+ };
+ {"nonrecursiveInput": nonrecursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ "nonNullableField": (a => a)(inp##nonNullableField),
+ "nullableArray":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ "enum":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ "embeddedInput":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ "custom":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ "nonNullableField": nonNullableField,
+ "nullableArray": nullableArray,
+ "field": field,
+ "enum": enum,
+ "embeddedInput": embeddedInput,
+ "custom": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ "field": field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {
+ .
+ "scalarsInput": string,
+ "more": string,
+ };
+ type t_variables = {
+ .
+ "arg": t_variables_NonrecursiveInput,
+ "arg2": t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "field": Js.Nullable.t(string),
+ "enum": Js.Nullable.t(string),
+ "embeddedInput":
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ "custom": Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\nscalarsInput(arg: $arg) \nmore: scalarsInput(arg: $arg2) \n}\n";
+ type t = {
+ .
+ "scalarsInput": string,
+ "more": string,
+ };
+ type t_variables = {
+ .
+ "arg": t_variables_NonrecursiveInput,
+ "arg2": t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ .
+ "nonNullableField": string,
+ "nullableArray": option(array(option(string))),
+ "field": option(string),
+ "enum": option([ | `FIRST | `SECOND | `THIRD]),
+ "embeddedInput": option(array(option(t_variables_EmbeddedInput))),
+ "custom": option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {. "field": option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let more = {
+ let value = value##more;
+ value;
+ }
+ and scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput, "more": more};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let more = {
+ let value = value##more;
+ value;
+ }
+ and scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput, "more": more};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg),
+ "arg2": (a => serializeInputObjectNonrecursiveInput(a))(inp##arg2),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ "nonNullableField": (a => a)(inp##nonNullableField),
+ "nullableArray":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##nullableArray,
+ ),
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ "enum":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ "embeddedInput":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##embeddedInput,
+ ),
+ "custom":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ "field":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##field,
+ ),
+ };
+ let makeVariables = (~arg, ~arg2, ()) =>
+ serializeVariables({"arg": arg, "arg2": arg2}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ "nonNullableField": nonNullableField,
+ "nullableArray": nullableArray,
+ "field": field,
+ "enum": enum,
+ "embeddedInput": embeddedInput,
+ "custom": custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ "field": field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_169;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_169: _graphql_NonrecursiveInput_169 =
+ Obj.magic(0);
+ type nonrec _graphql_NonrecursiveInput_196;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_196: _graphql_NonrecursiveInput_196 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueEnum.js b/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueEnum.js
new file mode 100644
index 00000000..d5c96dcc
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueEnum.js
@@ -0,0 +1,260 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field;
+ switch (value$1) {
+ case "FIRST" :
+ field = /* FIRST */-24399856;
+ break;
+ case "SECOND" :
+ field = /* SECOND */382368628;
+ break;
+ case "THIRD" :
+ field = /* THIRD */225952583;
+ break;
+ default:
+ field = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : undefined;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = typeof value$1 === "number" ? (
+ value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : value$1[1];
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Normal = {
+ Raw: Raw,
+ query: "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field;
+ switch (value$1) {
+ case "FIRST" :
+ field = /* FIRST */-24399856;
+ break;
+ case "SECOND" :
+ field = /* SECOND */382368628;
+ break;
+ case "THIRD" :
+ field = /* THIRD */225952583;
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : undefined;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD";
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ByConfig = {
+ Raw: Raw$1,
+ query: "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field;
+ switch (value$1) {
+ case "FIRST" :
+ field = /* FIRST */-24399856;
+ break;
+ case "SECOND" :
+ field = /* SECOND */382368628;
+ break;
+ case "THIRD" :
+ field = /* THIRD */225952583;
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : undefined;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD";
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ return {
+ mutationWithError: {
+ errors: errors
+ }
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var ByDirective = {
+ Raw: Raw$2,
+ query: "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+exports.Normal = Normal;
+exports.ByConfig = ByConfig;
+exports.ByDirective = ByDirective;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueEnum.re b/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueEnum.re
new file mode 100644
index 00000000..84c02c47
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueEnum.re
@@ -0,0 +1,453 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [
+ | `FutureAddedValue(string)
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | other => `FutureAddedValue(other)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ | `FutureAddedValue(other) => other
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [ | `FIRST | `SECOND | `THIRD];
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | _ => raise(Not_found)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [ | `FIRST | `SECOND | `THIRD];
+ type t_mutationWithError_errors = {
+ .
+ "message": string,
+ "field": t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ .
+ "errors": option(array(t_mutationWithError_errors)),
+ };
+ type t = {. "mutationWithError": t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | _ => raise(Not_found)
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => None
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationWithError = {
+ let value = value##mutationWithError;
+ let errors = {
+ let value = value##errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ let field = {
+ let value = value##field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ };
+ }
+ and message = {
+ let value = value##message;
+ value;
+ };
+ {"message": message, "field": field};
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"errors": errors};
+ };
+ {"mutationWithError": mutationWithError};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueUnion.js b/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueUnion.js
new file mode 100644
index 00000000..840a6abe
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueUnion.js
@@ -0,0 +1,272 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var tmp;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Normal = {
+ Raw: Raw,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.dogOrHuman;
+ var tmp;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ByConfig = {
+ Raw: Raw$1,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.dogOrHuman;
+ var tmp;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var ByDirective = {
+ Raw: Raw$2,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+exports.Normal = Normal;
+exports.ByConfig = ByConfig;
+exports.ByDirective = ByDirective;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueUnion.re b/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueUnion.re
new file mode 100644
index 00000000..71fab5af
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/omitFutureValueUnion.re
@@ -0,0 +1,479 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/pokedexApolloMode.js b/tests_bucklescript/static_snapshots/objects/operations/pokedexApolloMode.js
new file mode 100644
index 00000000..6188dd3b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/pokedexApolloMode.js
@@ -0,0 +1,75 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 == null) {
+ tmp = undefined;
+ } else {
+ var value$2 = value$1.name;
+ var name = !(value$2 == null) ? value$2 : undefined;
+ var value$3 = value$1.id;
+ tmp = {
+ id: value$3,
+ name: name
+ };
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 !== undefined) {
+ var value$2 = Caml_option.valFromOption(value$1);
+ var value$3 = value$2.name;
+ var name = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$2.id;
+ tmp = {
+ id: value$4,
+ name: name
+ };
+ } else {
+ tmp = null;
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\npokemon(name: \"Pikachu\") {\nid \nname \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/pokedexApolloMode.re b/tests_bucklescript/static_snapshots/objects/operations/pokedexApolloMode.re
new file mode 100644
index 00000000..2293899d
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/pokedexApolloMode.re
@@ -0,0 +1,138 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ .
+ "id": string,
+ "name": Js.Nullable.t(string),
+ };
+ type t = {. "pokemon": Js.Nullable.t(t_pokemon)};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\npokemon(name: \"Pikachu\") {\nid \nname \n}\n\n}\n";
+ type t_pokemon = {
+ .
+ "id": string,
+ "name": option(string),
+ };
+ type t = {. "pokemon": option(t_pokemon)};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let name = {
+ let value = value##name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {"id": id, "name": name};
+ },
+ )
+ | None => None
+ };
+ };
+ {"pokemon": pokemon};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = value##name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {"id": id, "name": name};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"pokemon": pokemon};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/pokedexScalars.js b/tests_bucklescript/static_snapshots/objects/operations/pokedexScalars.js
new file mode 100644
index 00000000..2b562be6
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/pokedexScalars.js
@@ -0,0 +1,83 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 == null) {
+ tmp = undefined;
+ } else {
+ var value$2 = value$1.name;
+ var name = !(value$2 == null) ? value$2 : undefined;
+ var value$3 = value$1.id;
+ tmp = {
+ id: value$3,
+ name: name
+ };
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 !== undefined) {
+ var value$2 = Caml_option.valFromOption(value$1);
+ var value$3 = value$2.name;
+ var name = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$2.id;
+ tmp = {
+ id: value$4,
+ name: name
+ };
+ } else {
+ tmp = null;
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.id;
+ var a$1 = inp.name;
+ return {
+ id: a !== undefined ? a : undefined,
+ name: a$1 !== undefined ? a$1 : undefined
+ };
+}
+
+function makeVariables(id, name, param) {
+ return serializeVariables({
+ id: id,
+ name: name
+ });
+}
+
+function makeDefaultVariables(param) {
+ return makeVariables(undefined, undefined, undefined);
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query pokemon($id: String, $name: String) {\npokemon(name: $name, id: $id) {\nid \nname \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/pokedexScalars.re b/tests_bucklescript/static_snapshots/objects/operations/pokedexScalars.re
new file mode 100644
index 00000000..efc2d622
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/pokedexScalars.re
@@ -0,0 +1,169 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ .
+ "id": string,
+ "name": Js.Nullable.t(string),
+ };
+ type t = {. "pokemon": Js.Nullable.t(t_pokemon)};
+ type t_variables = {
+ .
+ "id": Js.Nullable.t(string),
+ "name": Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query pokemon($id: String, $name: String) {\npokemon(name: $name, id: $id) {\nid \nname \n}\n\n}\n";
+ type t_pokemon = {
+ .
+ "id": string,
+ "name": option(string),
+ };
+ type t = {. "pokemon": option(t_pokemon)};
+ type t_variables = {
+ .
+ "id": option(string),
+ "name": option(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let name = {
+ let value = value##name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {"id": id, "name": name};
+ },
+ )
+ | None => None
+ };
+ };
+ {"pokemon": pokemon};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let pokemon = {
+ let value = value##pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = value##name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = value##id;
+ value;
+ };
+ {"id": id, "name": name};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"pokemon": pokemon};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "id":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##id,
+ ),
+ "name":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##name,
+ ),
+ };
+ let makeVariables = (~id=?, ~name=?, ()) =>
+ serializeVariables({"id": id, "name": name}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/record.js b/tests_bucklescript/static_snapshots/objects/operations/record.js
new file mode 100644
index 00000000..9915e4c8
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/record.js
@@ -0,0 +1,378 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var value$3 = value$1.string;
+ return {
+ variousScalars: {
+ string: value$3,
+ int: value$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var value$3 = value$1.string;
+ return {
+ variousScalars: {
+ string: value$3,
+ int: value$2
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nvariousScalars {\nstring \nint \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var nullableString = !(value$2 == null) ? value$2 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var nullableString = value$2 !== undefined ? value$2 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var OneFieldQuery = {
+ Raw: Raw$1,
+ query: "query {\nvariousScalars {\nnullableString \n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var query = "fragment Fragment on VariousScalars {\nstring \nint \n}\n";
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.int;
+ var value$2 = value.string;
+ return {
+ string: value$2,
+ int: value$1
+ };
+}
+
+var verifyArgsAndParse = parse$2;
+
+function serialize$2(value) {
+ var value$1 = value.int;
+ var value$2 = value.string;
+ return {
+ string: value$2,
+ int: value$1
+ };
+}
+
+var name = "Fragment";
+
+var Z__INTERNAL$2 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var Fragment = {
+ query: query,
+ Raw: Raw$2,
+ parse: parse$2,
+ verifyArgsAndParse: verifyArgsAndParse,
+ serialize: serialize$2,
+ name: name,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var Raw$3 = { };
+
+var query$1 = "query {\nvariousScalars {\n...Fragment \n}\n\n}\nfragment Fragment on VariousScalars {\nstring \nint \n}\n";
+
+function parse$3(value) {
+ var value$1 = value.variousScalars;
+ return {
+ variousScalars: parse$2(value$1)
+ };
+}
+
+function serialize$3(value) {
+ var value$1 = value.variousScalars;
+ return {
+ variousScalars: serialize$2(value$1)
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$3 = {
+ graphql_module: 0
+};
+
+var Untitled1 = {
+ Raw: Raw$3,
+ query: query$1,
+ parse: parse$3,
+ serialize: serialize$3,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+var ExternalFragmentQuery = {
+ Fragment: Fragment,
+ Untitled1: Untitled1
+};
+
+var Raw$4 = { };
+
+function parse$4(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ if (typename === "Dog") {
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ } else {
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$4(value) {
+ var value$1 = value.dogOrHuman;
+ var tmp;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables$3(param) {
+
+}
+
+function makeVariables$3(param) {
+
+}
+
+function makeDefaultVariables$3(param) {
+
+}
+
+var Z__INTERNAL$4 = {
+ graphql_module: 0
+};
+
+var InlineFragmentQuery = {
+ Raw: Raw$4,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n",
+ parse: parse$4,
+ serialize: serialize$4,
+ serializeVariables: serializeVariables$3,
+ makeVariables: makeVariables$3,
+ makeDefaultVariables: makeDefaultVariables$3,
+ Z__INTERNAL: Z__INTERNAL$4
+};
+
+var query$2 = "fragment DogFragment on Dog {\nname \nbarkVolume \n}\n";
+
+var Raw$5 = { };
+
+function parse$5(value) {
+ var value$1 = value.barkVolume;
+ var value$2 = value.name;
+ return {
+ name: value$2,
+ barkVolume: value$1
+ };
+}
+
+var verifyArgsAndParse$1 = parse$5;
+
+function serialize$5(value) {
+ var value$1 = value.barkVolume;
+ var value$2 = value.name;
+ return {
+ name: value$2,
+ barkVolume: value$1
+ };
+}
+
+var name$1 = "DogFragment";
+
+var Z__INTERNAL$5 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var DogFragment = {
+ query: query$2,
+ Raw: Raw$5,
+ parse: parse$5,
+ verifyArgsAndParse: verifyArgsAndParse$1,
+ serialize: serialize$5,
+ name: name$1,
+ Z__INTERNAL: Z__INTERNAL$5
+};
+
+var Raw$6 = { };
+
+var query$3 = "query {\ndogOrHuman {\n__typename\n...on Dog {\n...DogFragment \n}\n\n}\n\n}\nfragment DogFragment on Dog {\nname \nbarkVolume \n}\n";
+
+function parse$6(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp = typename === "Dog" ? /* `Dog */[
+ 3406428,
+ parse$5(value$1)
+ ] : /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$6(value) {
+ var value$1 = value.dogOrHuman;
+ return {
+ dogOrHuman: value$1[0] >= 3406428 ? serialize$5(value$1[1]) : value$1[1]
+ };
+}
+
+function serializeVariables$4(param) {
+
+}
+
+function makeVariables$4(param) {
+
+}
+
+function makeDefaultVariables$4(param) {
+
+}
+
+var Z__INTERNAL$6 = {
+ graphql_module: 0
+};
+
+var Untitled1$1 = {
+ Raw: Raw$6,
+ query: query$3,
+ parse: parse$6,
+ serialize: serialize$6,
+ serializeVariables: serializeVariables$4,
+ makeVariables: makeVariables$4,
+ makeDefaultVariables: makeDefaultVariables$4,
+ Z__INTERNAL: Z__INTERNAL$6
+};
+
+var UnionExternalFragmentQuery = {
+ DogFragment: DogFragment,
+ Untitled1: Untitled1$1
+};
+
+exports.MyQuery = MyQuery;
+exports.OneFieldQuery = OneFieldQuery;
+exports.ExternalFragmentQuery = ExternalFragmentQuery;
+exports.InlineFragmentQuery = InlineFragmentQuery;
+exports.UnionExternalFragmentQuery = UnionExternalFragmentQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/record.re b/tests_bucklescript/static_snapshots/objects/operations/record.re
new file mode 100644
index 00000000..d67b6cff
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/record.re
@@ -0,0 +1,729 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type scalars = {
+ string,
+ int,
+};
+
+type dog = {
+ name: string,
+ barkVolume: float,
+};
+
+type oneFieldQuery = {nullableString: option(string)};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "string": string,
+ "int": int,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nstring \nint \n}\n\n}\n";
+ type t = {. "variousScalars": scalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ (
+ {
+ let int = {
+ let value = value##int;
+ value;
+ }
+ and string = {
+ let value = value##string;
+ value;
+ };
+ {string, int};
+ }: scalars
+ );
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let int = {
+ let value = (value: scalars).int;
+ value;
+ }
+ and string = {
+ let value = (value: scalars).string;
+ value;
+ };
+ {"string": string, "int": int};
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module OneFieldQuery = {
+ module Raw = {
+ type t_variousScalars = {. "nullableString": Js.Nullable.t(string)};
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nnullableString \n}\n\n}\n";
+ type t_variousScalars = {nullableString: option(string)};
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ (
+ {
+ let nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {nullableString: nullableString};
+ }: t_variousScalars
+ );
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableString": nullableString};
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 OneFieldQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ExternalFragmentQuery = {
+ module Fragment = {
+ /**The GraphQL query string*/
+ let query = "fragment Fragment on VariousScalars {\nstring \nint \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "string": string,
+ "int": int,
+ };
+ type nonrec t_VariousScalars = t;
+ };
+ type t = {
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ let int = {
+ let value = value##int;
+ value;
+ }
+ and string = {
+ let value = value##string;
+ value;
+ };
+ {string, int};
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let int = {
+ let value = (value: t).int;
+ value;
+ }
+ and string = {
+ let value = (value: t).string;
+ value;
+ };
+ {"string": string, "int": int};
+ };
+ let name = "Fragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+VariousScalars {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t = {. "variousScalars": Fragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ ("query {\nvariousScalars {\n..." ++ Fragment.name)
+ ++ " \n}\n\n}\n"
+ )
+ ++ Fragment.query;
+ type t = {. "variousScalars": Fragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ Fragment.verifyArgsAndParse(value);
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ Fragment.serialize(value);
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+module InlineFragmentQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {name, barkVolume};
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 InlineFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module UnionExternalFragmentQuery = {
+ module DogFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment DogFragment on Dog {\nname \nbarkVolume \n}\n";
+ module Raw = {
+ type t = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type nonrec t_Dog = t;
+ };
+ type t = {
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {name, barkVolume};
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let barkVolume = {
+ let value = (value: t).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t).name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ };
+ let name = "DogFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Dog {
+ name: String!
+ barkVolume: Float!
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ "query {\ndogOrHuman {\n__typename\n...on Dog {\n..."
+ ++ DogFragment.name
+ )
+ ++ " \n}\n\n}\n\n}\n"
+ )
+ ++ DogFragment.query;
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(DogFragment.t)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: DogFragment.Raw.t = Obj.magic(value);
+ DogFragment.verifyArgsAndParse(value);
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(DogFragment.serialize(value)): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/recursiveInput.js b/tests_bucklescript/static_snapshots/objects/operations/recursiveInput.js
new file mode 100644
index 00000000..aee4d675
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/recursiveInput.js
@@ -0,0 +1,73 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ recursiveInput: value.recursiveInput
+ };
+}
+
+function serialize(value) {
+ return {
+ recursiveInput: value.recursiveInput
+ };
+}
+
+function serializeInputObjectRecursiveInput(inp) {
+ var a = inp.otherField;
+ var a$1 = inp.inner;
+ var a$2 = inp.enum;
+ return {
+ otherField: a !== undefined ? a : undefined,
+ inner: a$1 !== undefined ? serializeInputObjectRecursiveInput(Caml_option.valFromOption(a$1)) : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectRecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectRecursiveInput(otherField, inner, $$enum, param) {
+ return {
+ otherField: otherField,
+ inner: inner,
+ enum: $$enum
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_RecursiveInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: RecursiveInput!) {\nrecursiveInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectRecursiveInput: serializeInputObjectRecursiveInput,
+ makeVariables: makeVariables,
+ makeInputObjectRecursiveInput: makeInputObjectRecursiveInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/recursiveInput.re b/tests_bucklescript/static_snapshots/objects/operations/recursiveInput.re
new file mode 100644
index 00000000..038cbb83
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/recursiveInput.re
@@ -0,0 +1,167 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "recursiveInput": string};
+ type t_variables = {. "arg": t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ .
+ "otherField": Js.Nullable.t(string),
+ "inner": Js.Nullable.t(t_variables_RecursiveInput),
+ "enum": Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: RecursiveInput!) {\nrecursiveInput(arg: $arg) \n}\n";
+ type t = {. "recursiveInput": string};
+ type t_variables = {. "arg": t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ .
+ "otherField": option(string),
+ "inner": option(t_variables_RecursiveInput),
+ "enum": option([ | `FIRST | `SECOND | `THIRD]),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let recursiveInput = {
+ let value = value##recursiveInput;
+ value;
+ };
+ {"recursiveInput": recursiveInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let recursiveInput = {
+ let value = value##recursiveInput;
+ value;
+ };
+ {"recursiveInput": recursiveInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {"arg": (a => serializeInputObjectRecursiveInput(a))(inp##arg)}
+ and serializeInputObjectRecursiveInput:
+ t_variables_RecursiveInput => Raw.t_variables_RecursiveInput =
+ inp => {
+ "otherField":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##otherField,
+ ),
+ "inner":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectRecursiveInput(a))(b),
+ )
+ }
+ )(
+ inp##inner,
+ ),
+ "enum":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ inp##enum,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectRecursiveInput =
+ (~otherField=?, ~inner=?, ~enum=?, ()): t_variables_RecursiveInput => {
+ "otherField": otherField,
+ "inner": inner,
+ "enum": enum,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_RecursiveInput_47;
+ /**```
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}
+```*/
+ let _graphql_RecursiveInput_47: _graphql_RecursiveInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/scalars.js b/tests_bucklescript/static_snapshots/objects/operations/scalars.js
new file mode 100644
index 00000000..4d646c81
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/scalars.js
@@ -0,0 +1,101 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/scalars.re b/tests_bucklescript/static_snapshots/objects/operations/scalars.re
new file mode 100644
index 00000000..442c0340
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/scalars.re
@@ -0,0 +1,248 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n";
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/scalarsArgs.js b/tests_bucklescript/static_snapshots/objects/operations/scalarsArgs.js
new file mode 100644
index 00000000..26060865
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/scalarsArgs.js
@@ -0,0 +1,69 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serialize(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.nullableString;
+ var a$1 = inp.nullableInt;
+ var a$2 = inp.nullableFloat;
+ var a$3 = inp.nullableBoolean;
+ var a$4 = inp.nullableID;
+ return {
+ nullableString: a !== undefined ? a : undefined,
+ string: inp.string,
+ nullableInt: a$1 !== undefined ? a$1 : undefined,
+ int: inp.int,
+ nullableFloat: a$2 !== undefined ? a$2 : undefined,
+ float: inp.float,
+ nullableBoolean: a$3 !== undefined ? a$3 : undefined,
+ boolean: inp.boolean,
+ nullableID: a$4 !== undefined ? a$4 : undefined,
+ id: inp.id
+ };
+}
+
+function makeVariables(nullableString, string, nullableInt, $$int, nullableFloat, $$float, nullableBoolean, $$boolean, nullableID, id, param) {
+ return serializeVariables({
+ nullableString: nullableString,
+ string: string,
+ nullableInt: nullableInt,
+ int: $$int,
+ nullableFloat: nullableFloat,
+ float: $$float,
+ nullableBoolean: nullableBoolean,
+ boolean: $$boolean,
+ nullableID: nullableID,
+ id: id
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/scalarsArgs.re b/tests_bucklescript/static_snapshots/objects/operations/scalarsArgs.re
new file mode 100644
index 00000000..430065b3
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/scalarsArgs.re
@@ -0,0 +1,197 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "scalarsInput": string};
+ type t_variables = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \n}\n";
+ type t = {. "scalarsInput": string};
+ type t_variables = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "nullableString":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableString,
+ ),
+ "string": (a => a)(inp##string),
+ "nullableInt":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableInt,
+ ),
+ "int": (a => a)(inp##int),
+ "nullableFloat":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableFloat,
+ ),
+ "float": (a => a)(inp##float),
+ "nullableBoolean":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableBoolean,
+ ),
+ "boolean": (a => a)(inp##boolean),
+ "nullableID":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableID,
+ ),
+ "id": (a => a)(inp##id),
+ };
+ let makeVariables =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/scalarsInput.js b/tests_bucklescript/static_snapshots/objects/operations/scalarsInput.js
new file mode 100644
index 00000000..8ed25329
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/scalarsInput.js
@@ -0,0 +1,84 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serialize(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serializeInputObjectVariousScalarsInput(inp) {
+ var a = inp.nullableString;
+ var a$1 = inp.nullableInt;
+ var a$2 = inp.nullableFloat;
+ var a$3 = inp.nullableBoolean;
+ var a$4 = inp.nullableID;
+ return {
+ nullableString: a !== undefined ? a : undefined,
+ string: inp.string,
+ nullableInt: a$1 !== undefined ? a$1 : undefined,
+ int: inp.int,
+ nullableFloat: a$2 !== undefined ? a$2 : undefined,
+ float: inp.float,
+ nullableBoolean: a$3 !== undefined ? a$3 : undefined,
+ boolean: inp.boolean,
+ nullableID: a$4 !== undefined ? a$4 : undefined,
+ id: inp.id
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectVariousScalarsInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+function makeInputObjectVariousScalarsInput(nullableString, string, nullableInt, $$int, nullableFloat, $$float, nullableBoolean, $$boolean, nullableID, id, param) {
+ return {
+ nullableString: nullableString,
+ string: string,
+ nullableInt: nullableInt,
+ int: $$int,
+ nullableFloat: nullableFloat,
+ float: $$float,
+ nullableBoolean: nullableBoolean,
+ boolean: $$boolean,
+ nullableID: nullableID,
+ id: id
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_VariousScalarsInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: VariousScalarsInput!) {\nscalarsInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectVariousScalarsInput: serializeInputObjectVariousScalarsInput,
+ makeVariables: makeVariables,
+ makeInputObjectVariousScalarsInput: makeInputObjectVariousScalarsInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/scalarsInput.re b/tests_bucklescript/static_snapshots/objects/operations/scalarsInput.re
new file mode 100644
index 00000000..a3c20e30
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/scalarsInput.re
@@ -0,0 +1,221 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "scalarsInput": string};
+ type t_variables = {. "arg": t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: VariousScalarsInput!) {\nscalarsInput(arg: $arg) \n}\n";
+ type t = {. "scalarsInput": string};
+ type t_variables = {. "arg": t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let scalarsInput = {
+ let value = value##scalarsInput;
+ value;
+ };
+ {"scalarsInput": scalarsInput};
+ };
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ "arg": (a => serializeInputObjectVariousScalarsInput(a))(inp##arg),
+ }
+ and serializeInputObjectVariousScalarsInput:
+ t_variables_VariousScalarsInput => Raw.t_variables_VariousScalarsInput =
+ inp => {
+ "nullableString":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableString,
+ ),
+ "string": (a => a)(inp##string),
+ "nullableInt":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableInt,
+ ),
+ "int": (a => a)(inp##int),
+ "nullableFloat":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableFloat,
+ ),
+ "float": (a => a)(inp##float),
+ "nullableBoolean":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableBoolean,
+ ),
+ "boolean": (a => a)(inp##boolean),
+ "nullableID":
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ inp##nullableID,
+ ),
+ "id": (a => a)(inp##id),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({"arg": arg}: t_variables)
+ and makeInputObjectVariousScalarsInput =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ )
+ : t_variables_VariousScalarsInput => {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec _graphql_VariousScalarsInput_47;
+ /**```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+```*/
+ let _graphql_VariousScalarsInput_47: _graphql_VariousScalarsInput_47 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/skipDirectives.js b/tests_bucklescript/static_snapshots/objects/operations/skipDirectives.js
new file mode 100644
index 00000000..1d35efc8
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/skipDirectives.js
@@ -0,0 +1,84 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.v2;
+ var value$2 = value$1.string;
+ var string = !(value$2 == null) ? value$2 : undefined;
+ var value$3 = value$1.nullableString;
+ var nullableString = !(value$3 == null) ? value$3 : undefined;
+ var v2 = {
+ nullableString: nullableString,
+ string: string
+ };
+ var value$4 = value.v1;
+ var value$5 = value$4.string;
+ var string$1 = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$4.nullableString;
+ var nullableString$1 = !(value$6 == null) ? value$6 : undefined;
+ var v1 = {
+ nullableString: nullableString$1,
+ string: string$1
+ };
+ return {
+ v1: v1,
+ v2: v2
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.v2;
+ var value$2 = value$1.string;
+ var string = value$2 !== undefined ? value$2 : null;
+ var value$3 = value$1.nullableString;
+ var nullableString = value$3 !== undefined ? value$3 : null;
+ var v2 = {
+ nullableString: nullableString,
+ string: string
+ };
+ var value$4 = value.v1;
+ var value$5 = value$4.string;
+ var string$1 = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$4.nullableString;
+ var nullableString$1 = value$6 !== undefined ? value$6 : null;
+ var v1 = {
+ nullableString: nullableString$1,
+ string: string$1
+ };
+ return {
+ v1: v1,
+ v2: v2
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ var: inp.var
+ };
+}
+
+function makeVariables($$var, param) {
+ return serializeVariables({
+ var: $$var
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($var: Boolean!) {\nv1: variousScalars {\nnullableString @skip(if: $var) \nstring @skip(if: $var) \n}\n\nv2: variousScalars {\nnullableString @include(if: $var) \nstring @include(if: $var) \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/skipDirectives.re b/tests_bucklescript/static_snapshots/objects/operations/skipDirectives.re
new file mode 100644
index 00000000..fd2ccec2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/skipDirectives.re
@@ -0,0 +1,183 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_v1 = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": Js.Nullable.t(string),
+ };
+ type t_v2 = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": Js.Nullable.t(string),
+ };
+ type t = {
+ .
+ "v1": t_v1,
+ "v2": t_v2,
+ };
+ type t_variables = {. "var": bool};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($var: Boolean!) {\nv1: variousScalars {\nnullableString @skip(if: $var) \nstring @skip(if: $var) \n}\n\nv2: variousScalars {\nnullableString @include(if: $var) \nstring @include(if: $var) \n}\n\n}\n";
+ type t_v1 = {
+ .
+ "nullableString": option(string),
+ "string": option(string),
+ };
+ type t_v2 = {
+ .
+ "nullableString": option(string),
+ "string": option(string),
+ };
+ type t = {
+ .
+ "v1": t_v1,
+ "v2": t_v2,
+ };
+ type t_variables = {. "var": bool};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let v2 = {
+ let value = value##v2;
+ let string = {
+ let value = value##string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {"nullableString": nullableString, "string": string};
+ }
+ and v1 = {
+ let value = value##v1;
+ let string = {
+ let value = value##string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {"nullableString": nullableString, "string": string};
+ };
+ {"v1": v1, "v2": v2};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let v2 = {
+ let value = value##v2;
+ let string = {
+ let value = value##string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableString": nullableString, "string": string};
+ }
+ and v1 = {
+ let value = value##v1;
+ let string = {
+ let value = value##string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableString": nullableString, "string": string};
+ };
+ {"v1": v1, "v2": v2};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"var": (a => a)(inp##var)};
+ let makeVariables = (~var, ()) =>
+ serializeVariables({"var": var}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/subscription.js b/tests_bucklescript/static_snapshots/objects/operations/subscription.js
new file mode 100644
index 00000000..0ed34845
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/subscription.js
@@ -0,0 +1,93 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.simpleSubscription;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ simpleSubscription: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.simpleSubscription;
+ var variant = value$1[0];
+ var tmp;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1].name;
+ tmp = {
+ __typename: "Dog",
+ name: value$2
+ };
+ } else {
+ var value$3 = value$1[1].name;
+ tmp = {
+ __typename: "Human",
+ name: value$3
+ };
+ }
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ simpleSubscription: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "subscription {\nsimpleSubscription {\n__typename\n...on Dog {\nname \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/subscription.re b/tests_bucklescript/static_snapshots/objects/operations/subscription.re
new file mode 100644
index 00000000..4c4c58ee
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/subscription.re
@@ -0,0 +1,162 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_simpleSubscription_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_simpleSubscription_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_simpleSubscription;
+ type t = {. "simpleSubscription": t_simpleSubscription};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "subscription {\nsimpleSubscription {\n__typename\n...on Dog {\nname \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_simpleSubscription_Dog = {. "name": string};
+ type t_simpleSubscription_Human = {. "name": string};
+ type t_simpleSubscription = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_simpleSubscription_Dog)
+ | `Human(t_simpleSubscription_Human)
+ ];
+ type t = {. "simpleSubscription": t_simpleSubscription};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let simpleSubscription = {
+ let value = value##simpleSubscription;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_simpleSubscription_Dog = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_simpleSubscription_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_simpleSubscription
+ );
+ };
+ {"simpleSubscription": simpleSubscription};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let simpleSubscription = {
+ let value = value##simpleSubscription;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name};
+ },
+ ): Raw.t_simpleSubscription
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_simpleSubscription
+ )
+ | `FutureAddedValue(value) => (
+ Obj.magic(value): Raw.t_simpleSubscription
+ )
+ };
+ };
+ {"simpleSubscription": simpleSubscription};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/tagged_template.js b/tests_bucklescript/static_snapshots/objects/operations/tagged_template.js
new file mode 100644
index 00000000..954481f9
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/tagged_template.js
@@ -0,0 +1,449 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+let { graphql } = require("gatsby")
+;
+
+var query = (graphql`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+`);
+
+function parse$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$1,
+ query: query,
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+let { graphql } = require("gatsby")
+;
+
+var query$1 = (graphql`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+`);
+
+function parse$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var MyQuery3 = {
+ Raw: Raw$2,
+ query: query$1,
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var Raw$3 = { };
+
+let graphql = require("gatsby")
+;
+
+var query$2 = (graphql`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+`);
+
+function parse$3(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = !(value$3 == null) ? value$3 : undefined;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = !(value$5 == null) ? value$5 : undefined;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = !(value$7 == null) ? value$7 : undefined;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = !(value$9 == null) ? value$9 : undefined;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = !(value$11 == null) ? value$11 : undefined;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serialize$3(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ return {
+ variousScalars: {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ }
+ };
+}
+
+function serializeVariables$3(param) {
+
+}
+
+function makeVariables$3(param) {
+
+}
+
+function makeDefaultVariables$3(param) {
+
+}
+
+var Z__INTERNAL$3 = {
+ graphql_module: 0
+};
+
+var MyQuery4 = {
+ Raw: Raw$3,
+ query: query$2,
+ parse: parse$3,
+ serialize: serialize$3,
+ serializeVariables: serializeVariables$3,
+ makeVariables: makeVariables$3,
+ makeDefaultVariables: makeDefaultVariables$3,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+exports.MyQuery3 = MyQuery3;
+exports.MyQuery4 = MyQuery4;
+/* Not a pure module */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/tagged_template.re b/tests_bucklescript/static_snapshots/objects/operations/tagged_template.re
new file mode 100644
index 00000000..5df39e56
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/tagged_template.re
@@ -0,0 +1,950 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n";
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let { graphql } = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery3 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let { graphql } = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery3 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery4 = {
+ module Raw = {
+ type t_variousScalars = {
+ .
+ "nullableString": Js.Nullable.t(string),
+ "string": string,
+ "nullableInt": Js.Nullable.t(int),
+ "int": int,
+ "nullableFloat": Js.Nullable.t(float),
+ "float": float,
+ "nullableBoolean": Js.Nullable.t(bool),
+ "boolean": bool,
+ "nullableID": Js.Nullable.t(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let graphql = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ .
+ "nullableString": option(string),
+ "string": string,
+ "nullableInt": option(int),
+ "int": int,
+ "nullableFloat": option(float),
+ "float": float,
+ "nullableBoolean": option(bool),
+ "boolean": bool,
+ "nullableID": option(string),
+ "id": string,
+ };
+ type t = {. "variousScalars": t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let variousScalars = {
+ let value = value##variousScalars;
+ let id = {
+ let value = value##id;
+ value;
+ }
+ and nullableID = {
+ let value = value##nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = value##boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = value##nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = value##float;
+ value;
+ }
+ and nullableFloat = {
+ let value = value##nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = value##int;
+ value;
+ }
+ and nullableInt = {
+ let value = value##nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = value##string;
+ value;
+ }
+ and nullableString = {
+ let value = value##nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableString": nullableString,
+ "string": string,
+ "nullableInt": nullableInt,
+ "int": int,
+ "nullableFloat": nullableFloat,
+ "float": float,
+ "nullableBoolean": nullableBoolean,
+ "boolean": boolean,
+ "nullableID": nullableID,
+ "id": id,
+ };
+ };
+ {"variousScalars": variousScalars};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery4 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/typename.js b/tests_bucklescript/static_snapshots/objects/operations/typename.js
new file mode 100644
index 00000000..edd181f4
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/typename.js
@@ -0,0 +1,106 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 == null) {
+ inner = undefined;
+ } else {
+ var value$3 = value$2.inner;
+ var inner$1;
+ if (value$3 == null) {
+ inner$1 = undefined;
+ } else {
+ var value$4 = value$3.field;
+ var value$5 = value$3.__typename;
+ inner$1 = {
+ __typename: value$5,
+ field: value$4
+ };
+ }
+ var value$6 = value$2.__typename;
+ inner = {
+ __typename: value$6,
+ inner: inner$1
+ };
+ }
+ var value$7 = value$1.__typename;
+ return {
+ first: {
+ __typename: value$7,
+ inner: inner
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 !== undefined) {
+ var value$3 = Caml_option.valFromOption(value$2);
+ var value$4 = value$3.inner;
+ var inner$1;
+ if (value$4 !== undefined) {
+ var value$5 = Caml_option.valFromOption(value$4);
+ var value$6 = value$5.field;
+ var value$7 = value$5.__typename;
+ inner$1 = {
+ __typename: value$7,
+ field: value$6
+ };
+ } else {
+ inner$1 = null;
+ }
+ var value$8 = value$3.__typename;
+ inner = {
+ __typename: value$8,
+ inner: inner$1
+ };
+ } else {
+ inner = null;
+ }
+ var value$9 = value$1.__typename;
+ return {
+ first: {
+ __typename: value$9,
+ inner: inner
+ }
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nfirst: nestedObject {\n__typename \ninner {\n__typename \ninner {\n__typename \nfield \n}\n\n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/typename.re b/tests_bucklescript/static_snapshots/objects/operations/typename.re
new file mode 100644
index 00000000..8bba1b7d
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/typename.re
@@ -0,0 +1,200 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ .
+ "__typename": string,
+ "field": string,
+ };
+ type t_first_inner = {
+ .
+ "__typename": string,
+ "inner": Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ .
+ "__typename": string,
+ "inner": Js.Nullable.t(t_first_inner),
+ };
+ type t = {. "first": t_first};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nfirst: nestedObject {\n__typename \ninner {\n__typename \ninner {\n__typename \nfield \n}\n\n}\n\n}\n\n}\n";
+ type t_first_inner_inner = {
+ .
+ "__typename": string,
+ "field": string,
+ };
+ type t_first_inner = {
+ .
+ "__typename": string,
+ "inner": option(t_first_inner_inner),
+ };
+ type t_first = {
+ .
+ "__typename": string,
+ "inner": option(t_first_inner),
+ };
+ type t = {. "first": t_first};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "field": field};
+ },
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "inner": inner};
+ },
+ )
+ | None => None
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "inner": inner};
+ };
+ {"first": first};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let first = {
+ let value = value##first;
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = value##inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = value##field;
+ value;
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "field": field};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "inner": inner};
+ },
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = value##__typename;
+ value;
+ };
+ {"__typename": __typename, "inner": inner};
+ };
+ {"first": first};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/union.js b/tests_bucklescript/static_snapshots/objects/operations/union.js
new file mode 100644
index 00000000..ee2a364c
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/union.js
@@ -0,0 +1,193 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var tmp;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var tmp;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ tmp = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var MyQueryNoError = {
+ Raw: Raw$1,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQueryNoError = MyQueryNoError;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/union.re b/tests_bucklescript/static_snapshots/objects/operations/union.re
new file mode 100644
index 00000000..80bc3bf1
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/union.re
@@ -0,0 +1,328 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQueryNoError = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman_Human = {. "name": string};
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Human", "name": name};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQueryNoError {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/unionPartial.js b/tests_bucklescript/static_snapshots/objects/operations/unionPartial.js
new file mode 100644
index 00000000..7fc6fdcc
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/unionPartial.js
@@ -0,0 +1,80 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ if (typename === "Dog") {
+ var value$2 = value$1.barkVolume;
+ var value$3 = value$1.name;
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$3,
+ barkVolume: value$2
+ }
+ ];
+ } else {
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var tmp;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ tmp = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ tmp = value$1[1];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/unionPartial.re b/tests_bucklescript/static_snapshots/objects/operations/unionPartial.re
new file mode 100644
index 00000000..e7be8edc
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/unionPartial.re
@@ -0,0 +1,144 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman;
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {. "dogOrHuman": t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let dogOrHuman = {
+ let value = value##dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"__typename": "Dog", "name": name, "barkVolume": barkVolume};
+ },
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {"dogOrHuman": dogOrHuman};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/objects/operations/variant.js b/tests_bucklescript/static_snapshots/objects/operations/variant.js
new file mode 100644
index 00000000..fc5b0844
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/variant.js
@@ -0,0 +1,142 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Js_exn = require("bs-platform/lib/js/js_exn.js");
+var Js_json = require("bs-platform/lib/js/js_json.js");
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationForVariant;
+ var value$2 = Js_json.decodeObject(value$1);
+ var tmp;
+ if (value$2 !== undefined) {
+ var value$3 = Caml_option.valFromOption(value$2);
+ var temp = value$3["baseType"];
+ var match = Js_json.decodeNull(temp);
+ if (match !== undefined) {
+ var temp$1 = value$3["baseTypeList"];
+ var match$1 = Js_json.decodeNull(temp$1);
+ if (match$1 !== undefined) {
+ var temp$2 = value$3["dog"];
+ var match$2 = Js_json.decodeNull(temp$2);
+ if (match$2 !== undefined) {
+ var temp$3 = value$3["human"];
+ var match$3 = Js_json.decodeNull(temp$3);
+ if (match$3 !== undefined) {
+ var temp$4 = value$3["dogOrHuman"];
+ var match$4 = Js_json.decodeNull(temp$4);
+ if (match$4 !== undefined) {
+ tmp = Js_exn.raiseError("graphql-ppx: All fields on variant selection set on type VariantTestResult were null");
+ } else {
+ var typename = temp$4["__typename"];
+ var tmp$1;
+ switch (typename) {
+ case "Dog" :
+ var value$4 = temp$4.barkVolume;
+ var value$5 = temp$4.name;
+ tmp$1 = /* `Dog */[
+ 3406428,
+ {
+ name: value$5,
+ barkVolume: value$4
+ }
+ ];
+ break;
+ case "Human" :
+ tmp$1 = /* `Human */[
+ -1031617139,
+ {
+ name: temp$4.name
+ }
+ ];
+ break;
+ default:
+ tmp$1 = /* `FutureAddedValue */[
+ -31101740,
+ temp$4
+ ];
+ }
+ tmp = /* `DogOrHuman */[
+ 974247566,
+ tmp$1
+ ];
+ }
+ } else {
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: temp$3.name
+ }
+ ];
+ }
+ } else {
+ var value$6 = temp$2.barkVolume;
+ var value$7 = temp$2.name;
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$7,
+ barkVolume: value$6
+ }
+ ];
+ }
+ } else {
+ tmp = /* `BaseTypeList */[
+ -259847799,
+ temp$1.map((function (value) {
+ return value;
+ }))
+ ];
+ }
+ } else {
+ tmp = /* `BaseType */[
+ -620191861,
+ temp
+ ];
+ }
+ } else {
+ tmp = Js_exn.raiseError("graphql-ppx: Expected type VariantTestResult to be an object");
+ }
+ return {
+ mutationForVariant: tmp
+ };
+}
+
+function serialize(value) {
+ value.mutationForVariant;
+ return {
+ mutationForVariant: null
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "mutation {\nmutationForVariant {\nbaseType \nbaseTypeList \ndog {\nname \nbarkVolume \n}\n\nhuman {\nname \n}\n\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/objects/operations/variant.re b/tests_bucklescript/static_snapshots/objects/operations/variant.re
new file mode 100644
index 00000000..b86dd6f3
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/objects/operations/variant.re
@@ -0,0 +1,248 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationForVariant_dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_mutationForVariant_human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ .
+ "__typename": string,
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ .
+ "__typename": string,
+ "name": string,
+ };
+ type t_mutationForVariant_dogOrHuman;
+ type t_mutationForVariant;
+ type t = {. "mutationForVariant": t_mutationForVariant};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationForVariant {\nbaseType \nbaseTypeList \ndog {\nname \nbarkVolume \n}\n\nhuman {\nname \n}\n\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n\n}\n";
+ type t_mutationForVariant_dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_mutationForVariant_human = {. "name": string};
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ .
+ "name": string,
+ "barkVolume": float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {. "name": string};
+ type t_mutationForVariant_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_mutationForVariant_dogOrHuman_Dog)
+ | `Human(t_mutationForVariant_dogOrHuman_Human)
+ ];
+ type t_mutationForVariant = [
+ | `BaseType(string)
+ | `BaseTypeList(array(string))
+ | `Dog(t_mutationForVariant_dog)
+ | `Human(t_mutationForVariant_human)
+ | `DogOrHuman(t_mutationForVariant_dogOrHuman)
+ ];
+ type t = {. "mutationForVariant": t_mutationForVariant};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let mutationForVariant = {
+ let value = value##mutationForVariant;
+ switch (Js.Json.decodeObject(Obj.magic(value): Js.Json.t)) {
+ | None =>
+ Js.Exn.raiseError(
+ "graphql-ppx: "
+ ++ "Expected type "
+ ++ "VariantTestResult"
+ ++ " to be an object",
+ )
+ | Some(value) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "baseType");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `BaseType(value);
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "baseTypeList");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `BaseTypeList(value |> Js.Array.map(value => value));
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "dog");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `Dog(
+ {
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "human");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `Human(
+ {
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "dogOrHuman");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `DogOrHuman(
+ {
+ let typename: string =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "__typename"),
+ );
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Dog =
+ Obj.magic(value);
+ let barkVolume = {
+ let value = value##barkVolume;
+ value;
+ }
+ and name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name, "barkVolume": barkVolume};
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Human =
+ Obj.magic(value);
+ let name = {
+ let value = value##name;
+ value;
+ };
+ {"name": name};
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_mutationForVariant_dogOrHuman
+ );
+ },
+ );
+ | Some(_) =>
+ Js.Exn.raiseError(
+ "graphql-ppx: "
+ ++ "All fields on variant selection set on type "
+ ++ "VariantTestResult"
+ ++ " were null",
+ )
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ {"mutationForVariant": mutationForVariant};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let mutationForVariant = {
+ let value = value##mutationForVariant;
+ Obj.magic(Js.Json.null);
+ };
+ {"mutationForVariant": mutationForVariant};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues2.txt b/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues2.txt
new file mode 100644
index 00000000..a5b5775a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues2.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues2.re 8:13-18
+
+ 6 ┆ query {
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nullableArray: [""]
+ 10 ┆ field: ""
+
+ Invalid argument. The field "nonNullableField" on argument "nonRec" is missing.
diff --git a/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues3.txt b/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues3.txt
new file mode 100644
index 00000000..cd62821e
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues3.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues3.re 9:35
+
+ 7 ┆ invalidObjectValues(
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: 5
+ 10 ┆ nullableArray: [""]
+ 11 ┆ field: ""
+
+ Invalid argument. Expected "String!" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues4.txt b/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues4.txt
new file mode 100644
index 00000000..163233ac
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues4.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues4.re 10:32-34
+
+ 8 ┆ nonRec: {
+ 9 ┆ nonNullableField: "!"
+ 10 ┆ nullableArray: [2]
+ 11 ┆ field: ""
+ 12 ┆ enum: FIRST
+
+ Invalid argument. Expected "[String]" but received "[Int!]!".
diff --git a/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues5.txt b/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues5.txt
new file mode 100644
index 00000000..10db2d09
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/InvalidObjectValues5.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/InvalidObjectValues5.re 20:23-24
+
+ 18 ┆ otherField: ""
+ 19 ┆ }
+ 20 ┆ enum: []
+ 21 ┆ }
+ 22 ┆ )
+
+ Invalid argument. Expected "Enum" but received "EmptyList!".
diff --git a/tests_bucklescript/static_snapshots/records/errors/deprecatedFields.txt b/tests_bucklescript/static_snapshots/records/errors/deprecatedFields.txt
new file mode 100644
index 00000000..5811eee7
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/deprecatedFields.txt
@@ -0,0 +1,4 @@
+File "operations/errors/deprecatedFields.re", line 7, characters 6-21:
+7 | deprecatedField
+ ^^^^^^^^^^^^^^^
+Warning 22: Field "deprecatedField" has been deprecated. Reason: Use something else instead
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType1.txt b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType1.txt
new file mode 100644
index 00000000..dd99957a
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType1.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType1.re 9:25-28
+
+ 7 ┆ query invalidArgValues {
+ 8 ┆ invalidArgValues(
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. The variable "$arg" on argument "stringRequired" is missing.
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType2.txt b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType2.txt
new file mode 100644
index 00000000..60b2a625
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType2.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType2.re 8:25-28
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable "$arg" to the required argument "stringRequired".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType3.txt b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType3.txt
new file mode 100644
index 00000000..92212cb2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType3.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType3.re 9:17-21
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ stringRequired: $arg
+ 9 ┆ string: $arg2
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Expected "String" but received "Int".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType4.txt b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType4.txt
new file mode 100644
index 00000000..03ab435f
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType4.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType4.re 10:14-18
+
+ 8 ┆ invalidArgValues(
+ 9 ┆ custom: $arg
+ 10 ┆ obj: $arg2
+ 11 ┆ stringRequired: ""
+ 12 ┆ )
+
+ Invalid argument. Expected "InputObject" but received "Int".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType5.txt b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType5.txt
new file mode 100644
index 00000000..ee032f35
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType5.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType5.re 9:25-28
+
+ 7 ┆ invalidArgValues(
+ 8 ┆ id: $arg
+ 9 ┆ stringRequired: $arg
+ 10 ┆ )
+ 11 ┆ }
+
+ Invalid argument. Trying to apply the nullable variable "$arg" to the required argument "stringRequired".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType6.txt b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType6.txt
new file mode 100644
index 00000000..d68b3d30
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidArgVariableType6.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidArgVariableType6.re 8:15-18
+
+ 6 ┆ query invalidArgValues($arg: String) {
+ 7 ┆ invalidArgValues(
+ 8 ┆ list: $arg
+ 9 ┆ stringRequired: ""
+ 10 ┆ )
+
+ Invalid argument. Expected "[String]" but received "String".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue1.txt b/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue1.txt
new file mode 100644
index 00000000..737644cc
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue1.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue1.re 21:14-26
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ int: "Some string"
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected "Int" but received "String!".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue2.txt b/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue2.txt
new file mode 100644
index 00000000..3b3dc627
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue2.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue2.re 8:14-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ int: {test: "xxx"}
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected "Int" but received "InputObject!".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue3.txt b/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue3.txt
new file mode 100644
index 00000000..fe3d71df
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue3.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue3.re 21:13
+
+ 19 ┆ query invalidDefaultValues {
+ 20 ┆ invalidDefaultValues(
+ 21 ┆ id: 5
+ 22 ┆ )
+ 23 ┆ }
+
+ Invalid argument. Expected "ID" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue4.txt b/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue4.txt
new file mode 100644
index 00000000..a79e71df
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidDefaultValue4.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidDefaultValue4.re 8:17-26
+
+ 6 ┆ query invalidDefaultValues {
+ 7 ┆ invalidDefaultValues(
+ 8 ┆ string: ["1", "2"]
+ 9 ┆ )
+ 10 ┆ }
+
+ Invalid argument. Expected "String" but received "List".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidObjectValues1.txt b/tests_bucklescript/static_snapshots/records/errors/invalidObjectValues1.txt
new file mode 100644
index 00000000..cd910433
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidObjectValues1.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidObjectValues1.re 19:37
+
+ 17 ┆ otherField: ""
+ 18 ┆ inner: {
+ 19 ┆ otherField: 5
+ 20 ┆ }
+ 21 ┆ }
+
+ Invalid argument. Expected "String" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidObjectValues6.txt b/tests_bucklescript/static_snapshots/records/errors/invalidObjectValues6.txt
new file mode 100644
index 00000000..5141729d
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidObjectValues6.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidObjectValues6.re 20:27-37
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: {field: ""}
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected "[InputObject]!" but received "InputObject!".
diff --git a/tests_bucklescript/static_snapshots/records/errors/invalidObjectValues7.txt b/tests_bucklescript/static_snapshots/records/errors/invalidObjectValues7.txt
new file mode 100644
index 00000000..4f123fbf
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/invalidObjectValues7.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/invalidObjectValues7.re 20:36
+
+ 18 ┆ query {
+ 19 ┆ invalidObjectValuesLst(
+ 20 ┆ embeddedList: [{field: 5}]
+ 21 ┆ )
+ 22 ┆ }
+
+ Invalid argument. Expected "String!" but received "Int!".
diff --git a/tests_bucklescript/static_snapshots/records/errors/missingField1.txt b/tests_bucklescript/static_snapshots/records/errors/missingField1.txt
new file mode 100644
index 00000000..572b6cbd
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/missingField1.txt
@@ -0,0 +1,7 @@
+File "operations/errors/missingField1.re", line 6, characters 6-27:
+6 | thisFieldDoesNotExist
+ ^^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisFieldDoesNotExist' on type CustomScalarObject
+
+ We've found a bug for you!
+ operations/errors/missingField1.re
diff --git a/tests_bucklescript/static_snapshots/records/errors/missingField2.txt b/tests_bucklescript/static_snapshots/records/errors/missingField2.txt
new file mode 100644
index 00000000..ef9b79eb
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/missingField2.txt
@@ -0,0 +1,7 @@
+File "operations/errors/missingField2.re", line 13, characters 8-28:
+13 | l1: thisTypeDoesNotExist {
+ ^^^^^^^^^^^^^^^^^^^^
+Error: Unknown field 'thisTypeDoesNotExist' on type Query
+
+ We've found a bug for you!
+ operations/errors/missingField2.re
diff --git a/tests_bucklescript/static_snapshots/records/errors/missingField3.txt b/tests_bucklescript/static_snapshots/records/errors/missingField3.txt
new file mode 100644
index 00000000..1ae6f235
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/missingField3.txt
@@ -0,0 +1,7 @@
+File "operations/errors/missingField3.re", line 15, characters 6-18:
+15 | doesNotExist
+ ^^^^^^^^^^^^
+Error: Unknown field 'doesNotExist' on type Lists
+
+ We've found a bug for you!
+ operations/errors/missingField3.re
diff --git a/tests_bucklescript/static_snapshots/records/errors/missingFragment.txt b/tests_bucklescript/static_snapshots/records/errors/missingFragment.txt
new file mode 100644
index 00000000..2cde476e
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/errors/missingFragment.txt
@@ -0,0 +1,10 @@
+We've found a bug for you!
+ operations/errors/missingFragment.re 3:28-42
+
+ 1 │ module Fragment = [%graphql
+ 2 │ {|
+ 3 │ fragment ListFragment on UnknownFragment {
+ 4 │ nullableOfNullable
+ 5 │ nullableOfNonNullable
+
+ Unknown type "UnknownFragment"
diff --git a/tests_bucklescript/static_snapshots/records/operations/GraphQL_PPX.re b/tests_bucklescript/static_snapshots/records/operations/GraphQL_PPX.re
new file mode 100644
index 00000000..67109305
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/GraphQL_PPX.re
@@ -0,0 +1,66 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+
+let%private clone: Js.Dict.t('a) => Js.Dict.t('a) =
+ a => Obj.magic(Js.Obj.assign(Obj.magic(Js.Obj.empty()), Obj.magic(a)));
+
+let rec deepMerge = (json1: Js.Json.t, json2: Js.Json.t) =>
+ switch (
+ (
+ Obj.magic(json1) == Js.null,
+ Js_array2.isArray(json1),
+ Js.typeof(json1) == "object",
+ ),
+ (
+ Obj.magic(json2) == Js.null,
+ Js_array2.isArray(json2),
+ Js.typeof(json2) == "object",
+ ),
+ ) {
+ | ((_, true, _), (_, true, _)) => (
+ Obj.magic(
+ Js.Array.mapi(
+ (el1, idx) => {
+ let el2 = Js.Array.unsafe_get(Obj.magic(json2), idx);
+
+ Js.typeof(el2) == "object" ? deepMerge(el1, el2) : el2;
+ },
+ Obj.magic(json1),
+ ),
+ ): Js.Json.t
+ )
+
+ | ((false, false, true), (false, false, true)) =>
+ let obj1 = clone(Obj.magic(json1));
+ let obj2 = Obj.magic(json2);
+ Js.Dict.keys(obj2)
+ |> Js.Array.forEach(key =>
+ let existingVal: Js.Json.t = Js.Dict.unsafeGet(obj1, key);
+ let newVal: Js.Json.t = Js.Dict.unsafeGet(obj2, key);
+ Js.Dict.set(
+ obj1,
+ key,
+ Js.typeof(existingVal) != "object"
+ ? newVal : Obj.magic(deepMerge(existingVal, newVal)),
+ );
+ );
+ Obj.magic(obj1);
+
+ | ((_, _, _), (_, _, _)) => json2
+ };
diff --git a/tests_bucklescript/static_snapshots/records/operations/argNamedQuery.js b/tests_bucklescript/static_snapshots/records/operations/argNamedQuery.js
new file mode 100644
index 00000000..295e63bc
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/argNamedQuery.js
@@ -0,0 +1,49 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ argNamedQuery: value.argNamedQuery
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.argNamedQuery;
+ return {
+ argNamedQuery: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ query: inp.query
+ };
+}
+
+function makeVariables(query, param) {
+ return {
+ query: query
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_query_82: 0,
+ _graphql_query_75: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($query: Int!) {\nargNamedQuery(query: $query) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/argNamedQuery.re b/tests_bucklescript/static_snapshots/records/operations/argNamedQuery.re
new file mode 100644
index 00000000..cdbf1c3b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/argNamedQuery.re
@@ -0,0 +1,108 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {argNamedQuery: int};
+ type t_variables = {query: int};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($query: Int!) {\nargNamedQuery(query: $query) \n}\n";
+ type t = {argNamedQuery: int};
+ type t_variables = {query: int};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ argNamedQuery: {
+ let value = (value: Raw.t).argNamedQuery;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let argNamedQuery = {
+ let value = (value: t).argNamedQuery;
+ value;
+ };
+ {argNamedQuery: argNamedQuery};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {query: (a => a)((inp: t_variables).query)};
+ let makeVariables = (~query, ()) =>
+ serializeVariables({query: query}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_query_82;
+ /**Variable **$query** has the following graphql type:
+
+```
+Int!
+```*/
+ let _graphql_query_82: _graphql_query_82 = Obj.magic(0);
+ type nonrec _graphql_query_75;
+ /**Argument **query** on field **argNamedQuery** has the following graphql type:
+
+```
+Int!
+```*/
+ let _graphql_query_75: _graphql_query_75 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/comment.js b/tests_bucklescript/static_snapshots/records/operations/comment.js
new file mode 100644
index 00000000..de391763
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/comment.js
@@ -0,0 +1,110 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require("bs-platform/lib/js/array.js");
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.nonrecursiveInput;
+ return {
+ nonrecursiveInput: value$1
+ };
+}
+
+function serializeInputObjectEmbeddedInput(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput(b);
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(arg)
+ };
+}
+
+function makeInputObjectNonrecursiveInput(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_100: 0,
+ _graphql_arg_95: 0,
+ _graphql_NonrecursiveInput_49: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput,
+ makeVariables: makeVariables,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/comment.re b/tests_bucklescript/static_snapshots/records/operations/comment.re
new file mode 100644
index 00000000..2d4ce90b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/comment.re
@@ -0,0 +1,307 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n";
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | `FIRST | `SECOND | `THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nonrecursiveInput: {
+ let value = (value: Raw.t).nonrecursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nonrecursiveInput = {
+ let value = (value: t).nonrecursiveInput;
+ value;
+ };
+ {nonrecursiveInput: nonrecursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_100;
+ /**Variable **$arg** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_100: _graphql_arg_100 = Obj.magic(0);
+ type nonrec _graphql_arg_95;
+ /**Argument **arg** on field **nonrecursiveInput** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_95: _graphql_arg_95 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/customDecoder.js b/tests_bucklescript/static_snapshots/records/operations/customDecoder.js
new file mode 100644
index 00000000..650490f2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/customDecoder.js
@@ -0,0 +1,85 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_format = require("bs-platform/lib/js/caml_format.js");
+
+function parse(prim) {
+ return String(prim);
+}
+
+var serialize = Caml_format.caml_int_of_string;
+
+var StringOfInt = {
+ parse: parse,
+ serialize: serialize
+};
+
+var parse$1 = Caml_format.caml_int_of_string;
+
+function serialize$1(prim) {
+ return String(prim);
+}
+
+var IntOfString = {
+ parse: parse$1,
+ serialize: serialize$1
+};
+
+var Raw = { };
+
+function parse$2(value) {
+ var value$1 = value.variousScalars;
+ return {
+ variousScalars: {
+ string: Caml_format.caml_int_of_string(value$1.string),
+ int: String(value$1.int)
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var $$int = Caml_format.caml_int_of_string(value$2);
+ var value$3 = value$1.string;
+ var string = String(value$3);
+ var variousScalars = {
+ string: string,
+ int: $$int
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nvariousScalars {\nstring \nint \n}\n\n}\n",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.StringOfInt = StringOfInt;
+exports.IntOfString = IntOfString;
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/customDecoder.re b/tests_bucklescript/static_snapshots/records/operations/customDecoder.re
new file mode 100644
index 00000000..536066c6
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/customDecoder.re
@@ -0,0 +1,134 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module StringOfInt = {
+ let parse = string_of_int;
+ let serialize = int_of_string;
+ type t = string;
+};
+module IntOfString = {
+ let parse = int_of_string;
+ let serialize = string_of_int;
+ type t = int;
+};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ string,
+ int,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nstring \nint \n}\n\n}\n";
+ type t_variousScalars = {
+ string: IntOfString.t,
+ int: StringOfInt.t,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ IntOfString.parse(value);
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ StringOfInt.parse(value);
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let int = {
+ let value = (value: t_variousScalars).int;
+ StringOfInt.serialize(value);
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ IntOfString.serialize(value);
+ };
+ {string, int};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/customScalars.js b/tests_bucklescript/static_snapshots/records/operations/customScalars.js
new file mode 100644
index 00000000..e471d4d2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/customScalars.js
@@ -0,0 +1,67 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.customScalarField;
+ var value$2 = value$1.nullable;
+ return {
+ customScalarField: {
+ nullable: !(value$2 == null) ? Caml_option.some(value$2) : undefined,
+ nonNullable: value$1.nonNullable
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.customScalarField;
+ var value$2 = value$1.nonNullable;
+ var value$3 = value$1.nullable;
+ var nullable = value$3 !== undefined ? Caml_option.valFromOption(value$3) : null;
+ var customScalarField = {
+ nullable: nullable,
+ nonNullable: value$2
+ };
+ return {
+ customScalarField: customScalarField
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.opt;
+ return {
+ opt: a !== undefined ? Caml_option.valFromOption(a) : undefined,
+ req: inp.req
+ };
+}
+
+function makeVariables(opt, req, param) {
+ return serializeVariables({
+ opt: opt,
+ req: req
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_opt_119: 0,
+ _graphql_argOptional_106: 0,
+ _graphql_req_138: 0,
+ _graphql_argRequired_125: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($opt: CustomScalar, $req: CustomScalar!) {\ncustomScalarField(argOptional: $opt, argRequired: $req) {\nnullable \nnonNullable \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/customScalars.re b/tests_bucklescript/static_snapshots/records/operations/customScalars.re
new file mode 100644
index 00000000..545fe123
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/customScalars.re
@@ -0,0 +1,177 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_customScalarField = {
+ nullable: Js.Nullable.t(Js.Json.t),
+ nonNullable: Js.Json.t,
+ };
+ type t = {customScalarField: t_customScalarField};
+ type t_variables = {
+ opt: Js.Nullable.t(Js.Json.t),
+ req: Js.Json.t,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($opt: CustomScalar, $req: CustomScalar!) {\ncustomScalarField(argOptional: $opt, argRequired: $req) {\nnullable \nnonNullable \n}\n\n}\n";
+ type t_customScalarField = {
+ nullable: option(Js.Json.t),
+ nonNullable: Js.Json.t,
+ };
+ type t = {customScalarField: t_customScalarField};
+ type t_variables = {
+ opt: option(Js.Json.t),
+ req: Js.Json.t,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ customScalarField: {
+ let value = (value: Raw.t).customScalarField;
+ (
+ {
+ nullable: {
+ let value = (value: Raw.t_customScalarField).nullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ nonNullable: {
+ let value = (value: Raw.t_customScalarField).nonNullable;
+ value;
+ },
+ }: t_customScalarField
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let customScalarField = {
+ let value = (value: t).customScalarField;
+ (
+ {
+ let nonNullable = {
+ let value = (value: t_customScalarField).nonNullable;
+ value;
+ }
+ and nullable = {
+ let value = (value: t_customScalarField).nullable;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {nullable, nonNullable};
+ }: Raw.t_customScalarField
+ );
+ };
+ {customScalarField: customScalarField};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ opt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).opt,
+ ),
+ req: (a => a)((inp: t_variables).req),
+ };
+ let makeVariables = (~opt=?, ~req, ()) =>
+ serializeVariables({opt, req}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_opt_119;
+ /**Variable **$opt** has the following graphql type:
+
+```
+CustomScalar
+```*/
+ let _graphql_opt_119: _graphql_opt_119 = Obj.magic(0);
+ type nonrec _graphql_argOptional_106;
+ /**Argument **argOptional** on field **customScalarField** has the following graphql type:
+
+```
+CustomScalar
+```*/
+ let _graphql_argOptional_106: _graphql_argOptional_106 = Obj.magic(0);
+ type nonrec _graphql_req_138;
+ /**Variable **$req** has the following graphql type:
+
+```
+CustomScalar!
+```*/
+ let _graphql_req_138: _graphql_req_138 = Obj.magic(0);
+ type nonrec _graphql_argRequired_125;
+ /**Argument **argRequired** on field **customScalarField** has the following graphql type:
+
+```
+CustomScalar!
+```*/
+ let _graphql_argRequired_125: _graphql_argRequired_125 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/customTypes.js b/tests_bucklescript/static_snapshots/records/operations/customTypes.js
new file mode 100644
index 00000000..ba2b10a4
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/customTypes.js
@@ -0,0 +1,126 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Js_json = require("bs-platform/lib/js/js_json.js");
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+function parse(json) {
+ var match = Js_json.decodeString(json);
+ if (match === undefined) {
+ return /* Red */0;
+ }
+ switch (match) {
+ case "blue" :
+ return /* Blue */2;
+ case "green" :
+ return /* Green */1;
+ case "red" :
+ return /* Red */0;
+ default:
+ return /* Red */0;
+ }
+}
+
+function serialize(color) {
+ switch (color) {
+ case /* Red */0 :
+ return "red";
+ case /* Green */1 :
+ return "green";
+ case /* Blue */2 :
+ return "blue";
+
+ }
+}
+
+var Color = {
+ parse: parse,
+ serialize: serialize
+};
+
+function parse$1(json) {
+ var str = Js_json.decodeString(json);
+ if (str !== undefined) {
+ return new Date(str);
+ } else {
+ return new Date();
+ }
+}
+
+function serialize$1(date) {
+ return date.toISOString();
+}
+
+var DateTime = {
+ parse: parse$1,
+ serialize: serialize$1
+};
+
+var Raw = { };
+
+function parse$2(value) {
+ var value$1 = value.customFields;
+ var value$2 = value$1.futureTime;
+ var value$3 = value$1.nullableColor;
+ return {
+ customFields: {
+ currentTime: parse$1(value$1.currentTime),
+ favoriteColor: parse(value$1.favoriteColor),
+ futureTime: !(value$2 == null) ? Caml_option.some(parse$1(value$2)) : undefined,
+ nullableColor: !(value$3 == null) ? parse(value$3) : undefined
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.customFields;
+ var value$2 = value$1.nullableColor;
+ var nullableColor = value$2 !== undefined ? serialize(value$2) : null;
+ var value$3 = value$1.futureTime;
+ var futureTime = value$3 !== undefined ? Caml_option.valFromOption(value$3).toISOString() : null;
+ var value$4 = value$1.favoriteColor;
+ var favoriteColor = serialize(value$4);
+ var value$5 = value$1.currentTime;
+ var currentTime = value$5.toISOString();
+ var customFields = {
+ currentTime: currentTime,
+ favoriteColor: favoriteColor,
+ futureTime: futureTime,
+ nullableColor: nullableColor
+ };
+ return {
+ customFields: customFields
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\ncustomFields {\ncurrentTime \nfavoriteColor \nfutureTime \nnullableColor \n}\n\n}\n",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.Color = Color;
+exports.DateTime = DateTime;
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/customTypes.re b/tests_bucklescript/static_snapshots/records/operations/customTypes.re
new file mode 100644
index 00000000..02bde758
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/customTypes.re
@@ -0,0 +1,188 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Color = {
+ type t =
+ | Red
+ | Green
+ | Blue;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some("green") => Green
+ | Some("blue") => Blue
+ | Some("red")
+ | Some(_)
+ | None => Red
+ };
+ let serialize = color =>
+ (
+ switch (color) {
+ | Red => "red"
+ | Green => "green"
+ | Blue => "blue"
+ }
+ )
+ |> Js.Json.string;
+};
+module DateTime = {
+ type t = Js.Date.t;
+ let parse = json =>
+ switch (json |> Js.Json.decodeString) {
+ | Some(str) => str |> Js.Date.fromString
+ | None => Js.Date.make()
+ };
+ let serialize = date => date |> Js.Date.toISOString |> Js.Json.string;
+};
+module MyQuery = {
+ module Raw = {
+ type t_customFields = {
+ currentTime: Js.Json.t,
+ favoriteColor: Js.Json.t,
+ futureTime: Js.Nullable.t(Js.Json.t),
+ nullableColor: Js.Nullable.t(Js.Json.t),
+ };
+ type t = {customFields: t_customFields};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ncustomFields {\ncurrentTime \nfavoriteColor \nfutureTime \nnullableColor \n}\n\n}\n";
+ type t_customFields = {
+ currentTime: DateTime.t,
+ favoriteColor: Color.t,
+ futureTime: option(DateTime.t),
+ nullableColor: option(Color.t),
+ };
+ type t = {customFields: t_customFields};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ customFields: {
+ let value = (value: Raw.t).customFields;
+ (
+ {
+ currentTime: {
+ let value = (value: Raw.t_customFields).currentTime;
+ DateTime.parse(value);
+ },
+ favoriteColor: {
+ let value = (value: Raw.t_customFields).favoriteColor;
+ Color.parse(value);
+ },
+ futureTime: {
+ let value = (value: Raw.t_customFields).futureTime;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(DateTime.parse(value))
+ | None => None
+ };
+ },
+ nullableColor: {
+ let value = (value: Raw.t_customFields).nullableColor;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(Color.parse(value))
+ | None => None
+ };
+ },
+ }: t_customFields
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let customFields = {
+ let value = (value: t).customFields;
+ (
+ {
+ let nullableColor = {
+ let value = (value: t_customFields).nullableColor;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(Color.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and futureTime = {
+ let value = (value: t_customFields).futureTime;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(DateTime.serialize(value))
+ | None => Js.Nullable.null
+ };
+ }
+ and favoriteColor = {
+ let value = (value: t_customFields).favoriteColor;
+ Color.serialize(value);
+ }
+ and currentTime = {
+ let value = (value: t_customFields).currentTime;
+ DateTime.serialize(value);
+ };
+ {currentTime, favoriteColor, futureTime, nullableColor};
+ }: Raw.t_customFields
+ );
+ };
+ {customFields: customFields};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/defaultObjectValueOnScalar.js b/tests_bucklescript/static_snapshots/records/operations/defaultObjectValueOnScalar.js
new file mode 100644
index 00000000..88b5f331
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/defaultObjectValueOnScalar.js
@@ -0,0 +1,50 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ defaultObjectValueOnScalar: value.defaultObjectValueOnScalar
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.defaultObjectValueOnScalar;
+ return {
+ defaultObjectValueOnScalar: value$1
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ _graphql_filter_92: 0,
+ _graphql_arg_140: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\ndefaultObjectValueOnScalar(filter: {some: {json: \"value\"}}, arg: {field: \"otherValue\"}) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/defaultObjectValueOnScalar.re b/tests_bucklescript/static_snapshots/records/operations/defaultObjectValueOnScalar.re
new file mode 100644
index 00000000..27bf4062
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/defaultObjectValueOnScalar.re
@@ -0,0 +1,109 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {defaultObjectValueOnScalar: string};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndefaultObjectValueOnScalar(filter: {some: {json: \"value\"}}, arg: {field: \"otherValue\"}) \n}\n";
+ type t = {defaultObjectValueOnScalar: string};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ defaultObjectValueOnScalar: {
+ let value = (value: Raw.t).defaultObjectValueOnScalar;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let defaultObjectValueOnScalar = {
+ let value = (value: t).defaultObjectValueOnScalar;
+ value;
+ };
+ {defaultObjectValueOnScalar: defaultObjectValueOnScalar};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_filter_92;
+ /**Argument **filter** on field **defaultObjectValueOnScalar** has the following graphql type:
+
+```
+JsonScalar!
+```*/
+ let _graphql_filter_92: _graphql_filter_92 = Obj.magic(0);
+ type nonrec _graphql_arg_140;
+ /**Argument **arg** on field **defaultObjectValueOnScalar** has the following graphql type:
+
+```
+EmbeddedInput {
+ field: String
+}!
+```*/
+ let _graphql_arg_140: _graphql_arg_140 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/enumInput.js b/tests_bucklescript/static_snapshots/records/operations/enumInput.js
new file mode 100644
index 00000000..f91c51da
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/enumInput.js
@@ -0,0 +1,53 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ enumInput: value.enumInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.enumInput;
+ return {
+ enumInput: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.arg;
+ return {
+ arg: a !== 225952583 ? (
+ a >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ };
+}
+
+function makeVariables(arg, param) {
+ return serializeVariables({
+ arg: arg
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_82: 0,
+ _graphql_arg_77: 0,
+ _graphql_SampleField_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: SampleField!) {\nenumInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/enumInput.re b/tests_bucklescript/static_snapshots/records/operations/enumInput.re
new file mode 100644
index 00000000..b1a57902
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/enumInput.re
@@ -0,0 +1,137 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {enumInput: string};
+ type t_variables = {arg: string};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: SampleField!) {\nenumInput(arg: $arg) \n}\n";
+ type t = {enumInput: string};
+ type t_variables = {arg: [ | `FIRST | `SECOND | `THIRD]};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ enumInput: {
+ let value = (value: Raw.t).enumInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let enumInput = {
+ let value = (value: t).enumInput;
+ value;
+ };
+ {enumInput: enumInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ (inp: t_variables).arg,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_82;
+ /**Variable **$arg** has the following graphql type:
+
+```
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}!
+```*/
+ let _graphql_arg_82: _graphql_arg_82 = Obj.magic(0);
+ type nonrec _graphql_arg_77;
+ /**Argument **arg** on field **enumInput** has the following graphql type:
+
+```
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}!
+```*/
+ let _graphql_arg_77: _graphql_arg_77 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_SampleField_47;
+ /**```
+SampleField {
+ FIRST
+ SECOND
+ THIRD
+}
+```*/
+ let _graphql_SampleField_47: _graphql_SampleField_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/explicit_object_record.js b/tests_bucklescript/static_snapshots/records/operations/explicit_object_record.js
new file mode 100644
index 00000000..51390845
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/explicit_object_record.js
@@ -0,0 +1,202 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nullableOfNullable;
+ var value$3 = value$1.nullableOfNonNullable;
+ var value$4 = value$1.nonNullableOfNullable;
+ var value$5 = value$1.nonNullableOfNonNullable;
+ return {
+ lists: {
+ nullableOfNullable: !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$3 == null) ? value$3.map((function (value) {
+ return value;
+ })) : undefined,
+ nonNullableOfNullable: value$4.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })),
+ nonNullableOfNonNullable: value$5.map((function (value) {
+ return value;
+ }))
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ var lists = {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var RecordsQuery = {
+ Raw: Raw,
+ query: "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = !(value$4 == null) ? value$4.map((function (value) {
+ return value;
+ })) : undefined;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ lists: {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ }
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ObjectsQuery = {
+ Raw: Raw$1,
+ query: "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.RecordsQuery = RecordsQuery;
+exports.ObjectsQuery = ObjectsQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/explicit_object_record.re b/tests_bucklescript/static_snapshots/records/operations/explicit_object_record.re
new file mode 100644
index 00000000..4d329ead
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/explicit_object_record.re
@@ -0,0 +1,363 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module RecordsQuery = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 RecordsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ObjectsQuery = {
+ module Raw = {
+ type t_lists = {
+ .
+ "nullableOfNullable": Js.Nullable.t(array(Js.Nullable.t(string))),
+ "nullableOfNonNullable": Js.Nullable.t(array(string)),
+ "nonNullableOfNullable": array(Js.Nullable.t(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ .
+ "nullableOfNullable": option(array(option(string))),
+ "nullableOfNonNullable": option(array(string)),
+ "nonNullableOfNullable": array(option(string)),
+ "nonNullableOfNonNullable": array(string),
+ };
+ type t = {. "lists": t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let lists = {
+ let value = value##lists;
+ let nonNullableOfNonNullable = {
+ let value = value##nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = value##nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = value##nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = value##nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ "nullableOfNullable": nullableOfNullable,
+ "nullableOfNonNullable": nullableOfNonNullable,
+ "nonNullableOfNullable": nonNullableOfNullable,
+ "nonNullableOfNonNullable": nonNullableOfNonNullable,
+ };
+ };
+ {"lists": lists};
+ };
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ObjectsQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/extensions.js b/tests_bucklescript/static_snapshots/records/operations/extensions.js
new file mode 100644
index 00000000..e29e3ff7
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/extensions.js
@@ -0,0 +1,135 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+function ExtendQuery(M) {
+ var use = function (param) {
+
+ };
+ return {
+ use: use
+ };
+}
+
+var Parent = {
+ ExtendQuery: ExtendQuery
+};
+
+var Raw = { };
+
+var query = "query Bla {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nullableOfNullable;
+ var value$3 = value$1.nullableOfNonNullable;
+ var value$4 = value$1.nonNullableOfNullable;
+ var value$5 = value$1.nonNullableOfNonNullable;
+ return {
+ lists: {
+ nullableOfNullable: !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$3 == null) ? value$3.map((function (value) {
+ return value;
+ })) : undefined,
+ nonNullableOfNullable: value$4.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })),
+ nonNullableOfNonNullable: value$5.map((function (value) {
+ return value;
+ }))
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ var lists = {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Bla$prime = {
+ Raw: Raw,
+ query: query,
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+function use(param) {
+
+}
+
+var Bla = {
+ Raw: Raw,
+ query: query,
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL,
+ use: use
+};
+
+exports.Parent = Parent;
+exports.Bla$prime = Bla$prime;
+exports.Bla = Bla;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/extensions.re b/tests_bucklescript/static_snapshots/records/operations/extensions.re
new file mode 100644
index 00000000..6986c036
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/extensions.re
@@ -0,0 +1,214 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module type GraphQLQuery = {
+ module Raw: {
+ type t;
+ type t_variables;
+ };
+ type t;
+ type t_variables;
+
+ let query: string;
+ let parse: Raw.t => t;
+ let serialize: t => Raw.t;
+};
+
+module Parent = {
+ module ExtendQuery = (M: GraphQLQuery) => {
+ let use = () => ();
+ };
+};
+module Bla' = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query Bla {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Bla = {
+ include Bla';
+ include Parent.ExtendQuery(Bla');
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/fragmentDefinition.js b/tests_bucklescript/static_snapshots/records/operations/fragmentDefinition.js
new file mode 100644
index 00000000..d443288d
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/fragmentDefinition.js
@@ -0,0 +1,389 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+function deepMerge(json1, param) {
+ return json1;
+}
+
+var GraphQL_PPX = {
+ deepMerge: deepMerge
+};
+
+var query = "fragment ListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.nullableOfNullable;
+ var value$2 = value.nullableOfNonNullable;
+ return {
+ nullableOfNullable: !(value$1 == null) ? value$1.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$2 == null) ? value$2.map((function (value) {
+ return value;
+ })) : undefined
+ };
+}
+
+var verifyArgsAndParse = parse;
+
+function serialize(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = value$2 !== undefined ? value$2.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var name = "ListFragment";
+
+var Z__INTERNAL = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var ListFragment = {
+ query: query,
+ Raw: Raw,
+ parse: parse,
+ verifyArgsAndParse: verifyArgsAndParse,
+ serialize: serialize,
+ name: name,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.nullableOfNonNullable;
+ return {
+ nullableOfNonNullable: !(value$1 == null) ? value$1.map((function (value) {
+ return value;
+ })) : undefined
+ };
+}
+
+var verifyArgsAndParse$1 = parse$1;
+
+function serialize$1(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ return {
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var Z__INTERNAL$1 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var Another = {
+ query: "fragment Another on Lists {\nnullableOfNonNullable \n}\n",
+ Raw: Raw$1,
+ parse: parse$1,
+ verifyArgsAndParse: verifyArgsAndParse$1,
+ serialize: serialize$1,
+ name: "Another",
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var query$1 = "fragment FragmentWithArgs on Lists {\nlistWithArg(arg1: $arg1) \n}\n";
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.listWithArg;
+ return {
+ listWithArg: !(value$1 == null) ? value$1.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined
+ };
+}
+
+function verifyArgsAndParse$2(_arg1, value) {
+ return parse$2(value);
+}
+
+function serialize$2(value) {
+ var value$1 = value.listWithArg;
+ var listWithArg = value$1 !== undefined ? value$1.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ listWithArg: listWithArg
+ };
+}
+
+var name$1 = "FragmentWithArgs";
+
+var Z__INTERNAL$2 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var FragmentWithArgs = {
+ query: query$1,
+ Raw: Raw$2,
+ parse: parse$2,
+ verifyArgsAndParse: verifyArgsAndParse$2,
+ serialize: serialize$2,
+ name: name$1,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var query$2 = "fragment InlineListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+
+var Raw$3 = { };
+
+function parse$3(value) {
+ var value$1 = value.nullableOfNullable;
+ var value$2 = value.nullableOfNonNullable;
+ return {
+ nullableOfNullable: !(value$1 == null) ? value$1.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$2 == null) ? value$2.map((function (value) {
+ return value;
+ })) : undefined
+ };
+}
+
+var verifyArgsAndParse$3 = parse$3;
+
+function serialize$3(value) {
+ var value$1 = value.nullableOfNonNullable;
+ var nullableOfNonNullable = value$1 !== undefined ? value$1.map((function (value) {
+ return value;
+ })) : null;
+ var value$2 = value.nullableOfNullable;
+ var nullableOfNullable = value$2 !== undefined ? value$2.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable
+ };
+}
+
+var name$2 = "InlineListFragment";
+
+var Z__INTERNAL$3 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var InlineFragment = {
+ query: query$2,
+ Raw: Raw$3,
+ parse: parse$3,
+ verifyArgsAndParse: verifyArgsAndParse$3,
+ serialize: serialize$3,
+ name: name$2,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+var Raw$4 = { };
+
+var query$3 = "query MyQuery($arg1: String) {\nl1: lists {\n...ListFragment \n}\n\nl2: lists {\n...ListFragment \n...ListFragment \n}\n\nl3: lists {\nnullableOfNullable \n...ListFragment \n...ListFragment \n}\n\nl4: lists {\nnullableOfNullable \n...InlineListFragment \n}\n\nl5: lists {\n...FragmentWithArgs \n}\n\n}\nfragment FragmentWithArgs on Lists {\nlistWithArg(arg1: $arg1) \n}\nfragment InlineListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\nfragment ListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+
+function parse$4(value) {
+ var value$1 = value.l2;
+ var value$2 = value.l3;
+ var value$3 = value$2["nullableOfNullable"];
+ var value$4 = value.l4;
+ var value$5 = value$4["nullableOfNullable"];
+ return {
+ l1: parse(value.l1),
+ l2: {
+ frag1: parse(value$1),
+ frag2: parse(value$1)
+ },
+ l3: {
+ nullableOfNullable: !(value$3 == null) ? value$3.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ frag1: parse(value$2),
+ frag2: parse(value$2)
+ },
+ l4: {
+ nullableOfNullable: !(value$5 == null) ? value$5.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ inlineFragment: parse$3(value$4)
+ },
+ l5: parse$2(value.l5)
+ };
+}
+
+function serialize$4(value) {
+ var value$1 = value.l5;
+ var l5 = serialize$2(value$1);
+ var value$2 = value.l4;
+ var value$3 = value$2.nullableOfNullable;
+ var l4 = [serialize$3(value$2.inlineFragment)].reduce(deepMerge, {
+ nullableOfNullable: value$3 !== undefined ? value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ });
+ var value$4 = value.l3;
+ var value$5 = value$4.nullableOfNullable;
+ var l3 = [
+ serialize(value$4.frag1),
+ serialize(value$4.frag2)
+ ].reduce(deepMerge, {
+ nullableOfNullable: value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null
+ });
+ var value$6 = value.l2;
+ var l2 = [
+ serialize(value$6.frag1),
+ serialize(value$6.frag2)
+ ].reduce(deepMerge, (function (prim) {
+ return { };
+ }));
+ var value$7 = value.l1;
+ var l1 = serialize(value$7);
+ return {
+ l1: l1,
+ l2: l2,
+ l3: l3,
+ l4: l4,
+ l5: l5
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.arg1;
+ return {
+ arg1: a !== undefined ? a : undefined
+ };
+}
+
+function makeVariables(arg1, param) {
+ return serializeVariables({
+ arg1: arg1
+ });
+}
+
+function makeDefaultVariables(param) {
+ return serializeVariables({
+ arg1: undefined
+ });
+}
+
+var Z__INTERNAL$4 = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw$4,
+ query: query$3,
+ parse: parse$4,
+ serialize: serialize$4,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL$4
+};
+
+var Raw$5 = { };
+
+var query$4 = "query {\nlists {\n...ListFragment \n}\n\n}\nfragment ListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+
+function parse$5(value) {
+ return {
+ lists: parse(value.lists)
+ };
+}
+
+function serialize$5(value) {
+ var value$1 = value.lists;
+ var lists = serialize(value$1);
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$5 = {
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$5,
+ query: query$4,
+ parse: parse$5,
+ serialize: serialize$5,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$5
+};
+
+exports.GraphQL_PPX = GraphQL_PPX;
+exports.ListFragment = ListFragment;
+exports.Another = Another;
+exports.FragmentWithArgs = FragmentWithArgs;
+exports.InlineFragment = InlineFragment;
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/fragmentDefinition.re b/tests_bucklescript/static_snapshots/records/operations/fragmentDefinition.re
new file mode 100644
index 00000000..a4f0ee71
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/fragmentDefinition.re
@@ -0,0 +1,906 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module GraphQL_PPX = {
+ let deepMerge = (json1, _) => json1;
+};
+module ListFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment ListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableOfNullable, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = "ListFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module Another = {
+ /**The GraphQL query string*/
+ let query = "fragment Another on Lists {\nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {nullableOfNonNullable: Js.Nullable.t(array(string))};
+ type nonrec t_Lists = t;
+ };
+ type t = {nullableOfNonNullable: option(array(string))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableOfNonNullable: nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = "Another";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module FragmentWithArgs = {
+ /**The GraphQL query string*/
+ let query = "fragment FragmentWithArgs on Lists {\nlistWithArg(arg1: $arg1) \n}\n";
+ module Raw = {
+ type t = {listWithArg: Js.Nullable.t(array(Js.Nullable.t(string)))};
+ type nonrec t_Lists = t;
+ };
+ type t = {listWithArg: option(array(option(string)))};
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listWithArg: {
+ let value = (value: Raw.t).listWithArg;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (~arg1 as _arg1: [ | `String], value: Raw.t) =>
+ parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listWithArg = {
+ let value = (value: t).listWithArg;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {listWithArg: listWithArg};
+ }: Raw.t
+ );
+ let name = "FragmentWithArgs";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+
+module InlineFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment InlineListFragment on Lists {\nnullableOfNullable \nnullableOfNonNullable \n}\n";
+ module Raw = {
+ type t = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ };
+ type nonrec t_Lists = t;
+ };
+ type t = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ };
+ type nonrec t_Lists = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nullableOfNonNullable = {
+ let value = (value: t).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableOfNullable, nullableOfNonNullable};
+ }: Raw.t
+ );
+ let name = "InlineListFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Lists {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+ listWithArg: [String]
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery = {
+ module Raw = {
+ type t_l2;
+ type t_l3;
+ type t_l4;
+ type t = {
+ l1: ListFragment.Raw.t,
+ l2: t_l2,
+ l3: t_l3,
+ l4: t_l4,
+ l5: FragmentWithArgs.Raw.t,
+ };
+ type t_variables = {arg1: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ "query MyQuery($arg1: String) {\nl1: lists {\n..."
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl2: lists {\n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl3: lists {\nnullableOfNullable \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n..."
+ )
+ ++ ListFragment.name
+ )
+ ++ " \n}\n\nl4: lists {\nnullableOfNullable \n..."
+ )
+ ++ InlineFragment.name
+ )
+ ++ " \n}\n\nl5: lists {\n..."
+ )
+ ++ FragmentWithArgs.name
+ )
+ ++ " \n}\n\n}\n"
+ )
+ ++ FragmentWithArgs.query
+ )
+ ++ InlineFragment.query
+ )
+ ++ ListFragment.query;
+ type t_l2 = {
+ frag1: ListFragment.t_Lists,
+ frag2: ListFragment.t_Lists,
+ };
+ type t_l3 = {
+ nullableOfNullable: option(array(option(string))),
+ frag1: ListFragment.t_Lists,
+ frag2: ListFragment.t_Lists,
+ };
+ type t_l4 = {
+ nullableOfNullable: option(array(option(string))),
+ inlineFragment: InlineFragment.t_Lists,
+ };
+ type t = {
+ l1: ListFragment.t,
+ l2: t_l2,
+ l3: t_l3,
+ l4: t_l4,
+ l5: FragmentWithArgs.t,
+ };
+ type t_variables = {arg1: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ l1: {
+ let value = (value: Raw.t).l1;
+ ListFragment.verifyArgsAndParse(value);
+ },
+ l2: {
+ let value = (value: Raw.t).l2;
+ (
+ {
+ frag1: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ frag2: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t_l2
+ );
+ },
+ l3: {
+ let value = (value: Raw.t).l3;
+ (
+ {
+ nullableOfNullable: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "nullableOfNullable"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ frag1: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ frag2: {
+ let value: ListFragment.Raw.t = Obj.magic(value);
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t_l3
+ );
+ },
+ l4: {
+ let value = (value: Raw.t).l4;
+ (
+ {
+ nullableOfNullable: {
+ let value =
+ Obj.magic(
+ Js.Dict.unsafeGet(Obj.magic(value), "nullableOfNullable"),
+ );
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ inlineFragment: {
+ let value: InlineFragment.Raw.t = Obj.magic(value);
+ InlineFragment.verifyArgsAndParse(value);
+ },
+ }: t_l4
+ );
+ },
+ l5: {
+ let value = (value: Raw.t).l5;
+ FragmentWithArgs.verifyArgsAndParse(~arg1=`String, value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let l5 = {
+ let value = (value: t).l5;
+ FragmentWithArgs.serialize(value);
+ }
+ and l4 = {
+ let value = (value: t).l4;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = (value: t_l4).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableOfNullable": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(
+ InlineFragment.serialize((value: t_l4).inlineFragment),
+ ): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l4
+ );
+ }
+ and l3 = {
+ let value = (value: t).l3;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(
+ {
+ let nullableOfNullable = {
+ let value = (value: t_l3).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {"nullableOfNullable": nullableOfNullable};
+ },
+ ): Js.Json.t,
+ [|
+ (
+ Obj.magic(ListFragment.serialize((value: t_l3).frag1)): Js.Json.t
+ ),
+ (
+ Obj.magic(ListFragment.serialize((value: t_l3).frag2)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l3
+ );
+ }
+ and l2 = {
+ let value = (value: t).l2;
+ (
+ Obj.magic(
+ Js.Array.reduce(
+ GraphQL_PPX.deepMerge,
+ Obj.magic(Js.Dict.empty): Js.Json.t,
+ [|
+ (
+ Obj.magic(ListFragment.serialize((value: t_l2).frag1)): Js.Json.t
+ ),
+ (
+ Obj.magic(ListFragment.serialize((value: t_l2).frag2)): Js.Json.t
+ ),
+ |],
+ ),
+ ): Raw.t_l2
+ );
+ }
+ and l1 = {
+ let value = (value: t).l1;
+ ListFragment.serialize(value);
+ };
+ {l1, l2, l3, l4, l5};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg1:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).arg1,
+ ),
+ };
+ let makeVariables = (~arg1=?, ()) =>
+ serializeVariables({arg1: arg1}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 GraphQL {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {lists: ListFragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (("query {\nlists {\n..." ++ ListFragment.name) ++ " \n}\n\n}\n")
+ ++ ListFragment.query;
+ type t = {lists: ListFragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ ListFragment.verifyArgsAndParse(value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ ListFragment.serialize(value);
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/interface.js b/tests_bucklescript/static_snapshots/records/operations/interface.js
new file mode 100644
index 00000000..40fed0f7
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/interface.js
@@ -0,0 +1,2 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
diff --git a/tests_bucklescript/static_snapshots/records/operations/interface.re b/tests_bucklescript/static_snapshots/records/operations/interface.re
new file mode 100644
index 00000000..f23f4bb6
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/interface.re
@@ -0,0 +1,18 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
diff --git a/tests_bucklescript/static_snapshots/records/operations/lists.js b/tests_bucklescript/static_snapshots/records/operations/lists.js
new file mode 100644
index 00000000..365da3da
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/lists.js
@@ -0,0 +1,102 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nullableOfNullable;
+ var value$3 = value$1.nullableOfNonNullable;
+ var value$4 = value$1.nonNullableOfNullable;
+ var value$5 = value$1.nonNullableOfNonNullable;
+ return {
+ lists: {
+ nullableOfNullable: !(value$2 == null) ? value$2.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })) : undefined,
+ nullableOfNonNullable: !(value$3 == null) ? value$3.map((function (value) {
+ return value;
+ })) : undefined,
+ nonNullableOfNullable: value$4.map((function (value) {
+ if (!(value == null)) {
+ return value;
+ }
+
+ })),
+ nonNullableOfNonNullable: value$5.map((function (value) {
+ return value;
+ }))
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.lists;
+ var value$2 = value$1.nonNullableOfNonNullable;
+ var nonNullableOfNonNullable = value$2.map((function (value) {
+ return value;
+ }));
+ var value$3 = value$1.nonNullableOfNullable;
+ var nonNullableOfNullable = value$3.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ }));
+ var value$4 = value$1.nullableOfNonNullable;
+ var nullableOfNonNullable = value$4 !== undefined ? value$4.map((function (value) {
+ return value;
+ })) : null;
+ var value$5 = value$1.nullableOfNullable;
+ var nullableOfNullable = value$5 !== undefined ? value$5.map((function (value) {
+ if (value !== undefined) {
+ return value;
+ } else {
+ return null;
+ }
+ })) : null;
+ var lists = {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+ return {
+ lists: lists
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/lists.re b/tests_bucklescript/static_snapshots/records/operations/lists.re
new file mode 100644
index 00000000..c9f01d17
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/lists.re
@@ -0,0 +1,192 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_lists = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nlists {\nnullableOfNullable \nnullableOfNonNullable \nnonNullableOfNullable \nnonNullableOfNonNullable \n}\n\n}\n";
+ type t_lists = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ type t = {lists: t_lists};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ lists: {
+ let value = (value: Raw.t).lists;
+ (
+ {
+ nullableOfNullable: {
+ let value = (value: Raw.t_lists).nullableOfNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ ),
+ )
+ | None => None
+ };
+ },
+ nullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nullableOfNonNullable;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value |> Js.Array.map(value => value))
+ | None => None
+ };
+ },
+ nonNullableOfNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ }
+ );
+ },
+ nonNullableOfNonNullable: {
+ let value = (value: Raw.t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ },
+ }: t_lists
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let lists = {
+ let value = (value: t).lists;
+ (
+ {
+ let nonNullableOfNonNullable = {
+ let value = (value: t_lists).nonNullableOfNonNullable;
+ value |> Js.Array.map(value => value);
+ }
+ and nonNullableOfNullable = {
+ let value = (value: t_lists).nonNullableOfNullable;
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ );
+ }
+ and nullableOfNonNullable = {
+ let value = (value: t_lists).nullableOfNonNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(value |> Js.Array.map(value => value))
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableOfNullable = {
+ let value = (value: t_lists).nullableOfNullable;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map(value =>
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ }
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ }: Raw.t_lists
+ );
+ };
+ {lists: lists};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/listsArgs.js b/tests_bucklescript/static_snapshots/records/operations/listsArgs.js
new file mode 100644
index 00000000..f91934dc
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/listsArgs.js
@@ -0,0 +1,73 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require("bs-platform/lib/js/array.js");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.listsInput;
+ return {
+ listsInput: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.nullableOfNullable;
+ var a$1 = inp.nullableOfNonNullable;
+ var a$2 = inp.nonNullableOfNullable;
+ var a$3 = inp.nonNullableOfNonNullable;
+ return {
+ nullableOfNullable: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ nullableOfNonNullable: a$1 !== undefined ? $$Array.map((function (b) {
+ return b;
+ }), a$1) : undefined,
+ nonNullableOfNullable: $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a$2),
+ nonNullableOfNonNullable: $$Array.map((function (b) {
+ return b;
+ }), a$3)
+ };
+}
+
+function makeVariables(nullableOfNullable, nullableOfNonNullable, nonNullableOfNullable, nonNullableOfNonNullable, param) {
+ return serializeVariables({
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_219: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/listsArgs.re b/tests_bucklescript/static_snapshots/records/operations/listsArgs.re
new file mode 100644
index 00000000..8a9a61b1
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/listsArgs.re
@@ -0,0 +1,195 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {listsInput: string};
+ type t_variables = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($nullableOfNullable: [String], $nullableOfNonNullable: [String!], $nonNullableOfNullable: [String]!, $nonNullableOfNonNullable: [String!]!) {\nlistsInput(arg: {nullableOfNullable: $nullableOfNullable, nullableOfNonNullable: $nullableOfNonNullable, nonNullableOfNullable: $nonNullableOfNullable, nonNullableOfNonNullable: $nonNullableOfNonNullable}) \n}\n";
+ type t = {listsInput: string};
+ type t_variables = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listsInput: {
+ let value = (value: Raw.t).listsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listsInput = {
+ let value = (value: t).listsInput;
+ value;
+ };
+ {listsInput: listsInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ nullableOfNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables).nullableOfNullable,
+ ),
+ nullableOfNonNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ (inp: t_variables).nullableOfNonNullable,
+ ),
+ nonNullableOfNullable:
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ (inp: t_variables).nonNullableOfNullable,
+ ),
+ nonNullableOfNonNullable:
+ (a => Array.map(b => (a => a)(b), a))(
+ (inp: t_variables).nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_219;
+ /**Argument **arg** on field **listsInput** has the following graphql type:
+
+```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+```*/
+ let _graphql_arg_219: _graphql_arg_219 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/listsInput.js b/tests_bucklescript/static_snapshots/records/operations/listsInput.js
new file mode 100644
index 00000000..e72742d1
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/listsInput.js
@@ -0,0 +1,89 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require("bs-platform/lib/js/array.js");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ listsInput: value.listsInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.listsInput;
+ return {
+ listsInput: value$1
+ };
+}
+
+function serializeInputObjectListsInput(inp) {
+ var a = inp.nullableOfNullable;
+ var a$1 = inp.nullableOfNonNullable;
+ var a$2 = inp.nonNullableOfNullable;
+ var a$3 = inp.nonNullableOfNonNullable;
+ return {
+ nullableOfNullable: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ nullableOfNonNullable: a$1 !== undefined ? $$Array.map((function (b) {
+ return b;
+ }), a$1) : undefined,
+ nonNullableOfNullable: $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a$2),
+ nonNullableOfNonNullable: $$Array.map((function (b) {
+ return b;
+ }), a$3)
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectListsInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectListsInput(arg)
+ };
+}
+
+function makeInputObjectListsInput(nullableOfNullable, nullableOfNonNullable, nonNullableOfNullable, nonNullableOfNonNullable, param) {
+ return {
+ nullableOfNullable: nullableOfNullable,
+ nullableOfNonNullable: nullableOfNonNullable,
+ nonNullableOfNullable: nonNullableOfNullable,
+ nonNullableOfNonNullable: nonNullableOfNonNullable
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_82: 0,
+ _graphql_arg_77: 0,
+ _graphql_ListsInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: ListsInput!) {\nlistsInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectListsInput: serializeInputObjectListsInput,
+ makeVariables: makeVariables,
+ makeInputObjectListsInput: makeInputObjectListsInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/listsInput.re b/tests_bucklescript/static_snapshots/records/operations/listsInput.re
new file mode 100644
index 00000000..b8d25189
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/listsInput.re
@@ -0,0 +1,224 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {listsInput: string};
+ type t_variables = {arg: t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ nullableOfNullable: Js.Nullable.t(array(Js.Nullable.t(string))),
+ nullableOfNonNullable: Js.Nullable.t(array(string)),
+ nonNullableOfNullable: array(Js.Nullable.t(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: ListsInput!) {\nlistsInput(arg: $arg) \n}\n";
+ type t = {listsInput: string};
+ type t_variables = {arg: t_variables_ListsInput}
+ and t_variables_ListsInput = {
+ nullableOfNullable: option(array(option(string))),
+ nullableOfNonNullable: option(array(string)),
+ nonNullableOfNullable: array(option(string)),
+ nonNullableOfNonNullable: array(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ listsInput: {
+ let value = (value: Raw.t).listsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let listsInput = {
+ let value = (value: t).listsInput;
+ value;
+ };
+ {listsInput: listsInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg: (a => serializeInputObjectListsInput(a))((inp: t_variables).arg),
+ }
+ and serializeInputObjectListsInput:
+ t_variables_ListsInput => Raw.t_variables_ListsInput =
+ inp => {
+ nullableOfNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_ListsInput).nullableOfNullable,
+ ),
+ nullableOfNonNullable:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return((a => Array.map(b => (a => a)(b), a))(b))
+ }
+ )(
+ (inp: t_variables_ListsInput).nullableOfNonNullable,
+ ),
+ nonNullableOfNullable:
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ (inp: t_variables_ListsInput).nonNullableOfNullable,
+ ),
+ nonNullableOfNonNullable:
+ (a => Array.map(b => (a => a)(b), a))(
+ (inp: t_variables_ListsInput).nonNullableOfNonNullable,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectListsInput =
+ (
+ ~nullableOfNullable=?,
+ ~nullableOfNonNullable=?,
+ ~nonNullableOfNullable,
+ ~nonNullableOfNonNullable,
+ (),
+ )
+ : t_variables_ListsInput => {
+ nullableOfNullable,
+ nullableOfNonNullable,
+ nonNullableOfNullable,
+ nonNullableOfNonNullable,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_82;
+ /**Variable **$arg** has the following graphql type:
+
+```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+```*/
+ let _graphql_arg_82: _graphql_arg_82 = Obj.magic(0);
+ type nonrec _graphql_arg_77;
+ /**Argument **arg** on field **listsInput** has the following graphql type:
+
+```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}!
+```*/
+ let _graphql_arg_77: _graphql_arg_77 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_ListsInput_47;
+ /**```
+ListsInput {
+ nullableOfNullable: [String]
+ nullableOfNonNullable: [String!]
+ nonNullableOfNullable: [String]!
+ nonNullableOfNonNullable: [String!]!
+}
+```*/
+ let _graphql_ListsInput_47: _graphql_ListsInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/mutation.js b/tests_bucklescript/static_snapshots/records/operations/mutation.js
new file mode 100644
index 00000000..929edebb
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/mutation.js
@@ -0,0 +1,107 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.value;
+ var value$3 = value$1.errors;
+ return {
+ mutationWithError: {
+ value: !(value$2 == null) ? ({
+ stringField: value$2.stringField
+ }) : undefined,
+ errors: !(value$3 == null) ? value$3.map((function (value) {
+ var value$1 = value.field;
+ var tmp;
+ switch (value$1) {
+ case "FIRST" :
+ tmp = /* FIRST */-24399856;
+ break;
+ case "SECOND" :
+ tmp = /* SECOND */382368628;
+ break;
+ case "THIRD" :
+ tmp = /* THIRD */225952583;
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ field: tmp,
+ message: value.message
+ };
+ })) : undefined
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.message;
+ var value$2 = value.field;
+ var field = typeof value$2 === "number" ? (
+ value$2 !== 225952583 ? (
+ value$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : value$2[1];
+ return {
+ field: field,
+ message: value$1
+ };
+ })) : null;
+ var value$3 = value$1.value;
+ var value$4;
+ if (value$3 !== undefined) {
+ var value$5 = value$3.stringField;
+ value$4 = {
+ stringField: value$5
+ };
+ } else {
+ value$4 = null;
+ }
+ var mutationWithError = {
+ value: value$4,
+ errors: errors
+ };
+ return {
+ mutationWithError: mutationWithError
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "mutation {\nmutationWithError {\nvalue {\nstringField \n}\n\nerrors {\nfield \nmessage \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/mutation.re b/tests_bucklescript/static_snapshots/records/operations/mutation.re
new file mode 100644
index 00000000..a543cfee
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/mutation.re
@@ -0,0 +1,221 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationWithError_value = {stringField: string};
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ field: t_mutationWithError_errors_field,
+ message: string,
+ };
+ type t_mutationWithError = {
+ value: Js.Nullable.t(t_mutationWithError_value),
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nvalue {\nstringField \n}\n\nerrors {\nfield \nmessage \n}\n\n}\n\n}\n";
+ type t_mutationWithError_value = {stringField: string};
+ type t_mutationWithError_errors_field = [
+ | `FutureAddedValue(string)
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+ type t_mutationWithError_errors = {
+ field: t_mutationWithError_errors_field,
+ message: string,
+ };
+ type t_mutationWithError = {
+ value: option(t_mutationWithError_value),
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ value: {
+ let value = (value: Raw.t_mutationWithError).value;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ stringField: {
+ let value =
+ (value: Raw.t_mutationWithError_value).stringField;
+ value;
+ },
+ }: t_mutationWithError_value,
+ )
+ | None => None
+ };
+ },
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | other => `FutureAddedValue(other)
+ };
+ },
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ }
+ and field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ | `FutureAddedValue(other) => other
+ };
+ };
+ {field, message};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and value = {
+ let value = (value: t_mutationWithError).value;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let stringField = {
+ let value =
+ (value: t_mutationWithError_value).stringField;
+ value;
+ };
+ {stringField: stringField};
+ }: Raw.t_mutationWithError_value,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {value, errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/mutationWithArgs.js b/tests_bucklescript/static_snapshots/records/operations/mutationWithArgs.js
new file mode 100644
index 00000000..44959668
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/mutationWithArgs.js
@@ -0,0 +1,47 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.optionalInputArgs;
+ return {
+ optionalInputArgs: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ required: inp.required
+ };
+}
+
+function makeVariables(required, param) {
+ return {
+ required: required
+ };
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/mutationWithArgs.re b/tests_bucklescript/static_snapshots/records/operations/mutationWithArgs.re
new file mode 100644
index 00000000..8c52df73
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/mutationWithArgs.re
@@ -0,0 +1,94 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {optionalInputArgs: string};
+ type t_variables = {required: string};
+ };
+ /**The GraphQL query string*/
+ let query = "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n";
+ type t = {optionalInputArgs: string};
+ type t_variables = {required: string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ optionalInputArgs: {
+ let value = (value: Raw.t).optionalInputArgs;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let optionalInputArgs = {
+ let value = (value: t).optionalInputArgs;
+ value;
+ };
+ {optionalInputArgs: optionalInputArgs};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {required: (a => a)((inp: t_variables).required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({required: required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/mutationWithArgsAndNoRecords.js b/tests_bucklescript/static_snapshots/records/operations/mutationWithArgsAndNoRecords.js
new file mode 100644
index 00000000..714ed0f5
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/mutationWithArgsAndNoRecords.js
@@ -0,0 +1,46 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serialize(value) {
+ return {
+ optionalInputArgs: value.optionalInputArgs
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ required: inp.required
+ };
+}
+
+function makeVariables(required, param) {
+ return serializeVariables({
+ required: required
+ });
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/mutationWithArgsAndNoRecords.re b/tests_bucklescript/static_snapshots/records/operations/mutationWithArgsAndNoRecords.re
new file mode 100644
index 00000000..fa7dbd07
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/mutationWithArgsAndNoRecords.re
@@ -0,0 +1,91 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ };
+ /**The GraphQL query string*/
+ let query = "mutation MyMutation($required: String!) {\noptionalInputArgs(required: $required, anotherRequired: \"val\") \n}\n";
+ type t = {. "optionalInputArgs": string};
+ type t_variables = {. "required": string};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => {
+ let optionalInputArgs = {
+ let value = value##optionalInputArgs;
+ value;
+ };
+ {"optionalInputArgs": optionalInputArgs};
+ };
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {"required": (a => a)(inp##required)};
+ let makeVariables = (~required, ()) =>
+ serializeVariables({"required": required}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/nested.js b/tests_bucklescript/static_snapshots/records/operations/nested.js
new file mode 100644
index 00000000..4f5d9696
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/nested.js
@@ -0,0 +1,168 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var tmp;
+ if (value$2 == null) {
+ tmp = undefined;
+ } else {
+ var value$3 = value$2.inner;
+ tmp = {
+ inner: !(value$3 == null) ? ({
+ field: value$3.field
+ }) : undefined
+ };
+ }
+ var value$4 = value.second;
+ var value$5 = value$4.inner;
+ var tmp$1;
+ if (value$5 == null) {
+ tmp$1 = undefined;
+ } else {
+ var value$6 = value$5.inner;
+ tmp$1 = {
+ inner: !(value$6 == null) ? ({
+ f1: value$6.f1,
+ f2: value$6.f2
+ }) : undefined
+ };
+ }
+ var value$7 = value.let_;
+ var value$8 = value$7.inner;
+ var tmp$2;
+ if (value$8 == null) {
+ tmp$2 = undefined;
+ } else {
+ var value$9 = value$8.inner;
+ tmp$2 = {
+ inner: !(value$9 == null) ? ({
+ field: value$9.field
+ }) : undefined
+ };
+ }
+ return {
+ first: {
+ inner: tmp
+ },
+ second: {
+ inner: tmp$1
+ },
+ let_: {
+ inner: tmp$2
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.let_;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 !== undefined) {
+ var value$3 = value$2.inner;
+ var inner$1;
+ if (value$3 !== undefined) {
+ var value$4 = value$3.field;
+ inner$1 = {
+ field: value$4
+ };
+ } else {
+ inner$1 = null;
+ }
+ inner = {
+ inner: inner$1
+ };
+ } else {
+ inner = null;
+ }
+ var let_ = {
+ inner: inner
+ };
+ var value$5 = value.second;
+ var value$6 = value$5.inner;
+ var inner$2;
+ if (value$6 !== undefined) {
+ var value$7 = value$6.inner;
+ var inner$3;
+ if (value$7 !== undefined) {
+ var value$8 = value$7.f2;
+ var value$9 = value$7.f1;
+ inner$3 = {
+ f1: value$9,
+ f2: value$8
+ };
+ } else {
+ inner$3 = null;
+ }
+ inner$2 = {
+ inner: inner$3
+ };
+ } else {
+ inner$2 = null;
+ }
+ var second = {
+ inner: inner$2
+ };
+ var value$10 = value.first;
+ var value$11 = value$10.inner;
+ var inner$4;
+ if (value$11 !== undefined) {
+ var value$12 = value$11.inner;
+ var inner$5;
+ if (value$12 !== undefined) {
+ var value$13 = value$12.field;
+ inner$5 = {
+ field: value$13
+ };
+ } else {
+ inner$5 = null;
+ }
+ inner$4 = {
+ inner: inner$5
+ };
+ } else {
+ inner$4 = null;
+ }
+ var first = {
+ inner: inner$4
+ };
+ return {
+ first: first,
+ second: second,
+ let_: let_
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nfirst: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\nsecond: nestedObject {\ninner {\ninner {\nf1: field \nf2: field \n}\n\n}\n\n}\n\nlet: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/nested.re b/tests_bucklescript/static_snapshots/records/operations/nested.re
new file mode 100644
index 00000000..ad007e1e
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/nested.re
@@ -0,0 +1,337 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type record = {
+ f1: string,
+ f2: string,
+};
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {field: string};
+ type t_first_inner = {inner: Js.Nullable.t(t_first_inner_inner)};
+ type t_first = {inner: Js.Nullable.t(t_first_inner)};
+ type t_second_inner_inner = {
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {inner: Js.Nullable.t(t_second_inner_inner)};
+ type t_second = {inner: Js.Nullable.t(t_second_inner)};
+ type t_let_inner_inner = {field: string};
+ type t_let_inner = {inner: Js.Nullable.t(t_let_inner_inner)};
+ type t_let = {inner: Js.Nullable.t(t_let_inner)};
+ type t = {
+ first: t_first,
+ second: t_second,
+ let_: t_let,
+ };
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nfirst: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\nsecond: nestedObject {\ninner {\ninner {\nf1: field \nf2: field \n}\n\n}\n\n}\n\nlet: nestedObject {\ninner {\ninner {\nfield \n}\n\n}\n\n}\n\n}\n";
+ type t_first_inner_inner = {field: string};
+ type t_first_inner = {inner: option(t_first_inner_inner)};
+ type t_first = {inner: option(t_first_inner)};
+ type t_second_inner_inner = {
+ f1: string,
+ f2: string,
+ };
+ type t_second_inner = {inner: option(t_second_inner_inner)};
+ type t_second = {inner: option(t_second_inner)};
+ type t_let_inner_inner = {field: string};
+ type t_let_inner = {inner: option(t_let_inner_inner)};
+ type t_let = {inner: option(t_let_inner)};
+ type t = {
+ first: t_first,
+ second: t_second,
+ let_: t_let,
+ };
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ first: {
+ let value = (value: Raw.t).first;
+ (
+ {
+ inner: {
+ let value = (value: Raw.t_first).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ inner: {
+ let value = (value: Raw.t_first_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ field: {
+ let value =
+ (value: Raw.t_first_inner_inner).field;
+ value;
+ },
+ }: t_first_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first
+ );
+ },
+ second: {
+ let value = (value: Raw.t).second;
+ (
+ {
+ inner: {
+ let value = (value: Raw.t_second).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ inner: {
+ let value = (value: Raw.t_second_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ f1: {
+ let value = (value: Raw.t_second_inner_inner).f1;
+ value;
+ },
+ f2: {
+ let value = (value: Raw.t_second_inner_inner).f2;
+ value;
+ },
+ }: t_second_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_second_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_second
+ );
+ },
+ let_: {
+ let value = (value: Raw.t).let_;
+ (
+ {
+ inner: {
+ let value = (value: Raw.t_let).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ inner: {
+ let value = (value: Raw.t_let_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ field: {
+ let value = (value: Raw.t_let_inner_inner).field;
+ value;
+ },
+ }: t_let_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_let_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_let
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let let_ = {
+ let value = (value: t).let_;
+ (
+ {
+ let inner = {
+ let value = (value: t_let).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_let_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_let_inner_inner).field;
+ value;
+ };
+ {field: field};
+ }: Raw.t_let_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_let_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_let
+ );
+ }
+ and second = {
+ let value = (value: t).second;
+ (
+ {
+ let inner = {
+ let value = (value: t_second).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_second_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let f2 = {
+ let value = (value: t_second_inner_inner).f2;
+ value;
+ }
+ and f1 = {
+ let value = (value: t_second_inner_inner).f1;
+ value;
+ };
+ {f1, f2};
+ }: Raw.t_second_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_second_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_second
+ );
+ }
+ and first = {
+ let value = (value: t).first;
+ (
+ {
+ let inner = {
+ let value = (value: t_first).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_first_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_first_inner_inner).field;
+ value;
+ };
+ {field: field};
+ }: Raw.t_first_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_first_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {inner: inner};
+ }: Raw.t_first
+ );
+ };
+ {first, second, let_};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/nonrecursiveInput.js b/tests_bucklescript/static_snapshots/records/operations/nonrecursiveInput.js
new file mode 100644
index 00000000..f033be1b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/nonrecursiveInput.js
@@ -0,0 +1,219 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var $$Array = require("bs-platform/lib/js/array.js");
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ nonrecursiveInput: value.nonrecursiveInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.nonrecursiveInput;
+ return {
+ nonrecursiveInput: value$1
+ };
+}
+
+function serializeInputObjectEmbeddedInput(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput(b);
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput(arg)
+ };
+}
+
+function makeInputObjectNonrecursiveInput(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_100: 0,
+ _graphql_arg_95: 0,
+ _graphql_NonrecursiveInput_49: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput,
+ makeVariables: makeVariables,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ return {
+ scalarsInput: value.scalarsInput,
+ more: value.more
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.more;
+ var value$2 = value.scalarsInput;
+ return {
+ scalarsInput: value$2,
+ more: value$1
+ };
+}
+
+function serializeInputObjectEmbeddedInput$1(inp) {
+ var a = inp.field;
+ return {
+ field: a !== undefined ? a : undefined
+ };
+}
+
+function serializeInputObjectNonrecursiveInput$1(inp) {
+ var a = inp.nullableArray;
+ var a$1 = inp.field;
+ var a$2 = inp.enum;
+ var a$3 = inp.embeddedInput;
+ var a$4 = inp.custom;
+ return {
+ nonNullableField: inp.nonNullableField,
+ nullableArray: a !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return b;
+ }
+
+ }), a) : undefined,
+ field: a$1 !== undefined ? a$1 : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : undefined,
+ embeddedInput: a$3 !== undefined ? $$Array.map((function (b) {
+ if (b !== undefined) {
+ return serializeInputObjectEmbeddedInput$1(b);
+ }
+
+ }), a$3) : undefined,
+ custom: a$4 !== undefined ? Caml_option.valFromOption(a$4) : undefined
+ };
+}
+
+function serializeVariables$1(inp) {
+ return {
+ arg: serializeInputObjectNonrecursiveInput$1(inp.arg),
+ arg2: serializeInputObjectNonrecursiveInput$1(inp.arg2)
+ };
+}
+
+function makeVariables$1(arg, arg2, param) {
+ return serializeVariables$1({
+ arg: arg,
+ arg2: arg2
+ });
+}
+
+function makeInputObjectNonrecursiveInput$1(nonNullableField, nullableArray, field, $$enum, embeddedInput, custom, param) {
+ return {
+ nonNullableField: nonNullableField,
+ nullableArray: nullableArray,
+ field: field,
+ enum: $$enum,
+ embeddedInput: embeddedInput,
+ custom: custom
+ };
+}
+
+function makeInputObjectEmbeddedInput$1(field, param) {
+ return {
+ field: field
+ };
+}
+
+var Z__INTERNAL$1 = {
+ _graphql_arg_240: 0,
+ _graphql_arg_235: 0,
+ _graphql_NonrecursiveInput_169: 0,
+ _graphql_NonrecursiveInput_196: 0,
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$1,
+ query: "query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\nscalarsInput(arg: $arg) \nmore: scalarsInput(arg: $arg2) \n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ serializeInputObjectNonrecursiveInput: serializeInputObjectNonrecursiveInput$1,
+ serializeInputObjectEmbeddedInput: serializeInputObjectEmbeddedInput$1,
+ makeVariables: makeVariables$1,
+ makeInputObjectNonrecursiveInput: makeInputObjectNonrecursiveInput$1,
+ makeInputObjectEmbeddedInput: makeInputObjectEmbeddedInput$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/nonrecursiveInput.re b/tests_bucklescript/static_snapshots/records/operations/nonrecursiveInput.re
new file mode 100644
index 00000000..fcc98102
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/nonrecursiveInput.re
@@ -0,0 +1,637 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!) {\nnonrecursiveInput(arg: $arg) \n}\n";
+ type t = {nonrecursiveInput: string};
+ type t_variables = {arg: t_variables_NonrecursiveInput}
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | `FIRST | `SECOND | `THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ nonrecursiveInput: {
+ let value = (value: Raw.t).nonrecursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let nonrecursiveInput = {
+ let value = (value: t).nonrecursiveInput;
+ value;
+ };
+ {nonrecursiveInput: nonrecursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_100;
+ /**Variable **$arg** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_100: _graphql_arg_100 = Obj.magic(0);
+ type nonrec _graphql_arg_95;
+ /**Argument **arg** on field **nonrecursiveInput** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_95: _graphql_arg_95 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_49;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_49: _graphql_NonrecursiveInput_49 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t = {
+ scalarsInput: string,
+ more: string,
+ };
+ type t_variables = {
+ arg: t_variables_NonrecursiveInput,
+ arg2: t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: Js.Nullable.t(array(Js.Nullable.t(string))),
+ field: Js.Nullable.t(string),
+ enum: Js.Nullable.t(string),
+ embeddedInput:
+ Js.Nullable.t(array(Js.Nullable.t(t_variables_EmbeddedInput))),
+ custom: Js.Nullable.t(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: Js.Nullable.t(string)};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: NonrecursiveInput!, $arg2: NonrecursiveInput!) {\nscalarsInput(arg: $arg) \nmore: scalarsInput(arg: $arg2) \n}\n";
+ type t = {
+ scalarsInput: string,
+ more: string,
+ };
+ type t_variables = {
+ arg: t_variables_NonrecursiveInput,
+ arg2: t_variables_NonrecursiveInput,
+ }
+ and t_variables_NonrecursiveInput = {
+ nonNullableField: string,
+ nullableArray: option(array(option(string))),
+ field: option(string),
+ enum: option([ | `FIRST | `SECOND | `THIRD]),
+ embeddedInput: option(array(option(t_variables_EmbeddedInput))),
+ custom: option(Js.Json.t),
+ }
+ and t_variables_EmbeddedInput = {field: option(string)};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ more: {
+ let value = (value: Raw.t).more;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let more = {
+ let value = (value: t).more;
+ value;
+ }
+ and scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput, more};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg,
+ ),
+ arg2:
+ (a => serializeInputObjectNonrecursiveInput(a))(
+ (inp: t_variables).arg2,
+ ),
+ }
+ and serializeInputObjectNonrecursiveInput:
+ t_variables_NonrecursiveInput => Raw.t_variables_NonrecursiveInput =
+ inp => {
+ nonNullableField:
+ (a => a)((inp: t_variables_NonrecursiveInput).nonNullableField),
+ nullableArray:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).nullableArray,
+ ),
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).field,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).enum,
+ ),
+ embeddedInput:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ Array.map(
+ b =>
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectEmbeddedInput(a))(
+ b,
+ ),
+ )
+ }
+ )(
+ b,
+ ),
+ a,
+ )
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).embeddedInput,
+ ),
+ custom:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_NonrecursiveInput).custom,
+ ),
+ }
+ and serializeInputObjectEmbeddedInput:
+ t_variables_EmbeddedInput => Raw.t_variables_EmbeddedInput =
+ inp => {
+ field:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_EmbeddedInput).field,
+ ),
+ };
+ let makeVariables = (~arg, ~arg2, ()) =>
+ serializeVariables({arg, arg2}: t_variables)
+ and makeInputObjectNonrecursiveInput =
+ (
+ ~nonNullableField,
+ ~nullableArray=?,
+ ~field=?,
+ ~enum=?,
+ ~embeddedInput=?,
+ ~custom=?,
+ (),
+ )
+ : t_variables_NonrecursiveInput => {
+ nonNullableField,
+ nullableArray,
+ field,
+ enum,
+ embeddedInput,
+ custom,
+ }
+ and makeInputObjectEmbeddedInput = (~field=?, ()): t_variables_EmbeddedInput => {
+ field: field,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_240;
+ /**Variable **$arg** has the following graphql type:
+
+```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}!
+```*/
+ let _graphql_arg_240: _graphql_arg_240 = Obj.magic(0);
+ type nonrec _graphql_arg_235;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+```*/
+ let _graphql_arg_235: _graphql_arg_235 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_NonrecursiveInput_169;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_169: _graphql_NonrecursiveInput_169 =
+ Obj.magic(0);
+ type nonrec _graphql_NonrecursiveInput_196;
+ /**```
+NonrecursiveInput {
+ nonNullableField: String!
+ nullableArray: [String]
+ field: String
+ enum: SampleField
+ embeddedInput: [EmbeddedInput]
+ custom: CustomScalar
+}
+```*/
+ let _graphql_NonrecursiveInput_196: _graphql_NonrecursiveInput_196 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/omitFutureValueEnum.js b/tests_bucklescript/static_snapshots/records/operations/omitFutureValueEnum.js
new file mode 100644
index 00000000..4d9087da
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/omitFutureValueEnum.js
@@ -0,0 +1,257 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ return {
+ mutationWithError: {
+ errors: !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var tmp;
+ switch (value$1) {
+ case "FIRST" :
+ tmp = /* FIRST */-24399856;
+ break;
+ case "SECOND" :
+ tmp = /* SECOND */382368628;
+ break;
+ case "THIRD" :
+ tmp = /* THIRD */225952583;
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ message: value.message,
+ field: tmp
+ };
+ })) : undefined
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = typeof value$1 === "number" ? (
+ value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : value$1[1];
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ var mutationWithError = {
+ errors: errors
+ };
+ return {
+ mutationWithError: mutationWithError
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Normal = {
+ Raw: Raw,
+ query: "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ return {
+ mutationWithError: {
+ errors: !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var tmp;
+ switch (value$1) {
+ case "FIRST" :
+ tmp = /* FIRST */-24399856;
+ break;
+ case "SECOND" :
+ tmp = /* SECOND */382368628;
+ break;
+ case "THIRD" :
+ tmp = /* THIRD */225952583;
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ message: value.message,
+ field: tmp
+ };
+ })) : undefined
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD";
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ var mutationWithError = {
+ errors: errors
+ };
+ return {
+ mutationWithError: mutationWithError
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ByConfig = {
+ Raw: Raw$1,
+ query: "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ return {
+ mutationWithError: {
+ errors: !(value$2 == null) ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var tmp;
+ switch (value$1) {
+ case "FIRST" :
+ tmp = /* FIRST */-24399856;
+ break;
+ case "SECOND" :
+ tmp = /* SECOND */382368628;
+ break;
+ case "THIRD" :
+ tmp = /* THIRD */225952583;
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ message: value.message,
+ field: tmp
+ };
+ })) : undefined
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.mutationWithError;
+ var value$2 = value$1.errors;
+ var errors = value$2 !== undefined ? value$2.map((function (value) {
+ var value$1 = value.field;
+ var field = value$1 !== 225952583 ? (
+ value$1 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD";
+ var value$2 = value.message;
+ return {
+ message: value$2,
+ field: field
+ };
+ })) : null;
+ var mutationWithError = {
+ errors: errors
+ };
+ return {
+ mutationWithError: mutationWithError
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var ByDirective = {
+ Raw: Raw$2,
+ query: "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+exports.Normal = Normal;
+exports.ByConfig = ByConfig;
+exports.ByDirective = ByDirective;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/omitFutureValueEnum.re b/tests_bucklescript/static_snapshots/records/operations/omitFutureValueEnum.re
new file mode 100644
index 00000000..3e6db3cf
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/omitFutureValueEnum.re
@@ -0,0 +1,504 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [
+ | `FutureAddedValue(string)
+ | `FIRST
+ | `SECOND
+ | `THIRD
+ ];
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | other => `FutureAddedValue(other)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ | `FutureAddedValue(other) => other
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ };
+ {message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {errors: errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [ | `FIRST | `SECOND | `THIRD];
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | _ => raise(Not_found)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ };
+ {message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {errors: errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_mutationWithError_errors_field = string;
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: Js.Nullable.t(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationWithError {\nerrors {\nmessage \nfield \n}\n\n}\n\n}\n";
+ type t_mutationWithError_errors_field = [ | `FIRST | `SECOND | `THIRD];
+ type t_mutationWithError_errors = {
+ message: string,
+ field: t_mutationWithError_errors_field,
+ };
+ type t_mutationWithError = {
+ errors: option(array(t_mutationWithError_errors)),
+ };
+ type t = {mutationWithError: t_mutationWithError};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationWithError: {
+ let value = (value: Raw.t).mutationWithError;
+ (
+ {
+ errors: {
+ let value = (value: Raw.t_mutationWithError).errors;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ message: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).message;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_mutationWithError_errors).field;
+ switch (Obj.magic(value: string)) {
+ | "FIRST" => `FIRST
+ | "SECOND" => `SECOND
+ | "THIRD" => `THIRD
+ | _ => raise(Not_found)
+ };
+ },
+ }: t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => None
+ };
+ },
+ }: t_mutationWithError
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationWithError = {
+ let value = (value: t).mutationWithError;
+ (
+ {
+ let errors = {
+ let value = (value: t_mutationWithError).errors;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ value
+ |> Js.Array.map((value) =>
+ (
+ {
+ let field = {
+ let value =
+ (value: t_mutationWithError_errors).field;
+ switch (value) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ };
+ }
+ and message = {
+ let value =
+ (value: t_mutationWithError_errors).message;
+ value;
+ };
+ {message, field};
+ }: Raw.t_mutationWithError_errors
+ )
+ ),
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {errors: errors};
+ }: Raw.t_mutationWithError
+ );
+ };
+ {mutationWithError: mutationWithError};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/omitFutureValueUnion.js b/tests_bucklescript/static_snapshots/records/operations/omitFutureValueUnion.js
new file mode 100644
index 00000000..646d639c
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/omitFutureValueUnion.js
@@ -0,0 +1,266 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var dogOrHuman;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var Normal = {
+ Raw: Raw,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var ByConfig = {
+ Raw: Raw$1,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ throw Caml_builtin_exceptions.not_found;
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var ByDirective = {
+ Raw: Raw$2,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+exports.Normal = Normal;
+exports.ByConfig = ByConfig;
+exports.ByDirective = ByDirective;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/omitFutureValueUnion.re b/tests_bucklescript/static_snapshots/records/operations/omitFutureValueUnion.re
new file mode 100644
index 00000000..86c08bf2
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/omitFutureValueUnion.re
@@ -0,0 +1,497 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module Normal = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 Normal {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByConfig = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByConfig {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ByDirective = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => raise(Not_found)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ByDirective {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/pokedexApolloMode.js b/tests_bucklescript/static_snapshots/records/operations/pokedexApolloMode.js
new file mode 100644
index 00000000..e40098f1
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/pokedexApolloMode.js
@@ -0,0 +1,72 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 == null) {
+ tmp = undefined;
+ } else {
+ var value$2 = value$1.name;
+ tmp = {
+ id: value$1.id,
+ name: !(value$2 == null) ? value$2 : undefined
+ };
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.pokemon;
+ var pokemon;
+ if (value$1 !== undefined) {
+ var value$2 = value$1.name;
+ var name = value$2 !== undefined ? value$2 : null;
+ var value$3 = value$1.id;
+ pokemon = {
+ id: value$3,
+ name: name
+ };
+ } else {
+ pokemon = null;
+ }
+ return {
+ pokemon: pokemon
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ _graphql_name_52: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\npokemon(name: \"Pikachu\") {\nid \nname \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/pokedexApolloMode.re b/tests_bucklescript/static_snapshots/records/operations/pokedexApolloMode.re
new file mode 100644
index 00000000..e5483c12
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/pokedexApolloMode.re
@@ -0,0 +1,145 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ id: string,
+ name: Js.Nullable.t(string),
+ };
+ type t = {pokemon: Js.Nullable.t(t_pokemon)};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\npokemon(name: \"Pikachu\") {\nid \nname \n}\n\n}\n";
+ type t_pokemon = {
+ id: string,
+ name: option(string),
+ };
+ type t = {pokemon: option(t_pokemon)};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ pokemon: {
+ let value = (value: Raw.t).pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ id: {
+ let value = (value: Raw.t_pokemon).id;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_pokemon).name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_pokemon,
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let pokemon = {
+ let value = (value: t).pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = (value: t_pokemon).name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = (value: t_pokemon).id;
+ value;
+ };
+ {id, name};
+ }: Raw.t_pokemon,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {pokemon: pokemon};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_name_52;
+ /**Argument **name** on field **pokemon** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_name_52: _graphql_name_52 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/pokedexScalars.js b/tests_bucklescript/static_snapshots/records/operations/pokedexScalars.js
new file mode 100644
index 00000000..71b0e78f
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/pokedexScalars.js
@@ -0,0 +1,86 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.pokemon;
+ var tmp;
+ if (value$1 == null) {
+ tmp = undefined;
+ } else {
+ var value$2 = value$1.name;
+ tmp = {
+ id: value$1.id,
+ name: !(value$2 == null) ? value$2 : undefined
+ };
+ }
+ return {
+ pokemon: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.pokemon;
+ var pokemon;
+ if (value$1 !== undefined) {
+ var value$2 = value$1.name;
+ var name = value$2 !== undefined ? value$2 : null;
+ var value$3 = value$1.id;
+ pokemon = {
+ id: value$3,
+ name: name
+ };
+ } else {
+ pokemon = null;
+ }
+ return {
+ pokemon: pokemon
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.id;
+ var a$1 = inp.name;
+ return {
+ id: a !== undefined ? a : undefined,
+ name: a$1 !== undefined ? a$1 : undefined
+ };
+}
+
+function makeVariables(id, name, param) {
+ return serializeVariables({
+ id: id,
+ name: name
+ });
+}
+
+function makeDefaultVariables(param) {
+ return serializeVariables({
+ id: undefined,
+ name: undefined
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_name_100: 0,
+ _graphql_name_94: 0,
+ _graphql_id_111: 0,
+ _graphql_id_107: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query pokemon($id: String, $name: String) {\npokemon(name: $name, id: $id) {\nid \nname \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/pokedexScalars.re b/tests_bucklescript/static_snapshots/records/operations/pokedexScalars.re
new file mode 100644
index 00000000..ad5d9499
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/pokedexScalars.re
@@ -0,0 +1,195 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_pokemon = {
+ id: string,
+ name: Js.Nullable.t(string),
+ };
+ type t = {pokemon: Js.Nullable.t(t_pokemon)};
+ type t_variables = {
+ id: Js.Nullable.t(string),
+ name: Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query pokemon($id: String, $name: String) {\npokemon(name: $name, id: $id) {\nid \nname \n}\n\n}\n";
+ type t_pokemon = {
+ id: string,
+ name: option(string),
+ };
+ type t = {pokemon: option(t_pokemon)};
+ type t_variables = {
+ id: option(string),
+ name: option(string),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ pokemon: {
+ let value = (value: Raw.t).pokemon;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ id: {
+ let value = (value: Raw.t_pokemon).id;
+ value;
+ },
+ name: {
+ let value = (value: Raw.t_pokemon).name;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_pokemon,
+ )
+ | None => None
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let pokemon = {
+ let value = (value: t).pokemon;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let name = {
+ let value = (value: t_pokemon).name;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and id = {
+ let value = (value: t_pokemon).id;
+ value;
+ };
+ {id, name};
+ }: Raw.t_pokemon,
+ )
+ | None => Js.Nullable.null
+ };
+ };
+ {pokemon: pokemon};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ id:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).id,
+ ),
+ name:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).name,
+ ),
+ };
+ let makeVariables = (~id=?, ~name=?, ()) =>
+ serializeVariables({id, name}: t_variables);
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_name_100;
+ /**Variable **$name** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_name_100: _graphql_name_100 = Obj.magic(0);
+ type nonrec _graphql_name_94;
+ /**Argument **name** on field **pokemon** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_name_94: _graphql_name_94 = Obj.magic(0);
+ type nonrec _graphql_id_111;
+ /**Variable **$id** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_id_111: _graphql_id_111 = Obj.magic(0);
+ type nonrec _graphql_id_107;
+ /**Argument **id** on field **pokemon** has the following graphql type:
+
+```
+String
+```*/
+ let _graphql_id_107: _graphql_id_107 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/record.js b/tests_bucklescript/static_snapshots/records/operations/record.js
new file mode 100644
index 00000000..52534e27
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/record.js
@@ -0,0 +1,367 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ return {
+ variousScalars: {
+ string: value$1.string,
+ int: value$1.int
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.int;
+ var value$3 = value$1.string;
+ var variousScalars = {
+ string: value$3,
+ int: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nvariousScalars {\nstring \nint \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var nullableString = value$2 !== undefined ? value$2 : null;
+ var variousScalars = {
+ nullableString: nullableString
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var OneFieldQuery = {
+ Raw: Raw$1,
+ query: "query {\nvariousScalars {\nnullableString \n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var query = "fragment Fragment on VariousScalars {\nstring \nint \n}\n";
+
+var Raw$2 = { };
+
+function parse$2(value) {
+ return {
+ string: value.string,
+ int: value.int
+ };
+}
+
+var verifyArgsAndParse = parse$2;
+
+function serialize$2(value) {
+ var value$1 = value.int;
+ var value$2 = value.string;
+ return {
+ string: value$2,
+ int: value$1
+ };
+}
+
+var name = "Fragment";
+
+var Z__INTERNAL$2 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var Fragment = {
+ query: query,
+ Raw: Raw$2,
+ parse: parse$2,
+ verifyArgsAndParse: verifyArgsAndParse,
+ serialize: serialize$2,
+ name: name,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var Raw$3 = { };
+
+var query$1 = "query {\nvariousScalars {\n...Fragment \n}\n\n}\nfragment Fragment on VariousScalars {\nstring \nint \n}\n";
+
+function parse$3(value) {
+ return {
+ variousScalars: parse$2(value.variousScalars)
+ };
+}
+
+function serialize$3(value) {
+ var value$1 = value.variousScalars;
+ var variousScalars = serialize$2(value$1);
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$3 = {
+ graphql_module: 0
+};
+
+var Untitled1 = {
+ Raw: Raw$3,
+ query: query$1,
+ parse: parse$3,
+ serialize: serialize$3,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+var ExternalFragmentQuery = {
+ Fragment: Fragment,
+ Untitled1: Untitled1
+};
+
+var Raw$4 = { };
+
+function parse$4(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp = typename === "Dog" ? /* `Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ] : /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$4(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$3(param) {
+
+}
+
+function makeVariables$3(param) {
+
+}
+
+function makeDefaultVariables$3(param) {
+
+}
+
+var Z__INTERNAL$4 = {
+ graphql_module: 0
+};
+
+var InlineFragmentQuery = {
+ Raw: Raw$4,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n",
+ parse: parse$4,
+ serialize: serialize$4,
+ serializeVariables: serializeVariables$3,
+ makeVariables: makeVariables$3,
+ makeDefaultVariables: makeDefaultVariables$3,
+ Z__INTERNAL: Z__INTERNAL$4
+};
+
+var query$2 = "fragment DogFragment on Dog {\nname \nbarkVolume \n}\n";
+
+var Raw$5 = { };
+
+function parse$5(value) {
+ return {
+ name: value.name,
+ barkVolume: value.barkVolume
+ };
+}
+
+var verifyArgsAndParse$1 = parse$5;
+
+function serialize$5(value) {
+ var value$1 = value.barkVolume;
+ var value$2 = value.name;
+ return {
+ name: value$2,
+ barkVolume: value$1
+ };
+}
+
+var name$1 = "DogFragment";
+
+var Z__INTERNAL$5 = {
+ graphql: 0,
+ graphql_module: 0
+};
+
+var DogFragment = {
+ query: query$2,
+ Raw: Raw$5,
+ parse: parse$5,
+ verifyArgsAndParse: verifyArgsAndParse$1,
+ serialize: serialize$5,
+ name: name$1,
+ Z__INTERNAL: Z__INTERNAL$5
+};
+
+var Raw$6 = { };
+
+var query$3 = "query {\ndogOrHuman {\n__typename\n...on Dog {\n...DogFragment \n}\n\n}\n\n}\nfragment DogFragment on Dog {\nname \nbarkVolume \n}\n";
+
+function parse$6(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp = typename === "Dog" ? /* `Dog */[
+ 3406428,
+ parse$5(value$1)
+ ] : /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$6(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman = value$1[0] >= 3406428 ? serialize$5(value$1[1]) : value$1[1];
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$4(param) {
+
+}
+
+function makeVariables$4(param) {
+
+}
+
+function makeDefaultVariables$4(param) {
+
+}
+
+var Z__INTERNAL$6 = {
+ graphql_module: 0
+};
+
+var Untitled1$1 = {
+ Raw: Raw$6,
+ query: query$3,
+ parse: parse$6,
+ serialize: serialize$6,
+ serializeVariables: serializeVariables$4,
+ makeVariables: makeVariables$4,
+ makeDefaultVariables: makeDefaultVariables$4,
+ Z__INTERNAL: Z__INTERNAL$6
+};
+
+var UnionExternalFragmentQuery = {
+ DogFragment: DogFragment,
+ Untitled1: Untitled1$1
+};
+
+exports.MyQuery = MyQuery;
+exports.OneFieldQuery = OneFieldQuery;
+exports.ExternalFragmentQuery = ExternalFragmentQuery;
+exports.InlineFragmentQuery = InlineFragmentQuery;
+exports.UnionExternalFragmentQuery = UnionExternalFragmentQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/record.re b/tests_bucklescript/static_snapshots/records/operations/record.re
new file mode 100644
index 00000000..855aa3bf
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/record.re
@@ -0,0 +1,747 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+type scalars = {
+ string,
+ int,
+};
+
+type dog = {
+ name: string,
+ barkVolume: float,
+};
+
+type oneFieldQuery = {nullableString: option(string)};
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ string,
+ int,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nstring \nint \n}\n\n}\n";
+ type t = {variousScalars: scalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ }: scalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let int = {
+ let value = (value: scalars).int;
+ value;
+ }
+ and string = {
+ let value = (value: scalars).string;
+ value;
+ };
+ {string, int};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module OneFieldQuery = {
+ module Raw = {
+ type t_variousScalars = {nullableString: Js.Nullable.t(string)};
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nnullableString \n}\n\n}\n";
+ type t_variousScalars = {nullableString: option(string)};
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableString: nullableString};
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 OneFieldQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module ExternalFragmentQuery = {
+ module Fragment = {
+ /**The GraphQL query string*/
+ let query = "fragment Fragment on VariousScalars {\nstring \nint \n}\n";
+ module Raw = {
+ type t = {
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ };
+ type t = {
+ string,
+ int,
+ };
+ type nonrec t_VariousScalars = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ string: {
+ let value = (value: Raw.t).string;
+ value;
+ },
+ int: {
+ let value = (value: Raw.t).int;
+ value;
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let int = {
+ let value = (value: t).int;
+ value;
+ }
+ and string = {
+ let value = (value: t).string;
+ value;
+ };
+ {string, int};
+ }: Raw.t
+ );
+ let name = "Fragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+VariousScalars {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t = {variousScalars: Fragment.Raw.t};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ ("query {\nvariousScalars {\n..." ++ Fragment.name)
+ ++ " \n}\n\n}\n"
+ )
+ ++ Fragment.query;
+ type t = {variousScalars: Fragment.t};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ Fragment.verifyArgsAndParse(value);
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ Fragment.serialize(value);
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 ExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
+module InlineFragmentQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 InlineFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module UnionExternalFragmentQuery = {
+ module DogFragment = {
+ /**The GraphQL query string*/
+ let query = "fragment DogFragment on Dog {\nname \nbarkVolume \n}\n";
+ module Raw = {
+ type t = {
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ };
+ type t = {
+ name: string,
+ barkVolume: float,
+ };
+ type nonrec t_Dog = t;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ name: {
+ let value = (value: Raw.t).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t).barkVolume;
+ value;
+ },
+ }: t
+ );
+ let verifyArgsAndParse = (value: Raw.t) => parse(value);
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let barkVolume = {
+ let value = (value: t).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t).name;
+ value;
+ };
+ {name, barkVolume};
+ }: Raw.t
+ );
+ let name = "DogFragment";
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql;
+ /**```
+Dog {
+ name: String!
+ barkVolume: Float!
+}
+```*/
+ let graphql: graphql = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+ module Untitled1 = {
+ module Raw = {
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query =
+ (
+ (
+ "query {\ndogOrHuman {\n__typename\n...on Dog {\n..."
+ ++ DogFragment.name
+ )
+ ++ " \n}\n\n}\n\n}\n"
+ )
+ ++ DogFragment.query;
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(DogFragment.t)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: DogFragment.Raw.t = Obj.magic(value);
+ DogFragment.verifyArgsAndParse(value);
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(DogFragment.serialize(value)): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 UnionExternalFragmentQuery {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/recursiveInput.js b/tests_bucklescript/static_snapshots/records/operations/recursiveInput.js
new file mode 100644
index 00000000..ea626540
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/recursiveInput.js
@@ -0,0 +1,75 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ recursiveInput: value.recursiveInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.recursiveInput;
+ return {
+ recursiveInput: value$1
+ };
+}
+
+function serializeInputObjectRecursiveInput(inp) {
+ var a = inp.otherField;
+ var a$1 = inp.inner;
+ var a$2 = inp.enum;
+ return {
+ otherField: a !== undefined ? a : undefined,
+ inner: a$1 !== undefined ? serializeInputObjectRecursiveInput(a$1) : undefined,
+ enum: a$2 !== undefined ? (
+ a$2 !== 225952583 ? (
+ a$2 >= 382368628 ? "SECOND" : "FIRST"
+ ) : "THIRD"
+ ) : undefined
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectRecursiveInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectRecursiveInput(arg)
+ };
+}
+
+function makeInputObjectRecursiveInput(otherField, inner, $$enum, param) {
+ return {
+ otherField: otherField,
+ inner: inner,
+ enum: $$enum
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_90: 0,
+ _graphql_arg_85: 0,
+ _graphql_RecursiveInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: RecursiveInput!) {\nrecursiveInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectRecursiveInput: serializeInputObjectRecursiveInput,
+ makeVariables: makeVariables,
+ makeInputObjectRecursiveInput: makeInputObjectRecursiveInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/recursiveInput.re b/tests_bucklescript/static_snapshots/records/operations/recursiveInput.re
new file mode 100644
index 00000000..932cdcb9
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/recursiveInput.re
@@ -0,0 +1,193 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {recursiveInput: string};
+ type t_variables = {arg: t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ otherField: Js.Nullable.t(string),
+ inner: Js.Nullable.t(t_variables_RecursiveInput),
+ enum: Js.Nullable.t(string),
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: RecursiveInput!) {\nrecursiveInput(arg: $arg) \n}\n";
+ type t = {recursiveInput: string};
+ type t_variables = {arg: t_variables_RecursiveInput}
+ and t_variables_RecursiveInput = {
+ otherField: option(string),
+ inner: option(t_variables_RecursiveInput),
+ enum: option([ | `FIRST | `SECOND | `THIRD]),
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ recursiveInput: {
+ let value = (value: Raw.t).recursiveInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let recursiveInput = {
+ let value = (value: t).recursiveInput;
+ value;
+ };
+ {recursiveInput: recursiveInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectRecursiveInput(a))((inp: t_variables).arg),
+ }
+ and serializeInputObjectRecursiveInput:
+ t_variables_RecursiveInput => Raw.t_variables_RecursiveInput =
+ inp => {
+ otherField:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_RecursiveInput).otherField,
+ ),
+ inner:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (a => serializeInputObjectRecursiveInput(a))(b),
+ )
+ }
+ )(
+ (inp: t_variables_RecursiveInput).inner,
+ ),
+ enum:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) =>
+ Js.Nullable.return(
+ (
+ a =>
+ switch (a) {
+ | `FIRST => "FIRST"
+ | `SECOND => "SECOND"
+ | `THIRD => "THIRD"
+ }
+ )(
+ b,
+ ),
+ )
+ }
+ )(
+ (inp: t_variables_RecursiveInput).enum,
+ ),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectRecursiveInput =
+ (~otherField=?, ~inner=?, ~enum=?, ()): t_variables_RecursiveInput => {
+ otherField,
+ inner,
+ enum,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_90;
+ /**Variable **$arg** has the following graphql type:
+
+```
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}!
+```*/
+ let _graphql_arg_90: _graphql_arg_90 = Obj.magic(0);
+ type nonrec _graphql_arg_85;
+ /**Argument **arg** on field **recursiveInput** has the following graphql type:
+
+```
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}!
+```*/
+ let _graphql_arg_85: _graphql_arg_85 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_RecursiveInput_47;
+ /**```
+RecursiveInput {
+ otherField: String
+ inner: RecursiveInput
+ enum: SampleField
+}
+```*/
+ let _graphql_RecursiveInput_47: _graphql_RecursiveInput_47 = Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/scalars.js b/tests_bucklescript/static_snapshots/records/operations/scalars.js
new file mode 100644
index 00000000..8790fe3b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/scalars.js
@@ -0,0 +1,92 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/scalars.re b/tests_bucklescript/static_snapshots/records/operations/scalars.re
new file mode 100644
index 00000000..f31ea8f1
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/scalars.re
@@ -0,0 +1,245 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n";
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/scalarsArgs.js b/tests_bucklescript/static_snapshots/records/operations/scalarsArgs.js
new file mode 100644
index 00000000..e40f4068
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/scalarsArgs.js
@@ -0,0 +1,71 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.scalarsInput;
+ return {
+ scalarsInput: value$1
+ };
+}
+
+function serializeVariables(inp) {
+ var a = inp.nullableString;
+ var a$1 = inp.nullableInt;
+ var a$2 = inp.nullableFloat;
+ var a$3 = inp.nullableBoolean;
+ var a$4 = inp.nullableID;
+ return {
+ nullableString: a !== undefined ? a : undefined,
+ string: inp.string,
+ nullableInt: a$1 !== undefined ? a$1 : undefined,
+ int: inp.int,
+ nullableFloat: a$2 !== undefined ? a$2 : undefined,
+ float: inp.float,
+ nullableBoolean: a$3 !== undefined ? a$3 : undefined,
+ boolean: inp.boolean,
+ nullableID: a$4 !== undefined ? a$4 : undefined,
+ id: inp.id
+ };
+}
+
+function makeVariables(nullableString, string, nullableInt, $$int, nullableFloat, $$float, nullableBoolean, $$boolean, nullableID, id, param) {
+ return serializeVariables({
+ nullableString: nullableString,
+ string: string,
+ nullableInt: nullableInt,
+ int: $$int,
+ nullableFloat: nullableFloat,
+ float: $$float,
+ nullableBoolean: nullableBoolean,
+ boolean: $$boolean,
+ nullableID: nullableID,
+ id: id
+ });
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_292: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/scalarsArgs.re b/tests_bucklescript/static_snapshots/records/operations/scalarsArgs.re
new file mode 100644
index 00000000..b4c13a19
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/scalarsArgs.re
@@ -0,0 +1,216 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {scalarsInput: string};
+ type t_variables = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($nullableString: String, $string: String!, $nullableInt: Int, $int: Int!, $nullableFloat: Float, $float: Float!, $nullableBoolean: Boolean, $boolean: Boolean!, $nullableID: ID, $id: ID!) {\nscalarsInput(arg: {nullableString: $nullableString, string: $string, nullableInt: $nullableInt, int: $int, nullableFloat: $nullableFloat, float: $float, nullableBoolean: $nullableBoolean, boolean: $boolean, nullableID: $nullableID, id: $id}) \n}\n";
+ type t = {scalarsInput: string};
+ type t_variables = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput: scalarsInput};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ nullableString:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableString,
+ ),
+ string: (a => a)((inp: t_variables).string),
+ nullableInt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableInt,
+ ),
+ int: (a => a)((inp: t_variables).int),
+ nullableFloat:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableFloat,
+ ),
+ float: (a => a)((inp: t_variables).float),
+ nullableBoolean:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableBoolean,
+ ),
+ boolean: (a => a)((inp: t_variables).boolean),
+ nullableID:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables).nullableID,
+ ),
+ id: (a => a)((inp: t_variables).id),
+ };
+ let makeVariables =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ ) =>
+ serializeVariables(
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ }: t_variables,
+ );
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_292;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+```*/
+ let _graphql_arg_292: _graphql_arg_292 = Obj.magic(0);
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/scalarsInput.js b/tests_bucklescript/static_snapshots/records/operations/scalarsInput.js
new file mode 100644
index 00000000..8e418360
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/scalarsInput.js
@@ -0,0 +1,87 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ return {
+ scalarsInput: value.scalarsInput
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.scalarsInput;
+ return {
+ scalarsInput: value$1
+ };
+}
+
+function serializeInputObjectVariousScalarsInput(inp) {
+ var a = inp.nullableString;
+ var a$1 = inp.nullableInt;
+ var a$2 = inp.nullableFloat;
+ var a$3 = inp.nullableBoolean;
+ var a$4 = inp.nullableID;
+ return {
+ nullableString: a !== undefined ? a : undefined,
+ string: inp.string,
+ nullableInt: a$1 !== undefined ? a$1 : undefined,
+ int: inp.int,
+ nullableFloat: a$2 !== undefined ? a$2 : undefined,
+ float: inp.float,
+ nullableBoolean: a$3 !== undefined ? a$3 : undefined,
+ boolean: inp.boolean,
+ nullableID: a$4 !== undefined ? a$4 : undefined,
+ id: inp.id
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ arg: serializeInputObjectVariousScalarsInput(inp.arg)
+ };
+}
+
+function makeVariables(arg, param) {
+ return {
+ arg: serializeInputObjectVariousScalarsInput(arg)
+ };
+}
+
+function makeInputObjectVariousScalarsInput(nullableString, string, nullableInt, $$int, nullableFloat, $$float, nullableBoolean, $$boolean, nullableID, id, param) {
+ return {
+ nullableString: nullableString,
+ string: string,
+ nullableInt: nullableInt,
+ int: $$int,
+ nullableFloat: nullableFloat,
+ float: $$float,
+ nullableBoolean: nullableBoolean,
+ boolean: $$boolean,
+ nullableID: nullableID,
+ id: id
+ };
+}
+
+var Z__INTERNAL = {
+ _graphql_arg_93: 0,
+ _graphql_arg_88: 0,
+ _graphql_VariousScalarsInput_47: 0,
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($arg: VariousScalarsInput!) {\nscalarsInput(arg: $arg) \n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ serializeInputObjectVariousScalarsInput: serializeInputObjectVariousScalarsInput,
+ makeVariables: makeVariables,
+ makeInputObjectVariousScalarsInput: makeInputObjectVariousScalarsInput,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/scalarsInput.re b/tests_bucklescript/static_snapshots/records/operations/scalarsInput.re
new file mode 100644
index 00000000..ab139706
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/scalarsInput.re
@@ -0,0 +1,261 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t = {scalarsInput: string};
+ type t_variables = {arg: t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ };
+ /**The GraphQL query string*/
+ let query = "query ($arg: VariousScalarsInput!) {\nscalarsInput(arg: $arg) \n}\n";
+ type t = {scalarsInput: string};
+ type t_variables = {arg: t_variables_VariousScalarsInput}
+ and t_variables_VariousScalarsInput = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ scalarsInput: {
+ let value = (value: Raw.t).scalarsInput;
+ value;
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let scalarsInput = {
+ let value = (value: t).scalarsInput;
+ value;
+ };
+ {scalarsInput: scalarsInput};
+ }: Raw.t
+ );
+ let rec serializeVariables: t_variables => Raw.t_variables =
+ inp => {
+ arg:
+ (a => serializeInputObjectVariousScalarsInput(a))(
+ (inp: t_variables).arg,
+ ),
+ }
+ and serializeInputObjectVariousScalarsInput:
+ t_variables_VariousScalarsInput => Raw.t_variables_VariousScalarsInput =
+ inp => {
+ nullableString:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableString,
+ ),
+ string: (a => a)((inp: t_variables_VariousScalarsInput).string),
+ nullableInt:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableInt,
+ ),
+ int: (a => a)((inp: t_variables_VariousScalarsInput).int),
+ nullableFloat:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableFloat,
+ ),
+ float: (a => a)((inp: t_variables_VariousScalarsInput).float),
+ nullableBoolean:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableBoolean,
+ ),
+ boolean: (a => a)((inp: t_variables_VariousScalarsInput).boolean),
+ nullableID:
+ (
+ a =>
+ switch (a) {
+ | None => Js.Nullable.undefined
+ | Some(b) => Js.Nullable.return((a => a)(b))
+ }
+ )(
+ (inp: t_variables_VariousScalarsInput).nullableID,
+ ),
+ id: (a => a)((inp: t_variables_VariousScalarsInput).id),
+ };
+ let makeVariables = (~arg, ()) =>
+ serializeVariables({arg: arg}: t_variables)
+ and makeInputObjectVariousScalarsInput =
+ (
+ ~nullableString=?,
+ ~string,
+ ~nullableInt=?,
+ ~int,
+ ~nullableFloat=?,
+ ~float,
+ ~nullableBoolean=?,
+ ~boolean,
+ ~nullableID=?,
+ ~id,
+ (),
+ )
+ : t_variables_VariousScalarsInput => {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type nonrec _graphql_arg_93;
+ /**Variable **$arg** has the following graphql type:
+
+```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+```*/
+ let _graphql_arg_93: _graphql_arg_93 = Obj.magic(0);
+ type nonrec _graphql_arg_88;
+ /**Argument **arg** on field **scalarsInput** has the following graphql type:
+
+```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}!
+```*/
+ let _graphql_arg_88: _graphql_arg_88 = Obj.magic(0);
+ type root = t;
+ type nonrec _graphql_VariousScalarsInput_47;
+ /**```
+VariousScalarsInput {
+ nullableString: String
+ string: String!
+ nullableInt: Int
+ int: Int!
+ nullableFloat: Float
+ float: Float!
+ nullableBoolean: Boolean
+ boolean: Boolean!
+ nullableID: ID
+ id: ID!
+}
+```*/
+ let _graphql_VariousScalarsInput_47: _graphql_VariousScalarsInput_47 =
+ Obj.magic(0);
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/skipDirectives.js b/tests_bucklescript/static_snapshots/records/operations/skipDirectives.js
new file mode 100644
index 00000000..19aff0b8
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/skipDirectives.js
@@ -0,0 +1,78 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.v1;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.string;
+ var value$4 = value.v2;
+ var value$5 = value$4.nullableString;
+ var value$6 = value$4.string;
+ return {
+ v1: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: !(value$3 == null) ? value$3 : undefined
+ },
+ v2: {
+ nullableString: !(value$5 == null) ? value$5 : undefined,
+ string: !(value$6 == null) ? value$6 : undefined
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.v2;
+ var value$2 = value$1.string;
+ var string = value$2 !== undefined ? value$2 : null;
+ var value$3 = value$1.nullableString;
+ var nullableString = value$3 !== undefined ? value$3 : null;
+ var v2 = {
+ nullableString: nullableString,
+ string: string
+ };
+ var value$4 = value.v1;
+ var value$5 = value$4.string;
+ var string$1 = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$4.nullableString;
+ var nullableString$1 = value$6 !== undefined ? value$6 : null;
+ var v1 = {
+ nullableString: nullableString$1,
+ string: string$1
+ };
+ return {
+ v1: v1,
+ v2: v2
+ };
+}
+
+function serializeVariables(inp) {
+ return {
+ var: inp.var
+ };
+}
+
+function makeVariables($$var, param) {
+ return {
+ var: $$var
+ };
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query ($var: Boolean!) {\nv1: variousScalars {\nnullableString @skip(if: $var) \nstring @skip(if: $var) \n}\n\nv2: variousScalars {\nnullableString @include(if: $var) \nstring @include(if: $var) \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/skipDirectives.re b/tests_bucklescript/static_snapshots/records/operations/skipDirectives.re
new file mode 100644
index 00000000..e745b34c
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/skipDirectives.re
@@ -0,0 +1,194 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_v1 = {
+ nullableString: Js.Nullable.t(string),
+ string: Js.Nullable.t(string),
+ };
+ type t_v2 = {
+ nullableString: Js.Nullable.t(string),
+ string: Js.Nullable.t(string),
+ };
+ type t = {
+ v1: t_v1,
+ v2: t_v2,
+ };
+ type t_variables = {var: bool};
+ };
+ /**The GraphQL query string*/
+ let query = "query ($var: Boolean!) {\nv1: variousScalars {\nnullableString @skip(if: $var) \nstring @skip(if: $var) \n}\n\nv2: variousScalars {\nnullableString @include(if: $var) \nstring @include(if: $var) \n}\n\n}\n";
+ type t_v1 = {
+ nullableString: option(string),
+ string: option(string),
+ };
+ type t_v2 = {
+ nullableString: option(string),
+ string: option(string),
+ };
+ type t = {
+ v1: t_v1,
+ v2: t_v2,
+ };
+ type t_variables = {var: bool};
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ v1: {
+ let value = (value: Raw.t).v1;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_v1).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_v1).string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_v1
+ );
+ },
+ v2: {
+ let value = (value: Raw.t).v2;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_v2).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_v2).string;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ }: t_v2
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let v2 = {
+ let value = (value: t).v2;
+ (
+ {
+ let string = {
+ let value = (value: t_v2).string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = (value: t_v2).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableString, string};
+ }: Raw.t_v2
+ );
+ }
+ and v1 = {
+ let value = (value: t).v1;
+ (
+ {
+ let string = {
+ let value = (value: t_v1).string;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and nullableString = {
+ let value = (value: t_v1).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {nullableString, string};
+ }: Raw.t_v1
+ );
+ };
+ {v1, v2};
+ }: Raw.t
+ );
+ let serializeVariables: t_variables => Raw.t_variables =
+ inp => {var: (a => a)((inp: t_variables).var)};
+ let makeVariables = (~var, ()) =>
+ serializeVariables({var: var}: t_variables);
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/subscription.js b/tests_bucklescript/static_snapshots/records/operations/subscription.js
new file mode 100644
index 00000000..646fcb41
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/subscription.js
@@ -0,0 +1,93 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.simpleSubscription;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ simpleSubscription: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.simpleSubscription;
+ var variant = value$1[0];
+ var simpleSubscription;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1].name;
+ simpleSubscription = {
+ __typename: "Dog",
+ name: value$2
+ };
+ } else {
+ var value$3 = value$1[1].name;
+ simpleSubscription = {
+ __typename: "Human",
+ name: value$3
+ };
+ }
+ } else {
+ simpleSubscription = value$1[1];
+ }
+ return {
+ simpleSubscription: simpleSubscription
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "subscription {\nsimpleSubscription {\n__typename\n...on Dog {\nname \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/subscription.re b/tests_bucklescript/static_snapshots/records/operations/subscription.re
new file mode 100644
index 00000000..be0490c3
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/subscription.re
@@ -0,0 +1,169 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_simpleSubscription_Dog = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_simpleSubscription;
+ type t = {simpleSubscription: t_simpleSubscription};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "subscription {\nsimpleSubscription {\n__typename\n...on Dog {\nname \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_simpleSubscription_Dog = {name: string};
+ type t_simpleSubscription_Human = {name: string};
+ type t_simpleSubscription = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_simpleSubscription_Dog)
+ | `Human(t_simpleSubscription_Human)
+ ];
+ type t = {simpleSubscription: t_simpleSubscription};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ simpleSubscription: {
+ let value = (value: Raw.t).simpleSubscription;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_simpleSubscription_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_simpleSubscription_Dog).name;
+ value;
+ },
+ }: t_simpleSubscription_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_simpleSubscription_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_simpleSubscription_Human).name;
+ value;
+ },
+ }: t_simpleSubscription_Human
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_simpleSubscription
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let simpleSubscription = {
+ let value = (value: t).simpleSubscription;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_simpleSubscription_Dog).name;
+ value;
+ };
+ {__typename: "Dog", name};
+ }: Raw.t_simpleSubscription_Dog,
+ ): Raw.t_simpleSubscription
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_simpleSubscription_Human).name;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_simpleSubscription_Human,
+ ): Raw.t_simpleSubscription
+ )
+ | `FutureAddedValue(value) => (
+ Obj.magic(value): Raw.t_simpleSubscription
+ )
+ };
+ };
+ {simpleSubscription: simpleSubscription};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/tagged_template.js b/tests_bucklescript/static_snapshots/records/operations/tagged_template.js
new file mode 100644
index 00000000..f87c5d3b
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/tagged_template.js
@@ -0,0 +1,413 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+let { graphql } = require("gatsby")
+;
+
+var query = (graphql`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+`);
+
+function parse$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var MyQuery2 = {
+ Raw: Raw$1,
+ query: query,
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+var Raw$2 = { };
+
+let { graphql } = require("gatsby")
+;
+
+var query$1 = (graphql`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+`);
+
+function parse$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize$2(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$2(param) {
+
+}
+
+function makeVariables$2(param) {
+
+}
+
+function makeDefaultVariables$2(param) {
+
+}
+
+var Z__INTERNAL$2 = {
+ graphql_module: 0
+};
+
+var MyQuery3 = {
+ Raw: Raw$2,
+ query: query$1,
+ parse: parse$2,
+ serialize: serialize$2,
+ serializeVariables: serializeVariables$2,
+ makeVariables: makeVariables$2,
+ makeDefaultVariables: makeDefaultVariables$2,
+ Z__INTERNAL: Z__INTERNAL$2
+};
+
+var Raw$3 = { };
+
+let graphql = require("gatsby")
+;
+
+var query$2 = (graphql`
+ query {
+ variousScalars {
+ nullableString
+ string
+ nullableInt
+ int
+ nullableFloat
+ float
+ nullableBoolean
+ boolean
+ nullableID
+ id
+ }
+ }
+`);
+
+function parse$3(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.nullableString;
+ var value$3 = value$1.nullableInt;
+ var value$4 = value$1.nullableFloat;
+ var value$5 = value$1.nullableBoolean;
+ var value$6 = value$1.nullableID;
+ return {
+ variousScalars: {
+ nullableString: !(value$2 == null) ? value$2 : undefined,
+ string: value$1.string,
+ nullableInt: !(value$3 == null) ? value$3 : undefined,
+ int: value$1.int,
+ nullableFloat: !(value$4 == null) ? value$4 : undefined,
+ float: value$1.float,
+ nullableBoolean: !(value$5 == null) ? value$5 : undefined,
+ boolean: value$1.boolean,
+ nullableID: !(value$6 == null) ? value$6 : undefined,
+ id: value$1.id
+ }
+ };
+}
+
+function serialize$3(value) {
+ var value$1 = value.variousScalars;
+ var value$2 = value$1.id;
+ var value$3 = value$1.nullableID;
+ var nullableID = value$3 !== undefined ? value$3 : null;
+ var value$4 = value$1.boolean;
+ var value$5 = value$1.nullableBoolean;
+ var nullableBoolean = value$5 !== undefined ? value$5 : null;
+ var value$6 = value$1.float;
+ var value$7 = value$1.nullableFloat;
+ var nullableFloat = value$7 !== undefined ? value$7 : null;
+ var value$8 = value$1.int;
+ var value$9 = value$1.nullableInt;
+ var nullableInt = value$9 !== undefined ? value$9 : null;
+ var value$10 = value$1.string;
+ var value$11 = value$1.nullableString;
+ var nullableString = value$11 !== undefined ? value$11 : null;
+ var variousScalars = {
+ nullableString: nullableString,
+ string: value$10,
+ nullableInt: nullableInt,
+ int: value$8,
+ nullableFloat: nullableFloat,
+ float: value$6,
+ nullableBoolean: nullableBoolean,
+ boolean: value$4,
+ nullableID: nullableID,
+ id: value$2
+ };
+ return {
+ variousScalars: variousScalars
+ };
+}
+
+function serializeVariables$3(param) {
+
+}
+
+function makeVariables$3(param) {
+
+}
+
+function makeDefaultVariables$3(param) {
+
+}
+
+var Z__INTERNAL$3 = {
+ graphql_module: 0
+};
+
+var MyQuery4 = {
+ Raw: Raw$3,
+ query: query$2,
+ parse: parse$3,
+ serialize: serialize$3,
+ serializeVariables: serializeVariables$3,
+ makeVariables: makeVariables$3,
+ makeDefaultVariables: makeDefaultVariables$3,
+ Z__INTERNAL: Z__INTERNAL$3
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQuery2 = MyQuery2;
+exports.MyQuery3 = MyQuery3;
+exports.MyQuery4 = MyQuery4;
+/* Not a pure module */
diff --git a/tests_bucklescript/static_snapshots/records/operations/tagged_template.re b/tests_bucklescript/static_snapshots/records/operations/tagged_template.re
new file mode 100644
index 00000000..05816ede
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/tagged_template.re
@@ -0,0 +1,938 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nvariousScalars {\nnullableString \nstring \nnullableInt \nint \nnullableFloat \nfloat \nnullableBoolean \nboolean \nnullableID \nid \n}\n\n}\n";
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery2 = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let { graphql } = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery2 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery3 = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let { graphql } = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery3 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQuery4 = {
+ module Raw = {
+ type t_variousScalars = {
+ nullableString: Js.Nullable.t(string),
+ string,
+ nullableInt: Js.Nullable.t(int),
+ int,
+ nullableFloat: Js.Nullable.t(float),
+ float,
+ nullableBoolean: Js.Nullable.t(bool),
+ boolean: bool,
+ nullableID: Js.Nullable.t(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ };
+ %raw
+ "let graphql = require(\"gatsby\")";
+ /**The GraphQL query string*/
+ let query = [%raw
+ "graphql`\n query {\n variousScalars {\n nullableString\n string\n nullableInt\n int\n nullableFloat\n float\n nullableBoolean\n boolean\n nullableID\n id\n }\n }\n`"
+ ];
+ type t_variousScalars = {
+ nullableString: option(string),
+ string,
+ nullableInt: option(int),
+ int,
+ nullableFloat: option(float),
+ float,
+ nullableBoolean: option(bool),
+ boolean: bool,
+ nullableID: option(string),
+ id: string,
+ };
+ type t = {variousScalars: t_variousScalars};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ variousScalars: {
+ let value = (value: Raw.t).variousScalars;
+ (
+ {
+ nullableString: {
+ let value = (value: Raw.t_variousScalars).nullableString;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ string: {
+ let value = (value: Raw.t_variousScalars).string;
+ value;
+ },
+ nullableInt: {
+ let value = (value: Raw.t_variousScalars).nullableInt;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ int: {
+ let value = (value: Raw.t_variousScalars).int;
+ value;
+ },
+ nullableFloat: {
+ let value = (value: Raw.t_variousScalars).nullableFloat;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ float: {
+ let value = (value: Raw.t_variousScalars).float;
+ value;
+ },
+ nullableBoolean: {
+ let value = (value: Raw.t_variousScalars).nullableBoolean;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ boolean: {
+ let value = (value: Raw.t_variousScalars).boolean;
+ value;
+ },
+ nullableID: {
+ let value = (value: Raw.t_variousScalars).nullableID;
+ switch (Js.toOption(value)) {
+ | Some(value) => Some(value)
+ | None => None
+ };
+ },
+ id: {
+ let value = (value: Raw.t_variousScalars).id;
+ value;
+ },
+ }: t_variousScalars
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let variousScalars = {
+ let value = (value: t).variousScalars;
+ (
+ {
+ let id = {
+ let value = (value: t_variousScalars).id;
+ value;
+ }
+ and nullableID = {
+ let value = (value: t_variousScalars).nullableID;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and boolean = {
+ let value = (value: t_variousScalars).boolean;
+ value;
+ }
+ and nullableBoolean = {
+ let value = (value: t_variousScalars).nullableBoolean;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and float = {
+ let value = (value: t_variousScalars).float;
+ value;
+ }
+ and nullableFloat = {
+ let value = (value: t_variousScalars).nullableFloat;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and int = {
+ let value = (value: t_variousScalars).int;
+ value;
+ }
+ and nullableInt = {
+ let value = (value: t_variousScalars).nullableInt;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ }
+ and string = {
+ let value = (value: t_variousScalars).string;
+ value;
+ }
+ and nullableString = {
+ let value = (value: t_variousScalars).nullableString;
+ switch (value) {
+ | Some(value) => Js.Nullable.return(value)
+ | None => Js.Nullable.null
+ };
+ };
+ {
+ nullableString,
+ string,
+ nullableInt,
+ int,
+ nullableFloat,
+ float,
+ nullableBoolean,
+ boolean,
+ nullableID,
+ id,
+ };
+ }: Raw.t_variousScalars
+ );
+ };
+ {variousScalars: variousScalars};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQuery4 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/typename.js b/tests_bucklescript/static_snapshots/records/operations/typename.js
new file mode 100644
index 00000000..7310d776
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/typename.js
@@ -0,0 +1,94 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var tmp;
+ if (value$2 == null) {
+ tmp = undefined;
+ } else {
+ var value$3 = value$2.inner;
+ tmp = {
+ __typename: value$2.__typename,
+ inner: !(value$3 == null) ? ({
+ __typename: value$3.__typename,
+ field: value$3.field
+ }) : undefined
+ };
+ }
+ return {
+ first: {
+ __typename: value$1.__typename,
+ inner: tmp
+ }
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.first;
+ var value$2 = value$1.inner;
+ var inner;
+ if (value$2 !== undefined) {
+ var value$3 = value$2.inner;
+ var inner$1;
+ if (value$3 !== undefined) {
+ var value$4 = value$3.field;
+ var value$5 = value$3.__typename;
+ inner$1 = {
+ __typename: value$5,
+ field: value$4
+ };
+ } else {
+ inner$1 = null;
+ }
+ var value$6 = value$2.__typename;
+ inner = {
+ __typename: value$6,
+ inner: inner$1
+ };
+ } else {
+ inner = null;
+ }
+ var value$7 = value$1.__typename;
+ var first = {
+ __typename: value$7,
+ inner: inner
+ };
+ return {
+ first: first
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\nfirst: nestedObject {\n__typename \ninner {\n__typename \ninner {\n__typename \nfield \n}\n\n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/typename.re b/tests_bucklescript/static_snapshots/records/operations/typename.re
new file mode 100644
index 00000000..97422484
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/typename.re
@@ -0,0 +1,205 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: Js.Nullable.t(t_first_inner),
+ };
+ type t = {first: t_first};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\nfirst: nestedObject {\n__typename \ninner {\n__typename \ninner {\n__typename \nfield \n}\n\n}\n\n}\n\n}\n";
+ type t_first_inner_inner = {
+ __typename: string,
+ field: string,
+ };
+ type t_first_inner = {
+ __typename: string,
+ inner: option(t_first_inner_inner),
+ };
+ type t_first = {
+ __typename: string,
+ inner: option(t_first_inner),
+ };
+ type t = {first: t_first};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ first: {
+ let value = (value: Raw.t).first;
+ (
+ {
+ __typename: {
+ let value = (value: Raw.t_first).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value = (value: Raw.t_first_inner).__typename;
+ value;
+ },
+ inner: {
+ let value = (value: Raw.t_first_inner).inner;
+ switch (Js.toOption(value)) {
+ | Some(value) =>
+ Some(
+ {
+ __typename: {
+ let value =
+ (value: Raw.t_first_inner_inner).__typename;
+ value;
+ },
+ field: {
+ let value =
+ (value: Raw.t_first_inner_inner).field;
+ value;
+ },
+ }: t_first_inner_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first_inner,
+ )
+ | None => None
+ };
+ },
+ }: t_first
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let first = {
+ let value = (value: t).first;
+ (
+ {
+ let inner = {
+ let value = (value: t_first).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let inner = {
+ let value = (value: t_first_inner).inner;
+ switch (value) {
+ | Some(value) =>
+ Js.Nullable.return(
+ {
+ let field = {
+ let value = (value: t_first_inner_inner).field;
+ value;
+ }
+ and __typename = {
+ let value =
+ (value: t_first_inner_inner).__typename;
+ value;
+ };
+ {__typename, field};
+ }: Raw.t_first_inner_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first_inner).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first_inner,
+ )
+ | None => Js.Nullable.null
+ };
+ }
+ and __typename = {
+ let value = (value: t_first).__typename;
+ value;
+ };
+ {__typename, inner};
+ }: Raw.t_first
+ );
+ };
+ {first: first};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/union.js b/tests_bucklescript/static_snapshots/records/operations/union.js
new file mode 100644
index 00000000..dd64e005
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/union.js
@@ -0,0 +1,189 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var dogOrHuman;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+var Raw$1 = { };
+
+function parse$1(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp;
+ switch (typename) {
+ case "Dog" :
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ];
+ break;
+ case "Human" :
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: value$1.name
+ }
+ ];
+ break;
+ default:
+ tmp = /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ }
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize$1(value) {
+ var value$1 = value.dogOrHuman;
+ var variant = value$1[0];
+ var dogOrHuman;
+ if (variant !== -31101740) {
+ if (variant >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ var value$5 = value$1[1].name;
+ dogOrHuman = {
+ __typename: "Human",
+ name: value$5
+ };
+ }
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables$1(param) {
+
+}
+
+function makeVariables$1(param) {
+
+}
+
+function makeDefaultVariables$1(param) {
+
+}
+
+var Z__INTERNAL$1 = {
+ graphql_module: 0
+};
+
+var MyQueryNoError = {
+ Raw: Raw$1,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n",
+ parse: parse$1,
+ serialize: serialize$1,
+ serializeVariables: serializeVariables$1,
+ makeVariables: makeVariables$1,
+ makeDefaultVariables: makeDefaultVariables$1,
+ Z__INTERNAL: Z__INTERNAL$1
+};
+
+exports.MyQuery = MyQuery;
+exports.MyQueryNoError = MyQueryNoError;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/union.re b/tests_bucklescript/static_snapshots/records/operations/union.re
new file mode 100644
index 00000000..0630be17
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/union.re
@@ -0,0 +1,340 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
+module MyQueryNoError = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman_Human = {name: string};
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ | `Human(t_dogOrHuman_Human)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_dogOrHuman_Human = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Human).name;
+ value;
+ },
+ }: t_dogOrHuman_Human
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `Human(value) => (
+ Obj.magic(
+ {
+ let name = {
+ let value = (value: t_dogOrHuman_Human).name;
+ value;
+ };
+ {__typename: "Human", name};
+ }: Raw.t_dogOrHuman_Human,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 MyQueryNoError {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/unionPartial.js b/tests_bucklescript/static_snapshots/records/operations/unionPartial.js
new file mode 100644
index 00000000..51ebf309
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/unionPartial.js
@@ -0,0 +1,73 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.dogOrHuman;
+ var typename = value$1["__typename"];
+ var tmp = typename === "Dog" ? /* `Dog */[
+ 3406428,
+ {
+ name: value$1.name,
+ barkVolume: value$1.barkVolume
+ }
+ ] : /* `FutureAddedValue */[
+ -31101740,
+ value$1
+ ];
+ return {
+ dogOrHuman: tmp
+ };
+}
+
+function serialize(value) {
+ var value$1 = value.dogOrHuman;
+ var dogOrHuman;
+ if (value$1[0] >= 3406428) {
+ var value$2 = value$1[1];
+ var value$3 = value$2.barkVolume;
+ var value$4 = value$2.name;
+ dogOrHuman = {
+ __typename: "Dog",
+ name: value$4,
+ barkVolume: value$3
+ };
+ } else {
+ dogOrHuman = value$1[1];
+ }
+ return {
+ dogOrHuman: dogOrHuman
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/unionPartial.re b/tests_bucklescript/static_snapshots/records/operations/unionPartial.re
new file mode 100644
index 00000000..b6c17ca7
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/unionPartial.re
@@ -0,0 +1,148 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman;
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "query {\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n}\n\n}\n";
+ type t_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_dogOrHuman_Dog)
+ ];
+ type t = {dogOrHuman: t_dogOrHuman};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ dogOrHuman: {
+ let value = (value: Raw.t).dogOrHuman;
+ let typename: string =
+ Obj.magic(Js.Dict.unsafeGet(Obj.magic(value), "__typename"));
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_dogOrHuman_Dog = Obj.magic(value);
+ (
+ {
+ name: {
+ let value = (value: Raw.t_dogOrHuman_Dog).name;
+ value;
+ },
+ barkVolume: {
+ let value = (value: Raw.t_dogOrHuman_Dog).barkVolume;
+ value;
+ },
+ }: t_dogOrHuman_Dog
+ );
+ },
+ )
+ | _ => `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_dogOrHuman
+ );
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let dogOrHuman = {
+ let value = (value: t).dogOrHuman;
+ switch (value) {
+ | `Dog(value) => (
+ Obj.magic(
+ {
+ let barkVolume = {
+ let value = (value: t_dogOrHuman_Dog).barkVolume;
+ value;
+ }
+ and name = {
+ let value = (value: t_dogOrHuman_Dog).name;
+ value;
+ };
+ {__typename: "Dog", name, barkVolume};
+ }: Raw.t_dogOrHuman_Dog,
+ ): Raw.t_dogOrHuman
+ )
+ | `FutureAddedValue(value) => (Obj.magic(value): Raw.t_dogOrHuman)
+ };
+ };
+ {dogOrHuman: dogOrHuman};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/static_snapshots/records/operations/variant.js b/tests_bucklescript/static_snapshots/records/operations/variant.js
new file mode 100644
index 00000000..5d8549e5
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/variant.js
@@ -0,0 +1,138 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+'use strict';
+
+var Js_exn = require("bs-platform/lib/js/js_exn.js");
+var Js_json = require("bs-platform/lib/js/js_json.js");
+var Caml_option = require("bs-platform/lib/js/caml_option.js");
+
+var Raw = { };
+
+function parse(value) {
+ var value$1 = value.mutationForVariant;
+ var value$2 = Js_json.decodeObject(value$1);
+ var tmp;
+ if (value$2 !== undefined) {
+ var value$3 = Caml_option.valFromOption(value$2);
+ var temp = value$3["baseType"];
+ var match = Js_json.decodeNull(temp);
+ if (match !== undefined) {
+ var temp$1 = value$3["baseTypeList"];
+ var match$1 = Js_json.decodeNull(temp$1);
+ if (match$1 !== undefined) {
+ var temp$2 = value$3["dog"];
+ var match$2 = Js_json.decodeNull(temp$2);
+ if (match$2 !== undefined) {
+ var temp$3 = value$3["human"];
+ var match$3 = Js_json.decodeNull(temp$3);
+ if (match$3 !== undefined) {
+ var temp$4 = value$3["dogOrHuman"];
+ var match$4 = Js_json.decodeNull(temp$4);
+ if (match$4 !== undefined) {
+ tmp = Js_exn.raiseError("graphql-ppx: All fields on variant selection set on type VariantTestResult were null");
+ } else {
+ var typename = temp$4["__typename"];
+ var tmp$1;
+ switch (typename) {
+ case "Dog" :
+ tmp$1 = /* `Dog */[
+ 3406428,
+ {
+ name: temp$4.name,
+ barkVolume: temp$4.barkVolume
+ }
+ ];
+ break;
+ case "Human" :
+ tmp$1 = /* `Human */[
+ -1031617139,
+ {
+ name: temp$4.name
+ }
+ ];
+ break;
+ default:
+ tmp$1 = /* `FutureAddedValue */[
+ -31101740,
+ temp$4
+ ];
+ }
+ tmp = /* `DogOrHuman */[
+ 974247566,
+ tmp$1
+ ];
+ }
+ } else {
+ tmp = /* `Human */[
+ -1031617139,
+ {
+ name: temp$3.name
+ }
+ ];
+ }
+ } else {
+ tmp = /* `Dog */[
+ 3406428,
+ {
+ name: temp$2.name,
+ barkVolume: temp$2.barkVolume
+ }
+ ];
+ }
+ } else {
+ tmp = /* `BaseTypeList */[
+ -259847799,
+ temp$1.map((function (value) {
+ return value;
+ }))
+ ];
+ }
+ } else {
+ tmp = /* `BaseType */[
+ -620191861,
+ temp
+ ];
+ }
+ } else {
+ tmp = Js_exn.raiseError("graphql-ppx: Expected type VariantTestResult to be an object");
+ }
+ return {
+ mutationForVariant: tmp
+ };
+}
+
+function serialize(value) {
+ var mutationForVariant = null;
+ return {
+ mutationForVariant: mutationForVariant
+ };
+}
+
+function serializeVariables(param) {
+
+}
+
+function makeVariables(param) {
+
+}
+
+function makeDefaultVariables(param) {
+
+}
+
+var Z__INTERNAL = {
+ graphql_module: 0
+};
+
+var MyQuery = {
+ Raw: Raw,
+ query: "mutation {\nmutationForVariant {\nbaseType \nbaseTypeList \ndog {\nname \nbarkVolume \n}\n\nhuman {\nname \n}\n\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n\n}\n",
+ parse: parse,
+ serialize: serialize,
+ serializeVariables: serializeVariables,
+ makeVariables: makeVariables,
+ makeDefaultVariables: makeDefaultVariables,
+ Z__INTERNAL: Z__INTERNAL
+};
+
+exports.MyQuery = MyQuery;
+/* No side effect */
diff --git a/tests_bucklescript/static_snapshots/records/operations/variant.re b/tests_bucklescript/static_snapshots/records/operations/variant.re
new file mode 100644
index 00000000..45460c96
--- /dev/null
+++ b/tests_bucklescript/static_snapshots/records/operations/variant.re
@@ -0,0 +1,268 @@
+[@ocaml.ppx.context
+ {
+ tool_name: "migrate_driver",
+ include_dirs: [],
+ load_path: [],
+ open_modules: [],
+ for_package: None,
+ debug: false,
+ use_threads: false,
+ use_vmthreads: false,
+ recursive_types: false,
+ principal: false,
+ transparent_modules: false,
+ unboxed_types: false,
+ unsafe_string: false,
+ cookies: [],
+ }
+];
+module MyQuery = {
+ module Raw = {
+ type t_mutationForVariant_dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ __typename: string,
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {
+ __typename: string,
+ name: string,
+ };
+ type t_mutationForVariant_dogOrHuman;
+ type t_mutationForVariant;
+ type t = {mutationForVariant: t_mutationForVariant};
+ type t_variables = unit;
+ };
+ /**The GraphQL query string*/
+ let query = "mutation {\nmutationForVariant {\nbaseType \nbaseTypeList \ndog {\nname \nbarkVolume \n}\n\nhuman {\nname \n}\n\ndogOrHuman {\n__typename\n...on Dog {\nname \nbarkVolume \n}\n\n...on Human {\nname \n}\n\n}\n\n}\n\n}\n";
+ type t_mutationForVariant_dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_human = {name: string};
+ type t_mutationForVariant_dogOrHuman_Dog = {
+ name: string,
+ barkVolume: float,
+ };
+ type t_mutationForVariant_dogOrHuman_Human = {name: string};
+ type t_mutationForVariant_dogOrHuman = [
+ | `FutureAddedValue(Js.Json.t)
+ | `Dog(t_mutationForVariant_dogOrHuman_Dog)
+ | `Human(t_mutationForVariant_dogOrHuman_Human)
+ ];
+ type t_mutationForVariant = [
+ | `BaseType(string)
+ | `BaseTypeList(array(string))
+ | `Dog(t_mutationForVariant_dog)
+ | `Human(t_mutationForVariant_human)
+ | `DogOrHuman(t_mutationForVariant_dogOrHuman)
+ ];
+ type t = {mutationForVariant: t_mutationForVariant};
+ type t_variables = unit;
+ /**Parse the JSON GraphQL data to ReasonML data types*/
+ let parse = (value: Raw.t): t => (
+ {
+ mutationForVariant: {
+ let value = (value: Raw.t).mutationForVariant;
+ switch (Js.Json.decodeObject(Obj.magic(value): Js.Json.t)) {
+ | None =>
+ Js.Exn.raiseError(
+ "graphql-ppx: "
+ ++ "Expected type "
+ ++ "VariantTestResult"
+ ++ " to be an object",
+ )
+ | Some(value) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "baseType");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `BaseType(value);
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "baseTypeList");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `BaseTypeList(value |> Js.Array.map(value => value));
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "dog");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `Dog(
+ {
+ name: {
+ let value = (value: Raw.t_mutationForVariant_dog).name;
+ value;
+ },
+ barkVolume: {
+ let value =
+ (value: Raw.t_mutationForVariant_dog).barkVolume;
+ value;
+ },
+ }: t_mutationForVariant_dog,
+ );
+ | Some(_) =>
+ let temp = Js.Dict.unsafeGet(Obj.magic(value), "human");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `Human(
+ {
+ name: {
+ let value =
+ (value: Raw.t_mutationForVariant_human).name;
+ value;
+ },
+ }: t_mutationForVariant_human,
+ );
+ | Some(_) =>
+ let temp =
+ Js.Dict.unsafeGet(Obj.magic(value), "dogOrHuman");
+ switch (Js.Json.decodeNull(temp)) {
+ | None =>
+ let value = temp;
+ `DogOrHuman(
+ {
+ let typename: string =
+ Obj.magic(
+ Js.Dict.unsafeGet(
+ Obj.magic(value),
+ "__typename",
+ ),
+ );
+ (
+ switch (typename) {
+ | "Dog" =>
+ `Dog(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Dog =
+ Obj.magic(value);
+ (
+ {
+ name: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ name;
+ value;
+ },
+ barkVolume: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Dog
+ ).
+ barkVolume;
+ value;
+ },
+ }: t_mutationForVariant_dogOrHuman_Dog
+ );
+ },
+ )
+ | "Human" =>
+ `Human(
+ {
+ let value: Raw.t_mutationForVariant_dogOrHuman_Human =
+ Obj.magic(value);
+ (
+ {
+ name: {
+ let value =
+ (
+ value: Raw.t_mutationForVariant_dogOrHuman_Human
+ ).
+ name;
+ value;
+ },
+ }: t_mutationForVariant_dogOrHuman_Human
+ );
+ },
+ )
+ | _ =>
+ `FutureAddedValue(Obj.magic(value): Js.Json.t)
+ }: t_mutationForVariant_dogOrHuman
+ );
+ },
+ );
+ | Some(_) =>
+ Js.Exn.raiseError(
+ "graphql-ppx: "
+ ++ "All fields on variant selection set on type "
+ ++ "VariantTestResult"
+ ++ " were null",
+ )
+ };
+ };
+ };
+ };
+ };
+ };
+ },
+ }: t
+ );
+ /**Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */
+ let serialize = (value: t): Raw.t => (
+ {
+ let mutationForVariant = {
+ let value = (value: t).mutationForVariant;
+ Obj.magic(Js.Json.null);
+ };
+ {mutationForVariant: mutationForVariant};
+ }: Raw.t
+ );
+ let serializeVariables = () => ();
+ let makeVariables = () => ();
+ let makeDefaultVariables = () => makeVariables();
+ external unsafe_fromJson: Js.Json.t => Raw.t = "%identity";
+ external toJson: Raw.t => Js.Json.t = "%identity";
+ external variablesToJson: Raw.t_variables => Js.Json.t = "%identity";
+ module Z__INTERNAL = {
+ type root = t;
+ type nonrec graphql_module;
+ /****--- 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 {
+ /**
+ The GraphQL query string
+ */
+ 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;
+
+ /**
+ Parse the JSON GraphQL data to ReasonML data types
+ */
+ let parse: Raw.t => t;
+
+ /**
+ Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data
+ */
+ let serialize: t => Raw.t;
+
+ /**
+ This is the JSON compatible type of the GraphQL data.
+ It should not be necessary to access the types inside for normal use cases.
+ */
+ module Raw: { type t; };
+}
+```*/
+ let graphql_module: graphql_module = Obj.magic(0);
+ };
+};
diff --git a/tests_bucklescript/utilities/.gitignore b/tests_bucklescript/utilities/.gitignore
new file mode 100644
index 00000000..ab62c5f4
--- /dev/null
+++ b/tests_bucklescript/utilities/.gitignore
@@ -0,0 +1 @@
+!*.bs.js
diff --git a/tests_bucklescript/utilities/GraphQL_PPX.js b/tests_bucklescript/utilities/GraphQL_PPX.js
new file mode 100644
index 00000000..60058f0d
--- /dev/null
+++ b/tests_bucklescript/utilities/GraphQL_PPX.js
@@ -0,0 +1,42 @@
+// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
+
+
+function deepMerge(json1, json2) {
+ var match_000 = json1 === null;
+ var match_001 = Array.isArray(json1);
+ var match_002 = typeof json1 === "object";
+ var match_000$1 = json2 === null;
+ var match_001$1 = Array.isArray(json2);
+ var match_002$1 = typeof json2 === "object";
+ if (match_001) {
+ if (match_001$1) {
+ return json1.map((function (el1, idx) {
+ var el2 = json2[idx];
+ if (typeof el2 === "object") {
+ return deepMerge(el1, el2);
+ } else {
+ return el2;
+ }
+ }));
+ } else {
+ return json2;
+ }
+ } else if (match_000 || !(match_002 && !(match_000$1 || match_001$1 || !match_002$1))) {
+ return json2;
+ } else {
+ var obj1 = Object.assign({ }, json1);
+ Object.keys(json2).forEach((function (key) {
+ var existingVal = obj1[key];
+ var newVal = json2[key];
+ obj1[key] = typeof existingVal !== "object" ? newVal : deepMerge(existingVal, newVal);
+ return /* () */0;
+ }));
+ return obj1;
+ }
+}
+
+export {
+ deepMerge ,
+
+}
+/* No side effect */
diff --git a/tests_bucklescript/utilities/GraphQL_PPX.re b/tests_bucklescript/utilities/GraphQL_PPX.re
new file mode 100644
index 00000000..d72cee06
--- /dev/null
+++ b/tests_bucklescript/utilities/GraphQL_PPX.re
@@ -0,0 +1,52 @@
+// will be inlined by bucklescript
+let%private clone: Js.Dict.t('a) => Js.Dict.t('a) =
+ a => Obj.magic(Js.Obj.assign(Obj.magic(Js.Obj.empty()), Obj.magic(a)));
+
+// merging two json objects deeply
+let rec deepMerge = (json1: Js.Json.t, json2: Js.Json.t) => {
+ switch (
+ (
+ Obj.magic(json1) == Js.null,
+ Js_array2.isArray(json1),
+ Js.typeof(json1) == "object",
+ ),
+ (
+ Obj.magic(json2) == Js.null,
+ Js_array2.isArray(json2),
+ Js.typeof(json2) == "object",
+ ),
+ ) {
+ // merge two arrays
+ | ((_, true, _), (_, true, _)) => (
+ Obj.magic(
+ Js.Array.mapi(
+ (el1, idx) => {
+ let el2 = Js.Array.unsafe_get(Obj.magic(json2), idx);
+ // it cannot be undefined, because two arrays should always be the
+ // same length in graphql responses
+ Js.typeof(el2) == "object" ? deepMerge(el1, el2) : el2;
+ },
+ Obj.magic(json1),
+ ),
+ ): Js.Json.t
+ )
+ // two objects that are not null and not arrays
+ | ((false, false, true), (false, false, true)) =>
+ let obj1 = clone(Obj.magic(json1));
+ let obj2 = Obj.magic(json2);
+ Js.Dict.keys(obj2)
+ |> Js.Array.forEach(key => {
+ let existingVal: Js.Json.t = Js.Dict.unsafeGet(obj1, key);
+ let newVal: Js.Json.t = Js.Dict.unsafeGet(obj2, key);
+ Js.Dict.set(
+ obj1,
+ key,
+ Js.typeof(existingVal) != "object"
+ ? newVal : Obj.magic(deepMerge(existingVal, newVal)),
+ );
+ });
+ Obj.magic(obj1);
+ // object that becomes null
+ | ((_, _, _), (_, _, _)) => json2
+ };
+};
diff --git a/tests_bucklescript/yarn.lock b/tests_bucklescript/yarn.lock
new file mode 100644
index 00000000..cb03ac02
--- /dev/null
+++ b/tests_bucklescript/yarn.lock
@@ -0,0 +1,4044 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"
+ integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==
+ dependencies:
+ "@babel/highlight" "^7.8.3"
+
+"@babel/core@^7.1.0":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.3.tgz#30b0ebb4dd1585de6923a0b4d179e0b9f5d82941"
+ integrity sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA==
+ dependencies:
+ "@babel/code-frame" "^7.8.3"
+ "@babel/generator" "^7.8.3"
+ "@babel/helpers" "^7.8.3"
+ "@babel/parser" "^7.8.3"
+ "@babel/template" "^7.8.3"
+ "@babel/traverse" "^7.8.3"
+ "@babel/types" "^7.8.3"
+ convert-source-map "^1.7.0"
+ debug "^4.1.0"
+ gensync "^1.0.0-beta.1"
+ json5 "^2.1.0"
+ lodash "^4.17.13"
+ resolve "^1.3.2"
+ semver "^5.4.1"
+ source-map "^0.5.0"
+
+"@babel/generator@^7.4.0", "@babel/generator@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.3.tgz#0e22c005b0a94c1c74eafe19ef78ce53a4d45c03"
+ integrity sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==
+ dependencies:
+ "@babel/types" "^7.8.3"
+ jsesc "^2.5.1"
+ lodash "^4.17.13"
+ source-map "^0.5.0"
+
+"@babel/helper-function-name@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca"
+ integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==
+ dependencies:
+ "@babel/helper-get-function-arity" "^7.8.3"
+ "@babel/template" "^7.8.3"
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-get-function-arity@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5"
+ integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==
+ dependencies:
+ "@babel/types" "^7.8.3"
+
+"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.8.0":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670"
+ integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==
+
+"@babel/helper-split-export-declaration@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9"
+ integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==
+ dependencies:
+ "@babel/types" "^7.8.3"
+
+"@babel/helpers@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.3.tgz#382fbb0382ce7c4ce905945ab9641d688336ce85"
+ integrity sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ==
+ dependencies:
+ "@babel/template" "^7.8.3"
+ "@babel/traverse" "^7.8.3"
+ "@babel/types" "^7.8.3"
+
+"@babel/highlight@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797"
+ integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==
+ dependencies:
+ chalk "^2.0.0"
+ esutils "^2.0.2"
+ js-tokens "^4.0.0"
+
+"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.3.tgz#790874091d2001c9be6ec426c2eed47bc7679081"
+ integrity sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==
+
+"@babel/plugin-syntax-object-rest-spread@^7.0.0":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871"
+ integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.8.0"
+
+"@babel/template@^7.4.0", "@babel/template@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8"
+ integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==
+ dependencies:
+ "@babel/code-frame" "^7.8.3"
+ "@babel/parser" "^7.8.3"
+ "@babel/types" "^7.8.3"
+
+"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.3.tgz#a826215b011c9b4f73f3a893afbc05151358bf9a"
+ integrity sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==
+ dependencies:
+ "@babel/code-frame" "^7.8.3"
+ "@babel/generator" "^7.8.3"
+ "@babel/helper-function-name" "^7.8.3"
+ "@babel/helper-split-export-declaration" "^7.8.3"
+ "@babel/parser" "^7.8.3"
+ "@babel/types" "^7.8.3"
+ debug "^4.1.0"
+ globals "^11.1.0"
+ lodash "^4.17.13"
+
+"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c"
+ integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==
+ dependencies:
+ esutils "^2.0.2"
+ lodash "^4.17.13"
+ to-fast-properties "^2.0.0"
+
+"@cnakazawa/watch@^1.0.3":
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef"
+ integrity sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA==
+ dependencies:
+ exec-sh "^0.3.2"
+ minimist "^1.2.0"
+
+"@glennsl/bs-jest@~0.4.9":
+ version "0.4.10"
+ resolved "https://registry.yarnpkg.com/@glennsl/bs-jest/-/bs-jest-0.4.10.tgz#9b6acea79744bd48f493c36d892e60178a8fb404"
+ integrity sha512-e9xpW/TcmiI5WJ+WY7EMru07tuOb3arZx90ELGu9JwxFFbkLwmhK38hu58smRs1dODhZdq1OFmqXP7f+/0sqQw==
+ dependencies:
+ jest "^24.3.1"
+
+"@jest/console@^24.7.1", "@jest/console@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0"
+ integrity sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==
+ dependencies:
+ "@jest/source-map" "^24.9.0"
+ chalk "^2.0.1"
+ slash "^2.0.0"
+
+"@jest/core@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/core/-/core-24.9.0.tgz#2ceccd0b93181f9c4850e74f2a9ad43d351369c4"
+ integrity sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A==
+ dependencies:
+ "@jest/console" "^24.7.1"
+ "@jest/reporters" "^24.9.0"
+ "@jest/test-result" "^24.9.0"
+ "@jest/transform" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ ansi-escapes "^3.0.0"
+ chalk "^2.0.1"
+ exit "^0.1.2"
+ graceful-fs "^4.1.15"
+ jest-changed-files "^24.9.0"
+ jest-config "^24.9.0"
+ jest-haste-map "^24.9.0"
+ jest-message-util "^24.9.0"
+ jest-regex-util "^24.3.0"
+ jest-resolve "^24.9.0"
+ jest-resolve-dependencies "^24.9.0"
+ jest-runner "^24.9.0"
+ jest-runtime "^24.9.0"
+ jest-snapshot "^24.9.0"
+ jest-util "^24.9.0"
+ jest-validate "^24.9.0"
+ jest-watcher "^24.9.0"
+ micromatch "^3.1.10"
+ p-each-series "^1.0.0"
+ realpath-native "^1.1.0"
+ rimraf "^2.5.4"
+ slash "^2.0.0"
+ strip-ansi "^5.0.0"
+
+"@jest/environment@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-24.9.0.tgz#21e3afa2d65c0586cbd6cbefe208bafade44ab18"
+ integrity sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ==
+ dependencies:
+ "@jest/fake-timers" "^24.9.0"
+ "@jest/transform" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ jest-mock "^24.9.0"
+
+"@jest/fake-timers@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.9.0.tgz#ba3e6bf0eecd09a636049896434d306636540c93"
+ integrity sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==
+ dependencies:
+ "@jest/types" "^24.9.0"
+ jest-message-util "^24.9.0"
+ jest-mock "^24.9.0"
+
+"@jest/reporters@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-24.9.0.tgz#86660eff8e2b9661d042a8e98a028b8d631a5b43"
+ integrity sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==
+ dependencies:
+ "@jest/environment" "^24.9.0"
+ "@jest/test-result" "^24.9.0"
+ "@jest/transform" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ chalk "^2.0.1"
+ exit "^0.1.2"
+ glob "^7.1.2"
+ istanbul-lib-coverage "^2.0.2"
+ istanbul-lib-instrument "^3.0.1"
+ istanbul-lib-report "^2.0.4"
+ istanbul-lib-source-maps "^3.0.1"
+ istanbul-reports "^2.2.6"
+ jest-haste-map "^24.9.0"
+ jest-resolve "^24.9.0"
+ jest-runtime "^24.9.0"
+ jest-util "^24.9.0"
+ jest-worker "^24.6.0"
+ node-notifier "^5.4.2"
+ slash "^2.0.0"
+ source-map "^0.6.0"
+ string-length "^2.0.0"
+
+"@jest/source-map@^24.3.0", "@jest/source-map@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714"
+ integrity sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==
+ dependencies:
+ callsites "^3.0.0"
+ graceful-fs "^4.1.15"
+ source-map "^0.6.0"
+
+"@jest/test-result@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.9.0.tgz#11796e8aa9dbf88ea025757b3152595ad06ba0ca"
+ integrity sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==
+ dependencies:
+ "@jest/console" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ "@types/istanbul-lib-coverage" "^2.0.0"
+
+"@jest/test-sequencer@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz#f8f334f35b625a4f2f355f2fe7e6036dad2e6b31"
+ integrity sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==
+ dependencies:
+ "@jest/test-result" "^24.9.0"
+ jest-haste-map "^24.9.0"
+ jest-runner "^24.9.0"
+ jest-runtime "^24.9.0"
+
+"@jest/transform@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-24.9.0.tgz#4ae2768b296553fadab09e9ec119543c90b16c56"
+ integrity sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==
+ dependencies:
+ "@babel/core" "^7.1.0"
+ "@jest/types" "^24.9.0"
+ babel-plugin-istanbul "^5.1.0"
+ chalk "^2.0.1"
+ convert-source-map "^1.4.0"
+ fast-json-stable-stringify "^2.0.0"
+ graceful-fs "^4.1.15"
+ jest-haste-map "^24.9.0"
+ jest-regex-util "^24.9.0"
+ jest-util "^24.9.0"
+ micromatch "^3.1.10"
+ pirates "^4.0.1"
+ realpath-native "^1.1.0"
+ slash "^2.0.0"
+ source-map "^0.6.1"
+ write-file-atomic "2.4.1"
+
+"@jest/types@^24.9.0":
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59"
+ integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==
+ dependencies:
+ "@types/istanbul-lib-coverage" "^2.0.0"
+ "@types/istanbul-reports" "^1.1.1"
+ "@types/yargs" "^13.0.0"
+
+"@types/babel__core@^7.1.0":
+ version "7.1.3"
+ resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30"
+ integrity sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA==
+ dependencies:
+ "@babel/parser" "^7.1.0"
+ "@babel/types" "^7.0.0"
+ "@types/babel__generator" "*"
+ "@types/babel__template" "*"
+ "@types/babel__traverse" "*"
+
+"@types/babel__generator@*":
+ version "7.6.1"
+ resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04"
+ integrity sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@types/babel__template@*":
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307"
+ integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==
+ dependencies:
+ "@babel/parser" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6":
+ version "7.0.8"
+ resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.8.tgz#479a4ee3e291a403a1096106013ec22cf9b64012"
+ integrity sha512-yGeB2dHEdvxjP0y4UbRtQaSkXJ9649fYCmIdRoul5kfAoGCwxuCbMhag0k3RPfnuh9kPGm8x89btcfDEXdVWGw==
+ dependencies:
+ "@babel/types" "^7.3.0"
+
+"@types/graphql@^0.8.5":
+ version "0.8.6"
+ resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.8.6.tgz#b34fb880493ba835b0c067024ee70130d6f9bb68"
+ integrity sha1-s0+4gEk7qDWwwGcCTucBMNb5u2g=
+
+"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff"
+ integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==
+
+"@types/istanbul-lib-report@*":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#e5471e7fa33c61358dd38426189c037a58433b8c"
+ integrity sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg==
+ dependencies:
+ "@types/istanbul-lib-coverage" "*"
+
+"@types/istanbul-reports@^1.1.1":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz#7a8cbf6a406f36c8add871625b278eaf0b0d255a"
+ integrity sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA==
+ dependencies:
+ "@types/istanbul-lib-coverage" "*"
+ "@types/istanbul-lib-report" "*"
+
+"@types/stack-utils@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
+ integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==
+
+"@types/yargs-parser@*":
+ version "15.0.0"
+ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d"
+ integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==
+
+"@types/yargs@^13.0.0":
+ version "13.0.5"
+ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.5.tgz#18121bfd39dc12f280cee58f92c5b21d32041908"
+ integrity sha512-CF/+sxTO7FOwbIRL4wMv0ZYLCRfMid2HQpzDRyViH7kSpfoAFiMdGqKIxb1PxWfjtQXQhnQuD33lvRHNwr809Q==
+ dependencies:
+ "@types/yargs-parser" "*"
+
+"@wry/equality@^0.1.2":
+ version "0.1.9"
+ resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.9.tgz#b13e18b7a8053c6858aa6c85b54911fb31e3a909"
+ integrity sha512-mB6ceGjpMGz1ZTza8HYnrPGos2mC6So4NhS1PtZ8s4Qt0K7fBiIGhpSxUbQmhwcSWE3no+bYxmI2OL6KuXYmoQ==
+ dependencies:
+ tslib "^1.9.3"
+
+abab@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a"
+ integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==
+
+accepts@^1.3.0, accepts@~1.3.7:
+ version "1.3.7"
+ resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
+ integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
+ dependencies:
+ mime-types "~2.1.24"
+ negotiator "0.6.2"
+
+acorn-globals@^4.1.0:
+ version "4.3.4"
+ resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7"
+ integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==
+ dependencies:
+ acorn "^6.0.1"
+ acorn-walk "^6.0.1"
+
+acorn-walk@^6.0.1:
+ version "6.2.0"
+ resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c"
+ integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==
+
+acorn@^5.5.3:
+ version "5.7.3"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
+ integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==
+
+acorn@^6.0.1:
+ version "6.4.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784"
+ integrity sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==
+
+ajv@^6.5.5:
+ version "6.11.0"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9"
+ integrity sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==
+ dependencies:
+ fast-deep-equal "^3.1.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
+ansi-escapes@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
+ integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+ integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
+
+ansi-regex@^4.0.0, ansi-regex@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
+ integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
+
+ansi-styles@^3.2.0, ansi-styles@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+ integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
+ dependencies:
+ color-convert "^1.9.0"
+
+anymatch@^1.3.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a"
+ integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==
+ dependencies:
+ micromatch "^2.1.5"
+ normalize-path "^2.0.0"
+
+anymatch@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
+ integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==
+ dependencies:
+ micromatch "^3.1.4"
+ normalize-path "^2.1.1"
+
+apollo-link@^1.2.14:
+ version "1.2.14"
+ resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9"
+ integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg==
+ dependencies:
+ apollo-utilities "^1.3.0"
+ ts-invariant "^0.4.0"
+ tslib "^1.9.3"
+ zen-observable-ts "^0.8.21"
+
+apollo-utilities@^1.0.1, apollo-utilities@^1.3.0:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.3.tgz#f1854715a7be80cd810bc3ac95df085815c0787c"
+ integrity sha512-F14aX2R/fKNYMvhuP2t9GD9fggID7zp5I96MF5QeKYWDWTrkRdHRp4+SVfXUVN+cXOaB/IebfvRtzPf25CM0zw==
+ dependencies:
+ "@wry/equality" "^0.1.2"
+ fast-json-stable-stringify "^2.0.0"
+ ts-invariant "^0.4.0"
+ tslib "^1.10.0"
+
+arr-diff@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
+ integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=
+ dependencies:
+ arr-flatten "^1.0.1"
+
+arr-diff@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
+ integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=
+
+arr-flatten@^1.0.1, arr-flatten@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+ integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==
+
+arr-union@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
+ integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
+
+array-equal@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93"
+ integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=
+
+array-flatten@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
+ integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
+
+array-unique@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
+ integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=
+
+array-unique@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
+ integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
+
+asn1@~0.2.3:
+ version "0.2.4"
+ resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
+ integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
+ dependencies:
+ safer-buffer "~2.1.0"
+
+assert-plus@1.0.0, assert-plus@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
+ integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
+
+assign-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+ integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
+
+astral-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
+ integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
+
+async-each@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf"
+ integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==
+
+async-limiter@~1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
+ integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==
+
+asynckit@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+ integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
+
+atob@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
+ integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
+
+aws-sign2@~0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
+ integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
+
+aws4@^1.8.0:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e"
+ integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==
+
+babel-jest@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.9.0.tgz#3fc327cb8467b89d14d7bc70e315104a783ccd54"
+ integrity sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw==
+ dependencies:
+ "@jest/transform" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ "@types/babel__core" "^7.1.0"
+ babel-plugin-istanbul "^5.1.0"
+ babel-preset-jest "^24.9.0"
+ chalk "^2.4.2"
+ slash "^2.0.0"
+
+babel-plugin-istanbul@^5.1.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854"
+ integrity sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ find-up "^3.0.0"
+ istanbul-lib-instrument "^3.3.0"
+ test-exclude "^5.2.3"
+
+babel-plugin-jest-hoist@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz#4f837091eb407e01447c8843cbec546d0002d756"
+ integrity sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw==
+ dependencies:
+ "@types/babel__traverse" "^7.0.6"
+
+babel-preset-jest@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz#192b521e2217fb1d1f67cf73f70c336650ad3cdc"
+ integrity sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg==
+ dependencies:
+ "@babel/plugin-syntax-object-rest-spread" "^7.0.0"
+ babel-plugin-jest-hoist "^24.9.0"
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+
+base@^0.11.1:
+ version "0.11.2"
+ resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
+ integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==
+ dependencies:
+ cache-base "^1.0.1"
+ class-utils "^0.3.5"
+ component-emitter "^1.2.1"
+ define-property "^1.0.0"
+ isobject "^3.0.1"
+ mixin-deep "^1.2.0"
+ pascalcase "^0.1.1"
+
+bcrypt-pbkdf@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
+ integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
+ dependencies:
+ tweetnacl "^0.14.3"
+
+binary-extensions@^1.0.0:
+ version "1.13.1"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
+ integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==
+
+bindings@1.2.x, bindings@~1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
+ integrity sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=
+
+bindings@^1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
+ integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
+ dependencies:
+ file-uri-to-path "1.0.0"
+
+body-parser@1.19.0:
+ version "1.19.0"
+ resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
+ integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==
+ dependencies:
+ bytes "3.1.0"
+ content-type "~1.0.4"
+ debug "2.6.9"
+ depd "~1.1.2"
+ http-errors "1.7.2"
+ iconv-lite "0.4.24"
+ on-finished "~2.3.0"
+ qs "6.7.0"
+ raw-body "2.4.0"
+ type-is "~1.6.17"
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^1.8.2:
+ version "1.8.5"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
+ integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=
+ dependencies:
+ expand-range "^1.8.1"
+ preserve "^0.2.0"
+ repeat-element "^1.1.2"
+
+braces@^2.3.1:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
+ integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==
+ dependencies:
+ arr-flatten "^1.1.0"
+ array-unique "^0.3.2"
+ extend-shallow "^2.0.1"
+ fill-range "^4.0.0"
+ isobject "^3.0.1"
+ repeat-element "^1.1.2"
+ snapdragon "^0.8.1"
+ snapdragon-node "^2.0.1"
+ split-string "^3.0.2"
+ to-regex "^3.0.1"
+
+browser-process-hrtime@^0.1.2:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4"
+ integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==
+
+browser-resolve@^1.11.3:
+ version "1.11.3"
+ resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6"
+ integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==
+ dependencies:
+ resolve "1.1.7"
+
+bs-platform@~7.3.2:
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-7.3.2.tgz#301f5c9b4e8cf5713cb60ca22e145e56e793affe"
+ integrity sha512-seJL5g4anK9la4erv+B2o2sMHQCxDF6OCRl9en3hbaUos/S3JsusQ0sPp4ORsbx5eXfHLYBwPljwKXlgpXtsgQ==
+
+bser@2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05"
+ integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==
+ dependencies:
+ node-int64 "^0.4.0"
+
+buffer-from@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
+ integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
+
+bufferutil@1.2.x:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-1.2.1.tgz#37be5d36e1e06492221e68d474b1ac58e510cbd7"
+ integrity sha1-N75dNuHgZJIiHmjUdLGsWOUQy9c=
+ dependencies:
+ bindings "1.2.x"
+ nan "^2.0.5"
+
+bytes@3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
+ integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
+
+cache-base@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
+ integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==
+ dependencies:
+ collection-visit "^1.0.0"
+ component-emitter "^1.2.1"
+ get-value "^2.0.6"
+ has-value "^1.0.0"
+ isobject "^3.0.1"
+ set-value "^2.0.0"
+ to-object-path "^0.3.0"
+ union-value "^1.0.0"
+ unset-value "^1.0.0"
+
+callsites@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
+ integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
+
+camelcase@^5.0.0, camelcase@^5.3.1:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
+ integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
+
+capture-exit@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4"
+ integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==
+ dependencies:
+ rsvp "^4.8.4"
+
+caseless@~0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
+ integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
+
+chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.2:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
+ integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
+ dependencies:
+ ansi-styles "^3.2.1"
+ escape-string-regexp "^1.0.5"
+ supports-color "^5.3.0"
+
+chokidar@^1.1.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
+ integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=
+ dependencies:
+ anymatch "^1.3.0"
+ async-each "^1.0.0"
+ glob-parent "^2.0.0"
+ inherits "^2.0.1"
+ is-binary-path "^1.0.0"
+ is-glob "^2.0.0"
+ path-is-absolute "^1.0.0"
+ readdirp "^2.0.0"
+ optionalDependencies:
+ fsevents "^1.0.0"
+
+ci-info@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
+ integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
+
+class-utils@^0.3.5:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
+ integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==
+ dependencies:
+ arr-union "^3.1.0"
+ define-property "^0.2.5"
+ isobject "^3.0.0"
+ static-extend "^0.1.1"
+
+cliui@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5"
+ integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==
+ dependencies:
+ string-width "^3.1.0"
+ strip-ansi "^5.2.0"
+ wrap-ansi "^5.1.0"
+
+co@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
+ integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
+
+collection-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
+ integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=
+ dependencies:
+ map-visit "^1.0.0"
+ object-visit "^1.0.0"
+
+color-convert@^1.9.0:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
+ integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
+ dependencies:
+ color-name "1.1.3"
+
+color-name@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+ integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+
+combined-stream@^1.0.6, combined-stream@~1.0.6:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
+ integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
+ dependencies:
+ delayed-stream "~1.0.0"
+
+commander@^2.9.0:
+ version "2.20.3"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
+ integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
+
+component-emitter@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
+ integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+
+content-disposition@0.5.3:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd"
+ integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
+ dependencies:
+ safe-buffer "5.1.2"
+
+content-type@^1.0.4, content-type@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
+ integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
+
+convert-source-map@^1.4.0, convert-source-map@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442"
+ integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==
+ dependencies:
+ safe-buffer "~5.1.1"
+
+cookie-signature@1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
+ integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
+
+cookie@0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
+ integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
+
+copy-descriptor@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
+ integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
+
+core-util-is@1.0.2, core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+ integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+
+cross-spawn@^6.0.0:
+ version "6.0.5"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
+ integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
+ dependencies:
+ nice-try "^1.0.4"
+ path-key "^2.0.1"
+ semver "^5.5.0"
+ shebang-command "^1.2.0"
+ which "^1.2.9"
+
+cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0":
+ version "0.3.8"
+ resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a"
+ integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==
+
+cssstyle@^1.0.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1"
+ integrity sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==
+ dependencies:
+ cssom "0.3.x"
+
+dashdash@^1.12.0:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
+ integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
+ dependencies:
+ assert-plus "^1.0.0"
+
+data-urls@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe"
+ integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==
+ dependencies:
+ abab "^2.0.0"
+ whatwg-mimetype "^2.2.0"
+ whatwg-url "^7.0.0"
+
+debug@2.6.9, debug@^2.2.0, debug@^2.3.3:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+debug@^4.1.0, debug@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
+ integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
+ dependencies:
+ ms "^2.1.1"
+
+decamelize@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+ integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
+
+decode-uri-component@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
+ integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
+
+deep-is@~0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
+ integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
+
+define-properties@^1.1.2, define-properties@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
+ integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
+ dependencies:
+ object-keys "^1.0.12"
+
+define-property@^0.2.5:
+ version "0.2.5"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
+ integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=
+ dependencies:
+ is-descriptor "^0.1.0"
+
+define-property@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
+ integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY=
+ dependencies:
+ is-descriptor "^1.0.0"
+
+define-property@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
+ integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==
+ dependencies:
+ is-descriptor "^1.0.2"
+ isobject "^3.0.1"
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+ integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
+
+depd@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
+ integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
+
+deprecated-decorator@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37"
+ integrity sha1-AJZjF7ehL+kvPMgx91g68ym4bDc=
+
+destroy@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
+ integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
+
+detect-newline@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
+ integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=
+
+diff-sequences@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5"
+ integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==
+
+domexception@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90"
+ integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==
+ dependencies:
+ webidl-conversions "^4.0.2"
+
+ecc-jsbn@~0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
+ integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
+ dependencies:
+ jsbn "~0.1.0"
+ safer-buffer "^2.1.0"
+
+ee-first@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
+ integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
+
+emoji-regex@^7.0.1:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
+ integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
+
+encodeurl@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
+ integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
+
+encoding@^0.1.11:
+ version "0.1.12"
+ resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb"
+ integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=
+ dependencies:
+ iconv-lite "~0.4.13"
+
+end-of-stream@^1.1.0:
+ version "1.4.4"
+ resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
+ integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
+ dependencies:
+ once "^1.4.0"
+
+error-ex@^1.3.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
+ integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
+ dependencies:
+ is-arrayish "^0.2.1"
+
+es-abstract@^1.17.0-next.1, es-abstract@^1.17.2:
+ version "1.17.3"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.3.tgz#d921ff5889a3664921094bb13aaf0dfd11818578"
+ integrity sha512-AwiVPKf3sKGMoWtFw0J7Y4MTZ4Iek67k4COWOwHqS8B9TOZ71DCfcoBmdamy8Y6mj4MDz0+VNUpC2HKHFHA3pg==
+ dependencies:
+ es-to-primitive "^1.2.1"
+ function-bind "^1.1.1"
+ has "^1.0.3"
+ has-symbols "^1.0.1"
+ is-callable "^1.1.5"
+ is-regex "^1.0.5"
+ object-inspect "^1.7.0"
+ object-keys "^1.1.1"
+ object.assign "^4.1.0"
+ string.prototype.trimleft "^2.1.1"
+ string.prototype.trimright "^2.1.1"
+
+es-to-primitive@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a"
+ integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==
+ dependencies:
+ is-callable "^1.1.4"
+ is-date-object "^1.0.1"
+ is-symbol "^1.0.2"
+
+escape-html@~1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
+ integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
+
+escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+ integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
+
+escodegen@^1.9.1:
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.13.0.tgz#c7adf9bd3f3cc675bb752f202f79a720189cab29"
+ integrity sha512-eYk2dCkxR07DsHA/X2hRBj0CFAZeri/LyDMc0C8JT1Hqi6JnVpMhJ7XFITbb0+yZS3lVkaPL2oCkZ3AVmeVbMw==
+ dependencies:
+ esprima "^4.0.1"
+ estraverse "^4.2.0"
+ esutils "^2.0.2"
+ optionator "^0.8.1"
+ optionalDependencies:
+ source-map "~0.6.1"
+
+esprima@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
+ integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
+
+estraverse@^4.2.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
+ integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
+
+esutils@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
+ integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
+
+etag@~1.8.1:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
+ integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
+
+exec-sh@^0.3.2:
+ version "0.3.4"
+ resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5"
+ integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A==
+
+execa@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
+ integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==
+ dependencies:
+ cross-spawn "^6.0.0"
+ get-stream "^4.0.0"
+ is-stream "^1.1.0"
+ npm-run-path "^2.0.0"
+ p-finally "^1.0.0"
+ signal-exit "^3.0.0"
+ strip-eof "^1.0.0"
+
+exit@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
+ integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=
+
+expand-brackets@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
+ integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=
+ dependencies:
+ is-posix-bracket "^0.1.0"
+
+expand-brackets@^2.1.4:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
+ integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI=
+ dependencies:
+ debug "^2.3.3"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ posix-character-classes "^0.1.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+expand-range@^1.8.1:
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
+ integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=
+ dependencies:
+ fill-range "^2.1.0"
+
+expect@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/expect/-/expect-24.9.0.tgz#b75165b4817074fa4a157794f46fe9f1ba15b6ca"
+ integrity sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==
+ dependencies:
+ "@jest/types" "^24.9.0"
+ ansi-styles "^3.2.0"
+ jest-get-type "^24.9.0"
+ jest-matcher-utils "^24.9.0"
+ jest-message-util "^24.9.0"
+ jest-regex-util "^24.9.0"
+
+express-graphql@^0.6.3:
+ version "0.6.12"
+ resolved "https://registry.yarnpkg.com/express-graphql/-/express-graphql-0.6.12.tgz#dfcb2058ca72ed5190b140830ad8cdbf76a9128a"
+ integrity sha512-ouLWV0hRw4hnaLtXzzwhdC79ewxKbY2PRvm05mPc/zOH5W5WVCHDQ1SmNxEPBQdUeeSNh29aIqW9zEQkA3kMuA==
+ dependencies:
+ accepts "^1.3.0"
+ content-type "^1.0.4"
+ http-errors "^1.3.0"
+ raw-body "^2.3.2"
+
+express@^4.14.0:
+ version "4.17.1"
+ resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
+ integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==
+ dependencies:
+ accepts "~1.3.7"
+ array-flatten "1.1.1"
+ body-parser "1.19.0"
+ content-disposition "0.5.3"
+ content-type "~1.0.4"
+ cookie "0.4.0"
+ cookie-signature "1.0.6"
+ debug "2.6.9"
+ depd "~1.1.2"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ finalhandler "~1.1.2"
+ fresh "0.5.2"
+ merge-descriptors "1.0.1"
+ methods "~1.1.2"
+ on-finished "~2.3.0"
+ parseurl "~1.3.3"
+ path-to-regexp "0.1.7"
+ proxy-addr "~2.0.5"
+ qs "6.7.0"
+ range-parser "~1.2.1"
+ safe-buffer "5.1.2"
+ send "0.17.1"
+ serve-static "1.14.1"
+ setprototypeof "1.1.1"
+ statuses "~1.5.0"
+ type-is "~1.6.18"
+ utils-merge "1.0.1"
+ vary "~1.1.2"
+
+extend-shallow@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+ integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=
+ dependencies:
+ is-extendable "^0.1.0"
+
+extend-shallow@^3.0.0, extend-shallow@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
+ integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=
+ dependencies:
+ assign-symbols "^1.0.0"
+ is-extendable "^1.0.1"
+
+extend@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
+ integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
+
+extglob@^0.3.1:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
+ integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=
+ dependencies:
+ is-extglob "^1.0.0"
+
+extglob@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
+ integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==
+ dependencies:
+ array-unique "^0.3.2"
+ define-property "^1.0.0"
+ expand-brackets "^2.1.4"
+ extend-shallow "^2.0.1"
+ fragment-cache "^0.2.1"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+extsprintf@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
+ integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
+
+extsprintf@^1.2.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
+ integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
+
+fast-deep-equal@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4"
+ integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==
+
+fast-json-stable-stringify@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
+ integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
+
+fast-levenshtein@~2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
+ integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
+
+fb-watchman@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85"
+ integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==
+ dependencies:
+ bser "2.1.1"
+
+file-uri-to-path@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
+ integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==
+
+filename-regex@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
+ integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=
+
+fill-range@^2.1.0:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
+ integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==
+ dependencies:
+ is-number "^2.1.0"
+ isobject "^2.0.0"
+ randomatic "^3.0.0"
+ repeat-element "^1.1.2"
+ repeat-string "^1.5.2"
+
+fill-range@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
+ integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+ to-regex-range "^2.1.0"
+
+finalhandler@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
+ integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==
+ dependencies:
+ debug "2.6.9"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ on-finished "~2.3.0"
+ parseurl "~1.3.3"
+ statuses "~1.5.0"
+ unpipe "~1.0.0"
+
+find-up@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
+ integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==
+ dependencies:
+ locate-path "^3.0.0"
+
+for-in@^1.0.1, for-in@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+ integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
+
+for-own@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
+ integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=
+ dependencies:
+ for-in "^1.0.1"
+
+forever-agent@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
+ integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
+
+form-data@~2.3.2:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
+ integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.6"
+ mime-types "^2.1.12"
+
+forwarded@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
+ integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
+
+fragment-cache@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
+ integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=
+ dependencies:
+ map-cache "^0.2.2"
+
+fresh@0.5.2:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
+ integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
+
+fsevents@^1.0.0, fsevents@^1.2.7:
+ version "1.2.11"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.11.tgz#67bf57f4758f02ede88fb2a1712fef4d15358be3"
+ integrity sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==
+ dependencies:
+ bindings "^1.5.0"
+ nan "^2.12.1"
+
+function-bind@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
+ integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+
+gensync@^1.0.0-beta.1:
+ version "1.0.0-beta.1"
+ resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269"
+ integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==
+
+get-caller-file@^2.0.1:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
+ integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
+
+get-stream@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
+ integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
+ dependencies:
+ pump "^3.0.0"
+
+get-value@^2.0.3, get-value@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
+ integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=
+
+getpass@^0.1.1:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
+ integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
+ dependencies:
+ assert-plus "^1.0.0"
+
+glob-base@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
+ integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=
+ dependencies:
+ glob-parent "^2.0.0"
+ is-glob "^2.0.0"
+
+glob-parent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
+ integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=
+ dependencies:
+ is-glob "^2.0.0"
+
+glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
+ version "7.1.6"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
+ integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^11.1.0:
+ version "11.12.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
+ integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
+
+gql-tools@^0.0.15:
+ version "0.0.15"
+ resolved "https://registry.yarnpkg.com/gql-tools/-/gql-tools-0.0.15.tgz#75085aeb1d148e5f816a03f76043010222aa69af"
+ integrity sha1-dQha6x0Ujl+BagP3YEMBAiKqaa8=
+ dependencies:
+ commander "^2.9.0"
+ express "^4.14.0"
+ express-graphql "^0.6.3"
+ graphql-tools "^0.10.1"
+ is-url "^1.2.2"
+ livereload "^0.5.0"
+ node-fetch "^1.5.3"
+
+graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
+ integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
+
+graphql-tag@^2.6.1:
+ version "2.10.1"
+ resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.1.tgz#10aa41f1cd8fae5373eaf11f1f67260a3cad5e02"
+ integrity sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg==
+
+graphql-tools@^0.10.1:
+ version "0.10.1"
+ resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-0.10.1.tgz#274aa338d50b1c0b3ed6936eafd8ed3a19ed1828"
+ integrity sha1-J0qjONULHAs+1pNur9jtOhntGCg=
+ dependencies:
+ deprecated-decorator "^0.1.6"
+ lodash "^4.3.0"
+ uuid "^3.0.1"
+ optionalDependencies:
+ "@types/graphql" "^0.8.5"
+
+graphql-tools@^4.0.6:
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-4.0.8.tgz#e7fb9f0d43408fb0878ba66b522ce871bafe9d30"
+ integrity sha512-MW+ioleBrwhRjalKjYaLQbr+920pHBgy9vM/n47sswtns8+96sRn5M/G+J1eu7IMeKWiN/9p6tmwCHU7552VJg==
+ dependencies:
+ apollo-link "^1.2.14"
+ apollo-utilities "^1.0.1"
+ deprecated-decorator "^0.1.6"
+ iterall "^1.1.3"
+ uuid "^3.1.0"
+
+graphql@^0.13.2:
+ version "0.13.2"
+ resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.13.2.tgz#4c740ae3c222823e7004096f832e7b93b2108270"
+ integrity sha512-QZ5BL8ZO/B20VA8APauGBg3GyEgZ19eduvpLWoq5x7gMmWnHoy8rlQWPLmWgFvo1yNgjSEFMesmS4R6pPr7xog==
+ dependencies:
+ iterall "^1.2.1"
+
+growly@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
+ integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=
+
+har-schema@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
+ integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
+
+har-validator@~5.1.0:
+ version "5.1.3"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080"
+ integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==
+ dependencies:
+ ajv "^6.5.5"
+ har-schema "^2.0.0"
+
+has-flag@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+ integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+
+has-symbols@^1.0.0, has-symbols@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
+ integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
+
+has-value@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
+ integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=
+ dependencies:
+ get-value "^2.0.3"
+ has-values "^0.1.4"
+ isobject "^2.0.0"
+
+has-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
+ integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=
+ dependencies:
+ get-value "^2.0.6"
+ has-values "^1.0.0"
+ isobject "^3.0.0"
+
+has-values@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
+ integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E=
+
+has-values@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
+ integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
+has@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
+ integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
+ dependencies:
+ function-bind "^1.1.1"
+
+hosted-git-info@^2.1.4:
+ version "2.8.5"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c"
+ integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==
+
+html-encoding-sniffer@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8"
+ integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==
+ dependencies:
+ whatwg-encoding "^1.0.1"
+
+html-escaper@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.0.tgz#71e87f931de3fe09e56661ab9a29aadec707b491"
+ integrity sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig==
+
+http-errors@1.7.2:
+ version "1.7.2"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f"
+ integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.3"
+ setprototypeof "1.1.1"
+ statuses ">= 1.5.0 < 2"
+ toidentifier "1.0.0"
+
+http-errors@1.7.3, http-errors@^1.3.0, http-errors@~1.7.2:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
+ integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.4"
+ setprototypeof "1.1.1"
+ statuses ">= 1.5.0 < 2"
+ toidentifier "1.0.0"
+
+http-signature@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
+ integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
+ dependencies:
+ assert-plus "^1.0.0"
+ jsprim "^1.2.2"
+ sshpk "^1.7.0"
+
+iconv-lite@0.4.24, iconv-lite@~0.4.13:
+ version "0.4.24"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+import-local@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
+ integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==
+ dependencies:
+ pkg-dir "^3.0.0"
+ resolve-cwd "^2.0.0"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+ integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@~2.0.3:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+inherits@2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+ integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
+
+invariant@^2.2.4:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+ integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
+ dependencies:
+ loose-envify "^1.0.0"
+
+ipaddr.js@1.9.0:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65"
+ integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==
+
+is-accessor-descriptor@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
+ integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-accessor-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
+ integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+ integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
+
+is-binary-path@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
+ integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=
+ dependencies:
+ binary-extensions "^1.0.0"
+
+is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+ integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
+
+is-callable@^1.1.4, is-callable@^1.1.5:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab"
+ integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==
+
+is-ci@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
+ integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==
+ dependencies:
+ ci-info "^2.0.0"
+
+is-data-descriptor@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
+ integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-data-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
+ integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-date-object@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e"
+ integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==
+
+is-descriptor@^0.1.0:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
+ integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==
+ dependencies:
+ is-accessor-descriptor "^0.1.6"
+ is-data-descriptor "^0.1.4"
+ kind-of "^5.0.0"
+
+is-descriptor@^1.0.0, is-descriptor@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
+ integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==
+ dependencies:
+ is-accessor-descriptor "^1.0.0"
+ is-data-descriptor "^1.0.0"
+ kind-of "^6.0.2"
+
+is-dotfile@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
+ integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=
+
+is-equal-shallow@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
+ integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=
+ dependencies:
+ is-primitive "^2.0.0"
+
+is-extendable@^0.1.0, is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+ integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
+
+is-extendable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+ integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
+ dependencies:
+ is-plain-object "^2.0.4"
+
+is-extglob@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
+ integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+ integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+
+is-generator-fn@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118"
+ integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==
+
+is-glob@^2.0.0, is-glob@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
+ integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=
+ dependencies:
+ is-extglob "^1.0.0"
+
+is-number@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
+ integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+ integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
+ integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==
+
+is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
+ dependencies:
+ isobject "^3.0.1"
+
+is-posix-bracket@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
+ integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=
+
+is-primitive@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
+ integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU=
+
+is-regex@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae"
+ integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==
+ dependencies:
+ has "^1.0.3"
+
+is-stream@^1.0.1, is-stream@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+ integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
+
+is-symbol@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937"
+ integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==
+ dependencies:
+ has-symbols "^1.0.1"
+
+is-typedarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+ integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
+
+is-url@^1.2.2:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
+ integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==
+
+is-windows@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
+ integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
+
+is-wsl@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
+ integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
+
+isarray@1.0.0, isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=
+ dependencies:
+ isarray "1.0.0"
+
+isobject@^3.0.0, isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+ integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
+
+isstream@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+ integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
+
+istanbul-lib-coverage@^2.0.2, istanbul-lib-coverage@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49"
+ integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==
+
+istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630"
+ integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==
+ dependencies:
+ "@babel/generator" "^7.4.0"
+ "@babel/parser" "^7.4.3"
+ "@babel/template" "^7.4.0"
+ "@babel/traverse" "^7.4.3"
+ "@babel/types" "^7.4.0"
+ istanbul-lib-coverage "^2.0.5"
+ semver "^6.0.0"
+
+istanbul-lib-report@^2.0.4:
+ version "2.0.8"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33"
+ integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==
+ dependencies:
+ istanbul-lib-coverage "^2.0.5"
+ make-dir "^2.1.0"
+ supports-color "^6.1.0"
+
+istanbul-lib-source-maps@^3.0.1:
+ version "3.0.6"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8"
+ integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==
+ dependencies:
+ debug "^4.1.1"
+ istanbul-lib-coverage "^2.0.5"
+ make-dir "^2.1.0"
+ rimraf "^2.6.3"
+ source-map "^0.6.1"
+
+istanbul-reports@^2.2.6:
+ version "2.2.7"
+ resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.7.tgz#5d939f6237d7b48393cc0959eab40cd4fd056931"
+ integrity sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==
+ dependencies:
+ html-escaper "^2.0.0"
+
+iterall@^1.1.3, iterall@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea"
+ integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==
+
+jest-changed-files@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-24.9.0.tgz#08d8c15eb79a7fa3fc98269bc14b451ee82f8039"
+ integrity sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg==
+ dependencies:
+ "@jest/types" "^24.9.0"
+ execa "^1.0.0"
+ throat "^4.0.0"
+
+jest-cli@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.9.0.tgz#ad2de62d07472d419c6abc301fc432b98b10d2af"
+ integrity sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg==
+ dependencies:
+ "@jest/core" "^24.9.0"
+ "@jest/test-result" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ chalk "^2.0.1"
+ exit "^0.1.2"
+ import-local "^2.0.0"
+ is-ci "^2.0.0"
+ jest-config "^24.9.0"
+ jest-util "^24.9.0"
+ jest-validate "^24.9.0"
+ prompts "^2.0.1"
+ realpath-native "^1.1.0"
+ yargs "^13.3.0"
+
+jest-config@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-24.9.0.tgz#fb1bbc60c73a46af03590719efa4825e6e4dd1b5"
+ integrity sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==
+ dependencies:
+ "@babel/core" "^7.1.0"
+ "@jest/test-sequencer" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ babel-jest "^24.9.0"
+ chalk "^2.0.1"
+ glob "^7.1.1"
+ jest-environment-jsdom "^24.9.0"
+ jest-environment-node "^24.9.0"
+ jest-get-type "^24.9.0"
+ jest-jasmine2 "^24.9.0"
+ jest-regex-util "^24.3.0"
+ jest-resolve "^24.9.0"
+ jest-util "^24.9.0"
+ jest-validate "^24.9.0"
+ micromatch "^3.1.10"
+ pretty-format "^24.9.0"
+ realpath-native "^1.1.0"
+
+jest-diff@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da"
+ integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==
+ dependencies:
+ chalk "^2.0.1"
+ diff-sequences "^24.9.0"
+ jest-get-type "^24.9.0"
+ pretty-format "^24.9.0"
+
+jest-docblock@^24.3.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-24.9.0.tgz#7970201802ba560e1c4092cc25cbedf5af5a8ce2"
+ integrity sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA==
+ dependencies:
+ detect-newline "^2.1.0"
+
+jest-each@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-24.9.0.tgz#eb2da602e2a610898dbc5f1f6df3ba86b55f8b05"
+ integrity sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog==
+ dependencies:
+ "@jest/types" "^24.9.0"
+ chalk "^2.0.1"
+ jest-get-type "^24.9.0"
+ jest-util "^24.9.0"
+ pretty-format "^24.9.0"
+
+jest-environment-jsdom@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz#4b0806c7fc94f95edb369a69cc2778eec2b7375b"
+ integrity sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==
+ dependencies:
+ "@jest/environment" "^24.9.0"
+ "@jest/fake-timers" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ jest-mock "^24.9.0"
+ jest-util "^24.9.0"
+ jsdom "^11.5.1"
+
+jest-environment-node@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-24.9.0.tgz#333d2d2796f9687f2aeebf0742b519f33c1cbfd3"
+ integrity sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==
+ dependencies:
+ "@jest/environment" "^24.9.0"
+ "@jest/fake-timers" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ jest-mock "^24.9.0"
+ jest-util "^24.9.0"
+
+jest-get-type@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e"
+ integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==
+
+jest-haste-map@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d"
+ integrity sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ==
+ dependencies:
+ "@jest/types" "^24.9.0"
+ anymatch "^2.0.0"
+ fb-watchman "^2.0.0"
+ graceful-fs "^4.1.15"
+ invariant "^2.2.4"
+ jest-serializer "^24.9.0"
+ jest-util "^24.9.0"
+ jest-worker "^24.9.0"
+ micromatch "^3.1.10"
+ sane "^4.0.3"
+ walker "^1.0.7"
+ optionalDependencies:
+ fsevents "^1.2.7"
+
+jest-jasmine2@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz#1f7b1bd3242c1774e62acabb3646d96afc3be6a0"
+ integrity sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw==
+ dependencies:
+ "@babel/traverse" "^7.1.0"
+ "@jest/environment" "^24.9.0"
+ "@jest/test-result" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ chalk "^2.0.1"
+ co "^4.6.0"
+ expect "^24.9.0"
+ is-generator-fn "^2.0.0"
+ jest-each "^24.9.0"
+ jest-matcher-utils "^24.9.0"
+ jest-message-util "^24.9.0"
+ jest-runtime "^24.9.0"
+ jest-snapshot "^24.9.0"
+ jest-util "^24.9.0"
+ pretty-format "^24.9.0"
+ throat "^4.0.0"
+
+jest-leak-detector@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz#b665dea7c77100c5c4f7dfcb153b65cf07dcf96a"
+ integrity sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA==
+ dependencies:
+ jest-get-type "^24.9.0"
+ pretty-format "^24.9.0"
+
+jest-matcher-utils@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz#f5b3661d5e628dffe6dd65251dfdae0e87c3a073"
+ integrity sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==
+ dependencies:
+ chalk "^2.0.1"
+ jest-diff "^24.9.0"
+ jest-get-type "^24.9.0"
+ pretty-format "^24.9.0"
+
+jest-message-util@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3"
+ integrity sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ "@jest/test-result" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ "@types/stack-utils" "^1.0.1"
+ chalk "^2.0.1"
+ micromatch "^3.1.10"
+ slash "^2.0.0"
+ stack-utils "^1.0.1"
+
+jest-mock@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-24.9.0.tgz#c22835541ee379b908673ad51087a2185c13f1c6"
+ integrity sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w==
+ dependencies:
+ "@jest/types" "^24.9.0"
+
+jest-pnp-resolver@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a"
+ integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==
+
+jest-regex-util@^24.3.0, jest-regex-util@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.9.0.tgz#c13fb3380bde22bf6575432c493ea8fe37965636"
+ integrity sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==
+
+jest-resolve-dependencies@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz#ad055198959c4cfba8a4f066c673a3f0786507ab"
+ integrity sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g==
+ dependencies:
+ "@jest/types" "^24.9.0"
+ jest-regex-util "^24.3.0"
+ jest-snapshot "^24.9.0"
+
+jest-resolve@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-24.9.0.tgz#dff04c7687af34c4dd7e524892d9cf77e5d17321"
+ integrity sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==
+ dependencies:
+ "@jest/types" "^24.9.0"
+ browser-resolve "^1.11.3"
+ chalk "^2.0.1"
+ jest-pnp-resolver "^1.2.1"
+ realpath-native "^1.1.0"
+
+jest-runner@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-24.9.0.tgz#574fafdbd54455c2b34b4bdf4365a23857fcdf42"
+ integrity sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg==
+ dependencies:
+ "@jest/console" "^24.7.1"
+ "@jest/environment" "^24.9.0"
+ "@jest/test-result" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ chalk "^2.4.2"
+ exit "^0.1.2"
+ graceful-fs "^4.1.15"
+ jest-config "^24.9.0"
+ jest-docblock "^24.3.0"
+ jest-haste-map "^24.9.0"
+ jest-jasmine2 "^24.9.0"
+ jest-leak-detector "^24.9.0"
+ jest-message-util "^24.9.0"
+ jest-resolve "^24.9.0"
+ jest-runtime "^24.9.0"
+ jest-util "^24.9.0"
+ jest-worker "^24.6.0"
+ source-map-support "^0.5.6"
+ throat "^4.0.0"
+
+jest-runtime@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-24.9.0.tgz#9f14583af6a4f7314a6a9d9f0226e1a781c8e4ac"
+ integrity sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw==
+ dependencies:
+ "@jest/console" "^24.7.1"
+ "@jest/environment" "^24.9.0"
+ "@jest/source-map" "^24.3.0"
+ "@jest/transform" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ "@types/yargs" "^13.0.0"
+ chalk "^2.0.1"
+ exit "^0.1.2"
+ glob "^7.1.3"
+ graceful-fs "^4.1.15"
+ jest-config "^24.9.0"
+ jest-haste-map "^24.9.0"
+ jest-message-util "^24.9.0"
+ jest-mock "^24.9.0"
+ jest-regex-util "^24.3.0"
+ jest-resolve "^24.9.0"
+ jest-snapshot "^24.9.0"
+ jest-util "^24.9.0"
+ jest-validate "^24.9.0"
+ realpath-native "^1.1.0"
+ slash "^2.0.0"
+ strip-bom "^3.0.0"
+ yargs "^13.3.0"
+
+jest-serializer@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73"
+ integrity sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ==
+
+jest-snapshot@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-24.9.0.tgz#ec8e9ca4f2ec0c5c87ae8f925cf97497b0e951ba"
+ integrity sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew==
+ dependencies:
+ "@babel/types" "^7.0.0"
+ "@jest/types" "^24.9.0"
+ chalk "^2.0.1"
+ expect "^24.9.0"
+ jest-diff "^24.9.0"
+ jest-get-type "^24.9.0"
+ jest-matcher-utils "^24.9.0"
+ jest-message-util "^24.9.0"
+ jest-resolve "^24.9.0"
+ mkdirp "^0.5.1"
+ natural-compare "^1.4.0"
+ pretty-format "^24.9.0"
+ semver "^6.2.0"
+
+jest-util@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162"
+ integrity sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==
+ dependencies:
+ "@jest/console" "^24.9.0"
+ "@jest/fake-timers" "^24.9.0"
+ "@jest/source-map" "^24.9.0"
+ "@jest/test-result" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ callsites "^3.0.0"
+ chalk "^2.0.1"
+ graceful-fs "^4.1.15"
+ is-ci "^2.0.0"
+ mkdirp "^0.5.1"
+ slash "^2.0.0"
+ source-map "^0.6.0"
+
+jest-validate@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.9.0.tgz#0775c55360d173cd854e40180756d4ff52def8ab"
+ integrity sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==
+ dependencies:
+ "@jest/types" "^24.9.0"
+ camelcase "^5.3.1"
+ chalk "^2.0.1"
+ jest-get-type "^24.9.0"
+ leven "^3.1.0"
+ pretty-format "^24.9.0"
+
+jest-watcher@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-24.9.0.tgz#4b56e5d1ceff005f5b88e528dc9afc8dd4ed2b3b"
+ integrity sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw==
+ dependencies:
+ "@jest/test-result" "^24.9.0"
+ "@jest/types" "^24.9.0"
+ "@types/yargs" "^13.0.0"
+ ansi-escapes "^3.0.0"
+ chalk "^2.0.1"
+ jest-util "^24.9.0"
+ string-length "^2.0.0"
+
+jest-worker@^24.6.0, jest-worker@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5"
+ integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==
+ dependencies:
+ merge-stream "^2.0.0"
+ supports-color "^6.1.0"
+
+jest@^24.3.1:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/jest/-/jest-24.9.0.tgz#987d290c05a08b52c56188c1002e368edb007171"
+ integrity sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw==
+ dependencies:
+ import-local "^2.0.0"
+ jest-cli "^24.9.0"
+
+"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+ integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+
+jsbn@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
+ integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
+
+jsdom@^11.5.1:
+ version "11.12.0"
+ resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8"
+ integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==
+ dependencies:
+ abab "^2.0.0"
+ acorn "^5.5.3"
+ acorn-globals "^4.1.0"
+ array-equal "^1.0.0"
+ cssom ">= 0.3.2 < 0.4.0"
+ cssstyle "^1.0.0"
+ data-urls "^1.0.0"
+ domexception "^1.0.1"
+ escodegen "^1.9.1"
+ html-encoding-sniffer "^1.0.2"
+ left-pad "^1.3.0"
+ nwsapi "^2.0.7"
+ parse5 "4.0.0"
+ pn "^1.1.0"
+ request "^2.87.0"
+ request-promise-native "^1.0.5"
+ sax "^1.2.4"
+ symbol-tree "^3.2.2"
+ tough-cookie "^2.3.4"
+ w3c-hr-time "^1.0.1"
+ webidl-conversions "^4.0.2"
+ whatwg-encoding "^1.0.3"
+ whatwg-mimetype "^2.1.0"
+ whatwg-url "^6.4.1"
+ ws "^5.2.0"
+ xml-name-validator "^3.0.0"
+
+jsesc@^2.5.1:
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
+ integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
+
+json-parse-better-errors@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
+ integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==
+
+json-schema-traverse@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+ integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
+
+json-schema@0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
+ integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
+
+json-stringify-safe@~5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
+ integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
+
+json5@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6"
+ integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==
+ dependencies:
+ minimist "^1.2.0"
+
+jsprim@^1.2.2:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
+ integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
+ dependencies:
+ assert-plus "1.0.0"
+ extsprintf "1.3.0"
+ json-schema "0.2.3"
+ verror "1.10.0"
+
+kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+ integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
+ integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==
+
+kind-of@^6.0.0, kind-of@^6.0.2:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
+ integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
+
+kleur@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
+ integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
+
+left-pad@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e"
+ integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==
+
+leven@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
+ integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==
+
+levn@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
+ integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=
+ dependencies:
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+
+livereload@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/livereload/-/livereload-0.5.0.tgz#9444bc143ca7bdaa2e596ddab125c47914c8a1c2"
+ integrity sha1-lES8FDynvaouWW3asSXEeRTIocI=
+ dependencies:
+ chokidar "^1.1.0"
+ opts ">= 1.2.0"
+ ws "^0.8.0"
+
+load-json-file@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
+ integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs=
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^4.0.0"
+ pify "^3.0.0"
+ strip-bom "^3.0.0"
+
+locate-path@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
+ integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==
+ dependencies:
+ p-locate "^3.0.0"
+ path-exists "^3.0.0"
+
+lodash.sortby@^4.7.0:
+ version "4.7.0"
+ resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
+ integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
+
+lodash@^4.17.13, lodash@^4.17.15, lodash@^4.3.0:
+ version "4.17.15"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
+ integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
+
+loose-envify@^1.0.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
+ integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
+ dependencies:
+ js-tokens "^3.0.0 || ^4.0.0"
+
+make-dir@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
+ integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
+ dependencies:
+ pify "^4.0.1"
+ semver "^5.6.0"
+
+makeerror@1.0.x:
+ version "1.0.11"
+ resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c"
+ integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=
+ dependencies:
+ tmpl "1.0.x"
+
+map-cache@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+ integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=
+
+map-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
+ integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=
+ dependencies:
+ object-visit "^1.0.0"
+
+math-random@^1.0.1:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c"
+ integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==
+
+media-typer@0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
+ integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
+
+merge-descriptors@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
+ integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
+
+merge-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
+ integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
+
+methods@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
+ integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
+
+micromatch@^2.1.5:
+ version "2.3.11"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
+ integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=
+ dependencies:
+ arr-diff "^2.0.0"
+ array-unique "^0.2.1"
+ braces "^1.8.2"
+ expand-brackets "^0.1.4"
+ extglob "^0.3.1"
+ filename-regex "^2.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.1"
+ kind-of "^3.0.2"
+ normalize-path "^2.0.1"
+ object.omit "^2.0.0"
+ parse-glob "^3.0.4"
+ regex-cache "^0.4.2"
+
+micromatch@^3.1.10, micromatch@^3.1.4:
+ version "3.1.10"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
+ integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ braces "^2.3.1"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ extglob "^2.0.4"
+ fragment-cache "^0.2.1"
+ kind-of "^6.0.2"
+ nanomatch "^1.2.9"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.2"
+
+mime-db@1.43.0:
+ version "1.43.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58"
+ integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==
+
+mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24:
+ version "2.1.26"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06"
+ integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==
+ dependencies:
+ mime-db "1.43.0"
+
+mime@1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
+ integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
+
+minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+ integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
+
+minimist@^1.1.1, minimist@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+ integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
+
+mixin-deep@^1.2.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
+ integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==
+ dependencies:
+ for-in "^1.0.2"
+ is-extendable "^1.0.1"
+
+mkdirp@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
+ dependencies:
+ minimist "0.0.8"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+ integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+
+ms@2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
+ integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
+
+ms@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+
+nan@^2.0.5, nan@^2.12.1:
+ version "2.14.0"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
+ integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==
+
+nan@~2.4.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232"
+ integrity sha1-+zxZ1F/k7/4hXwuJD4rfbrMtIjI=
+
+nanomatch@^1.2.9:
+ version "1.2.13"
+ resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
+ integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ fragment-cache "^0.2.1"
+ is-windows "^1.0.2"
+ kind-of "^6.0.2"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+natural-compare@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+ integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
+
+negotiator@0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
+ integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
+
+nice-try@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
+ integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
+
+node-fetch@^1.5.3:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
+ integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==
+ dependencies:
+ encoding "^0.1.11"
+ is-stream "^1.0.1"
+
+node-int64@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
+ integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=
+
+node-modules-regexp@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40"
+ integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=
+
+node-notifier@^5.4.2:
+ version "5.4.3"
+ resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.3.tgz#cb72daf94c93904098e28b9c590fd866e464bd50"
+ integrity sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q==
+ dependencies:
+ growly "^1.3.0"
+ is-wsl "^1.1.0"
+ semver "^5.5.0"
+ shellwords "^0.1.1"
+ which "^1.3.0"
+
+normalize-package-data@^2.3.2:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
+ integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
+ dependencies:
+ hosted-git-info "^2.1.4"
+ resolve "^1.10.0"
+ semver "2 || 3 || 4 || 5"
+ validate-npm-package-license "^3.0.1"
+
+normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
+ integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=
+ dependencies:
+ remove-trailing-separator "^1.0.1"
+
+npm-run-path@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
+ integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=
+ dependencies:
+ path-key "^2.0.0"
+
+nwsapi@^2.0.7:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7"
+ integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==
+
+oauth-sign@~0.9.0:
+ version "0.9.0"
+ resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
+ integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
+
+object-copy@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
+ integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw=
+ dependencies:
+ copy-descriptor "^0.1.0"
+ define-property "^0.2.5"
+ kind-of "^3.0.3"
+
+object-inspect@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67"
+ integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==
+
+object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
+ integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
+
+object-visit@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
+ integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=
+ dependencies:
+ isobject "^3.0.0"
+
+object.assign@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
+ integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==
+ dependencies:
+ define-properties "^1.1.2"
+ function-bind "^1.1.1"
+ has-symbols "^1.0.0"
+ object-keys "^1.0.11"
+
+object.getownpropertydescriptors@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649"
+ integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==
+ dependencies:
+ define-properties "^1.1.3"
+ es-abstract "^1.17.0-next.1"
+
+object.omit@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
+ integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=
+ dependencies:
+ for-own "^0.1.4"
+ is-extendable "^0.1.1"
+
+object.pick@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+ integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=
+ dependencies:
+ isobject "^3.0.1"
+
+on-finished@~2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
+ integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
+ dependencies:
+ ee-first "1.1.1"
+
+once@^1.3.0, once@^1.3.1, once@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+ dependencies:
+ wrappy "1"
+
+optionator@^0.8.1:
+ version "0.8.3"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
+ integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
+ dependencies:
+ deep-is "~0.1.3"
+ fast-levenshtein "~2.0.6"
+ levn "~0.3.0"
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+ word-wrap "~1.2.3"
+
+options@>=0.0.5:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f"
+ integrity sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=
+
+"opts@>= 1.2.0":
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/opts/-/opts-1.2.7.tgz#4de4721d592c96901dae623a438c988e9ea7779f"
+ integrity sha512-hwZhzGGG/GQ7igxAVFOEun2N4fWul31qE9nfBdCnZGQCB5+L7tN9xZ+94B4aUpLOJx/of3zZs5XsuubayQYQjA==
+
+p-each-series@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71"
+ integrity sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=
+ dependencies:
+ p-reduce "^1.0.0"
+
+p-finally@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
+ integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
+
+p-limit@^2.0.0:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e"
+ integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==
+ dependencies:
+ p-try "^2.0.0"
+
+p-locate@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
+ integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==
+ dependencies:
+ p-limit "^2.0.0"
+
+p-reduce@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa"
+ integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=
+
+p-try@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
+ integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
+
+parse-glob@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
+ integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw=
+ dependencies:
+ glob-base "^0.3.0"
+ is-dotfile "^1.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.0"
+
+parse-json@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
+ integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=
+ dependencies:
+ error-ex "^1.3.1"
+ json-parse-better-errors "^1.0.1"
+
+parse5@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608"
+ integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==
+
+parseurl@~1.3.3:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
+ integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
+
+pascalcase@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
+ integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=
+
+path-exists@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
+ integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
+
+path-key@^2.0.0, path-key@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
+ integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
+
+path-parse@^1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
+ integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
+
+path-to-regexp@0.1.7:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
+ integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
+
+path-type@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
+ integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==
+ dependencies:
+ pify "^3.0.0"
+
+performance-now@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
+ integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
+
+pify@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
+ integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
+
+pify@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
+ integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
+
+pirates@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87"
+ integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==
+ dependencies:
+ node-modules-regexp "^1.0.0"
+
+pkg-dir@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3"
+ integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==
+ dependencies:
+ find-up "^3.0.0"
+
+pn@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb"
+ integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==
+
+posix-character-classes@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
+ integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
+
+prelude-ls@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
+ integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
+
+preserve@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
+ integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
+
+pretty-format@^24.9.0:
+ version "24.9.0"
+ resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9"
+ integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==
+ dependencies:
+ "@jest/types" "^24.9.0"
+ ansi-regex "^4.0.0"
+ ansi-styles "^3.2.0"
+ react-is "^16.8.4"
+
+process-nextick-args@~2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
+ integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
+
+prompts@^2.0.1:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.0.tgz#a444e968fa4cc7e86689a74050685ac8006c4cc4"
+ integrity sha512-NfbbPPg/74fT7wk2XYQ7hAIp9zJyZp5Fu19iRbORqqy1BhtrkZ0fPafBU+7bmn8ie69DpT0R6QpJIN2oisYjJg==
+ dependencies:
+ kleur "^3.0.3"
+ sisteransi "^1.0.3"
+
+proxy-addr@~2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34"
+ integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==
+ dependencies:
+ forwarded "~0.1.2"
+ ipaddr.js "1.9.0"
+
+psl@^1.1.24, psl@^1.1.28:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c"
+ integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==
+
+pump@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
+ integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
+ dependencies:
+ end-of-stream "^1.1.0"
+ once "^1.3.1"
+
+punycode@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
+ integrity sha1-wNWmOycYgArY4esPpSachN1BhF4=
+
+punycode@^2.1.0, punycode@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
+ integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
+
+qs@6.7.0:
+ version "6.7.0"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
+ integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
+
+qs@~6.5.2:
+ version "6.5.2"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
+ integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
+
+randomatic@^3.0.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed"
+ integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==
+ dependencies:
+ is-number "^4.0.0"
+ kind-of "^6.0.0"
+ math-random "^1.0.1"
+
+range-parser@~1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
+ integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
+
+raw-body@2.4.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332"
+ integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==
+ dependencies:
+ bytes "3.1.0"
+ http-errors "1.7.2"
+ iconv-lite "0.4.24"
+ unpipe "1.0.0"
+
+raw-body@^2.3.2:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c"
+ integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==
+ dependencies:
+ bytes "3.1.0"
+ http-errors "1.7.3"
+ iconv-lite "0.4.24"
+ unpipe "1.0.0"
+
+react-is@^16.8.4:
+ version "16.12.0"
+ resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c"
+ integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==
+
+read-pkg-up@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978"
+ integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==
+ dependencies:
+ find-up "^3.0.0"
+ read-pkg "^3.0.0"
+
+read-pkg@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389"
+ integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=
+ dependencies:
+ load-json-file "^4.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^3.0.0"
+
+readable-stream@^2.0.2:
+ version "2.3.7"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
+ integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~2.0.0"
+ safe-buffer "~5.1.1"
+ string_decoder "~1.1.1"
+ util-deprecate "~1.0.1"
+
+readdirp@^2.0.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525"
+ integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==
+ dependencies:
+ graceful-fs "^4.1.11"
+ micromatch "^3.1.10"
+ readable-stream "^2.0.2"
+
+realpath-native@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c"
+ integrity sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA==
+ dependencies:
+ util.promisify "^1.0.0"
+
+regex-cache@^0.4.2:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
+ integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==
+ dependencies:
+ is-equal-shallow "^0.1.3"
+
+regex-not@^1.0.0, regex-not@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
+ integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==
+ dependencies:
+ extend-shallow "^3.0.2"
+ safe-regex "^1.1.0"
+
+remove-trailing-separator@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
+ integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8=
+
+repeat-element@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
+ integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==
+
+repeat-string@^1.5.2, repeat-string@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+ integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
+
+request-promise-core@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9"
+ integrity sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==
+ dependencies:
+ lodash "^4.17.15"
+
+request-promise-native@^1.0.5:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.8.tgz#a455b960b826e44e2bf8999af64dff2bfe58cb36"
+ integrity sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==
+ dependencies:
+ request-promise-core "1.1.3"
+ stealthy-require "^1.1.1"
+ tough-cookie "^2.3.3"
+
+request@^2.87.0:
+ version "2.88.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
+ integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==
+ dependencies:
+ aws-sign2 "~0.7.0"
+ aws4 "^1.8.0"
+ caseless "~0.12.0"
+ combined-stream "~1.0.6"
+ extend "~3.0.2"
+ forever-agent "~0.6.1"
+ form-data "~2.3.2"
+ har-validator "~5.1.0"
+ http-signature "~1.2.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.19"
+ oauth-sign "~0.9.0"
+ performance-now "^2.1.0"
+ qs "~6.5.2"
+ safe-buffer "^5.1.2"
+ tough-cookie "~2.4.3"
+ tunnel-agent "^0.6.0"
+ uuid "^3.3.2"
+
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+ integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
+
+require-main-filename@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
+ integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
+
+resolve-cwd@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a"
+ integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=
+ dependencies:
+ resolve-from "^3.0.0"
+
+resolve-from@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
+ integrity sha1-six699nWiBvItuZTM17rywoYh0g=
+
+resolve-url@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+ integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
+
+resolve@1.1.7:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
+ integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=
+
+resolve@^1.10.0, resolve@^1.3.2:
+ version "1.14.2"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.2.tgz#dbf31d0fa98b1f29aa5169783b9c290cb865fea2"
+ integrity sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==
+ dependencies:
+ path-parse "^1.0.6"
+
+ret@~0.1.10:
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+ integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
+
+rimraf@^2.5.4, rimraf@^2.6.3:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
+ integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
+ dependencies:
+ glob "^7.1.3"
+
+rsvp@^4.8.4:
+ version "4.8.5"
+ resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734"
+ integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==
+
+safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+safe-buffer@^5.0.1, safe-buffer@^5.1.2:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
+ integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
+
+safe-regex@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
+ integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4=
+ dependencies:
+ ret "~0.1.10"
+
+"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+sane@^4.0.3:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded"
+ integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==
+ dependencies:
+ "@cnakazawa/watch" "^1.0.3"
+ anymatch "^2.0.0"
+ capture-exit "^2.0.0"
+ exec-sh "^0.3.2"
+ execa "^1.0.0"
+ fb-watchman "^2.0.0"
+ micromatch "^3.1.4"
+ minimist "^1.1.1"
+ walker "~1.0.5"
+
+sax@^1.2.4:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
+ integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
+
+"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0:
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
+ integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
+
+semver@^6.0.0, semver@^6.2.0:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
+ integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
+
+send@0.17.1:
+ version "0.17.1"
+ resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
+ integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==
+ dependencies:
+ debug "2.6.9"
+ depd "~1.1.2"
+ destroy "~1.0.4"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ fresh "0.5.2"
+ http-errors "~1.7.2"
+ mime "1.6.0"
+ ms "2.1.1"
+ on-finished "~2.3.0"
+ range-parser "~1.2.1"
+ statuses "~1.5.0"
+
+serve-static@1.14.1:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
+ integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==
+ dependencies:
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ parseurl "~1.3.3"
+ send "0.17.1"
+
+set-blocking@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+ integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
+
+set-value@^2.0.0, set-value@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
+ integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.3"
+ split-string "^3.0.1"
+
+setprototypeof@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
+ integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
+
+shebang-command@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
+ integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
+ dependencies:
+ shebang-regex "^1.0.0"
+
+shebang-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
+ integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
+
+shellwords@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
+ integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==
+
+signal-exit@^3.0.0, signal-exit@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+ integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
+
+sisteransi@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3"
+ integrity sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig==
+
+slash@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"
+ integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==
+
+snapdragon-node@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
+ integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==
+ dependencies:
+ define-property "^1.0.0"
+ isobject "^3.0.0"
+ snapdragon-util "^3.0.1"
+
+snapdragon-util@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
+ integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==
+ dependencies:
+ kind-of "^3.2.0"
+
+snapdragon@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
+ integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==
+ dependencies:
+ base "^0.11.1"
+ debug "^2.2.0"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ map-cache "^0.2.2"
+ source-map "^0.5.6"
+ source-map-resolve "^0.5.0"
+ use "^3.1.0"
+
+source-map-resolve@^0.5.0:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
+ integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==
+ dependencies:
+ atob "^2.1.2"
+ decode-uri-component "^0.2.0"
+ resolve-url "^0.2.1"
+ source-map-url "^0.4.0"
+ urix "^0.1.0"
+
+source-map-support@^0.5.6:
+ version "0.5.16"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
+ integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
+source-map-url@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
+ integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
+
+source-map@^0.5.0, source-map@^0.5.6:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+ integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
+
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+ integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+
+spdx-correct@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4"
+ integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==
+ dependencies:
+ spdx-expression-parse "^3.0.0"
+ spdx-license-ids "^3.0.0"
+
+spdx-exceptions@^2.1.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977"
+ integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==
+
+spdx-expression-parse@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0"
+ integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==
+ dependencies:
+ spdx-exceptions "^2.1.0"
+ spdx-license-ids "^3.0.0"
+
+spdx-license-ids@^3.0.0:
+ version "3.0.5"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654"
+ integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==
+
+split-string@^3.0.1, split-string@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
+ integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==
+ dependencies:
+ extend-shallow "^3.0.0"
+
+sshpk@^1.7.0:
+ version "1.16.1"
+ resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
+ integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
+ dependencies:
+ asn1 "~0.2.3"
+ assert-plus "^1.0.0"
+ bcrypt-pbkdf "^1.0.0"
+ dashdash "^1.12.0"
+ ecc-jsbn "~0.1.1"
+ getpass "^0.1.1"
+ jsbn "~0.1.0"
+ safer-buffer "^2.0.2"
+ tweetnacl "~0.14.0"
+
+stack-utils@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8"
+ integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==
+
+static-extend@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
+ integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=
+ dependencies:
+ define-property "^0.2.5"
+ object-copy "^0.1.0"
+
+"statuses@>= 1.5.0 < 2", statuses@~1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
+ integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
+
+stealthy-require@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
+ integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=
+
+string-length@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed"
+ integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=
+ dependencies:
+ astral-regex "^1.0.0"
+ strip-ansi "^4.0.0"
+
+string-width@^3.0.0, string-width@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
+ integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
+ dependencies:
+ emoji-regex "^7.0.1"
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^5.1.0"
+
+string.prototype.trimleft@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74"
+ integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==
+ dependencies:
+ define-properties "^1.1.3"
+ function-bind "^1.1.1"
+
+string.prototype.trimright@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9"
+ integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==
+ dependencies:
+ define-properties "^1.1.3"
+ function-bind "^1.1.1"
+
+string_decoder@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
+ integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
+ dependencies:
+ safe-buffer "~5.1.0"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
+ integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
+ dependencies:
+ ansi-regex "^4.1.0"
+
+strip-bom@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
+ integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=
+
+strip-eof@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
+ integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
+
+supports-color@^5.3.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
+ dependencies:
+ has-flag "^3.0.0"
+
+supports-color@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
+ integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==
+ dependencies:
+ has-flag "^3.0.0"
+
+symbol-tree@^3.2.2:
+ version "3.2.4"
+ resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
+ integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
+
+test-exclude@^5.2.3:
+ version "5.2.3"
+ resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0"
+ integrity sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==
+ dependencies:
+ glob "^7.1.3"
+ minimatch "^3.0.4"
+ read-pkg-up "^4.0.0"
+ require-main-filename "^2.0.0"
+
+throat@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a"
+ integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=
+
+tmpl@1.0.x:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
+ integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=
+
+to-fast-properties@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
+ integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
+
+to-object-path@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
+ integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=
+ dependencies:
+ kind-of "^3.0.2"
+
+to-regex-range@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
+ integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=
+ dependencies:
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+
+to-regex@^3.0.1, to-regex@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
+ integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==
+ dependencies:
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ regex-not "^1.0.2"
+ safe-regex "^1.1.0"
+
+toidentifier@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
+ integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
+
+tough-cookie@^2.3.3, tough-cookie@^2.3.4:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
+ integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
+ dependencies:
+ psl "^1.1.28"
+ punycode "^2.1.1"
+
+tough-cookie@~2.4.3:
+ version "2.4.3"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
+ integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==
+ dependencies:
+ psl "^1.1.24"
+ punycode "^1.4.1"
+
+tr46@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
+ integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=
+ dependencies:
+ punycode "^2.1.0"
+
+ts-invariant@^0.4.0:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86"
+ integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA==
+ dependencies:
+ tslib "^1.9.3"
+
+tslib@^1.10.0, tslib@^1.9.3:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
+ integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
+
+tunnel-agent@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
+ integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
+ dependencies:
+ safe-buffer "^5.0.1"
+
+tweetnacl@^0.14.3, tweetnacl@~0.14.0:
+ version "0.14.5"
+ resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
+ integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
+
+type-check@~0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
+ integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=
+ dependencies:
+ prelude-ls "~1.1.2"
+
+type-is@~1.6.17, type-is@~1.6.18:
+ version "1.6.18"
+ resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
+ integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
+ dependencies:
+ media-typer "0.3.0"
+ mime-types "~2.1.24"
+
+ultron@1.0.x:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa"
+ integrity sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=
+
+union-value@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
+ integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==
+ dependencies:
+ arr-union "^3.1.0"
+ get-value "^2.0.6"
+ is-extendable "^0.1.1"
+ set-value "^2.0.1"
+
+unpipe@1.0.0, unpipe@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
+ integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
+
+unset-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
+ integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=
+ dependencies:
+ has-value "^0.3.1"
+ isobject "^3.0.0"
+
+uri-js@^4.2.2:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
+ integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
+ dependencies:
+ punycode "^2.1.0"
+
+urix@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+ integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
+
+use@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
+ integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
+
+utf-8-validate@1.2.x:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-1.2.2.tgz#8bb871a4741e085c70487ca7acdbd7d6d36029eb"
+ integrity sha1-i7hxpHQeCFxwSHynrNvX1tNgKes=
+ dependencies:
+ bindings "~1.2.1"
+ nan "~2.4.0"
+
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
+
+util.promisify@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee"
+ integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==
+ dependencies:
+ define-properties "^1.1.3"
+ es-abstract "^1.17.2"
+ has-symbols "^1.0.1"
+ object.getownpropertydescriptors "^2.1.0"
+
+utils-merge@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
+ integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
+
+uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
+ integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
+
+validate-npm-package-license@^3.0.1:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
+ integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==
+ dependencies:
+ spdx-correct "^3.0.0"
+ spdx-expression-parse "^3.0.0"
+
+vary@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
+ integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
+
+verror@1.10.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
+ integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
+ dependencies:
+ assert-plus "^1.0.0"
+ core-util-is "1.0.2"
+ extsprintf "^1.2.0"
+
+w3c-hr-time@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"
+ integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=
+ dependencies:
+ browser-process-hrtime "^0.1.2"
+
+walker@^1.0.7, walker@~1.0.5:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"
+ integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=
+ dependencies:
+ makeerror "1.0.x"
+
+webidl-conversions@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
+ integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==
+
+whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0"
+ integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==
+ dependencies:
+ iconv-lite "0.4.24"
+
+whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"
+ integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==
+
+whatwg-url@^6.4.1:
+ version "6.5.0"
+ resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8"
+ integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==
+ dependencies:
+ lodash.sortby "^4.7.0"
+ tr46 "^1.0.1"
+ webidl-conversions "^4.0.2"
+
+whatwg-url@^7.0.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06"
+ integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==
+ dependencies:
+ lodash.sortby "^4.7.0"
+ tr46 "^1.0.1"
+ webidl-conversions "^4.0.2"
+
+which-module@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
+ integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
+
+which@^1.2.9, which@^1.3.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
+ integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
+ dependencies:
+ isexe "^2.0.0"
+
+word-wrap@~1.2.3:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
+ integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
+
+wrap-ansi@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"
+ integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==
+ dependencies:
+ ansi-styles "^3.2.0"
+ string-width "^3.0.0"
+ strip-ansi "^5.0.0"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+
+write-file-atomic@2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529"
+ integrity sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg==
+ dependencies:
+ graceful-fs "^4.1.11"
+ imurmurhash "^0.1.4"
+ signal-exit "^3.0.2"
+
+ws@^0.8.0:
+ version "0.8.1"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-0.8.1.tgz#6b65273b99193c5f067a4cf5809598f777e3b759"
+ integrity sha1-a2UnO5kZPF8Gekz1gJWY93fjt1k=
+ dependencies:
+ options ">=0.0.5"
+ ultron "1.0.x"
+ optionalDependencies:
+ bufferutil "1.2.x"
+ utf-8-validate "1.2.x"
+
+ws@^5.2.0:
+ version "5.2.2"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f"
+ integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==
+ dependencies:
+ async-limiter "~1.0.0"
+
+xml-name-validator@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
+ integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
+
+y18n@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
+ integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
+
+yargs-parser@^13.1.1:
+ version "13.1.1"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0"
+ integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==
+ dependencies:
+ camelcase "^5.0.0"
+ decamelize "^1.2.0"
+
+yargs@^13.3.0:
+ version "13.3.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83"
+ integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==
+ dependencies:
+ cliui "^5.0.0"
+ find-up "^3.0.0"
+ get-caller-file "^2.0.1"
+ require-directory "^2.1.1"
+ require-main-filename "^2.0.0"
+ set-blocking "^2.0.0"
+ string-width "^3.0.0"
+ which-module "^2.0.0"
+ y18n "^4.0.0"
+ yargs-parser "^13.1.1"
+
+zen-observable-ts@^0.8.21:
+ version "0.8.21"
+ resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d"
+ integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg==
+ dependencies:
+ tslib "^1.9.3"
+ zen-observable "^0.8.0"
+
+zen-observable@^0.8.0:
+ version "0.8.15"
+ resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15"
+ integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==
diff --git a/tests_native/custom_decoder.re b/tests_native/custom_decoder.re
index 6f8e849b..8b580021 100644
--- a/tests_native/custom_decoder.re
+++ b/tests_native/custom_decoder.re
@@ -1,9 +1,19 @@
+module IntOfString = {
+ let parse = int_of_string;
+ type t = int;
+};
+
+module StringOfInt = {
+ let parse = string_of_int;
+ type t = string;
+};
+
module My_query = [%graphql
{|
{
variousScalars {
- string @bsDecoder(fn: "int_of_string")
- int @bsDecoder(fn: "string_of_int")
+ string @ppxDecoder(module: "IntOfString")
+ int @ppxDecoder(module: "StringOfInt")
}
}
|}
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 00000000..5de634af
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,8 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+bs-platform@^7.3.2:
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-7.3.2.tgz#301f5c9b4e8cf5713cb60ca22e145e56e793affe"
+ integrity sha512-seJL5g4anK9la4erv+B2o2sMHQCxDF6OCRl9en3hbaUos/S3JsusQ0sPp4ORsbx5eXfHLYBwPljwKXlgpXtsgQ==