Generate Objects › subscription.re › output [@ocaml.ppx.context { tool_name: \"migrate_driver\", include_dirs: [], load_path: [], open_modules: [], for_package: 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; }; 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; /** The GraphQL query */ let query: string; /** Parse the JSON-compatible GraphQL data to ReasonML data types */ let parse: Raw.t => t; /** Serialize the ReasonML GraphQL data that was parsed using the parse function back to the original JSON compatible data */ let serialize: t => Raw.t; let serializeVariables: unit => unit; let makeVariables: unit => unit; let makeDefaultVariables: unit => 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\"; } = { [@ocaml.warning \"-32\"]; 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; }; 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; let query = \"subscription {\\nsimpleSubscription {\\n__typename\\n...on Dog {\\nname \\n}\\n\\n...on Human {\\nname \\n}\\n\\n}\\n\\n}\\n\"; let parse: Raw.t => t = value => { 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}; }; let serialize: t => Raw.t = value => { 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\"; };