Skip to content

Commit 546e15f

Browse files
committed
Do not strengthen module type!
1 parent b697b83 commit 546e15f

8 files changed

+51
-131
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ npm-debug.log
1919
*.cmj
2020
*.cmt
2121
.vscode
22+
.vim

documentation/docs/changelog.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,23 @@ title: Changelog
1414
(_Tags are copied from
1515
[babel](https://github.com/babel/babel/blob/master/CHANGELOG.md)_)
1616

17-
## [1.0.0](https://github.com/reasonml-community/graphql_ppx/compare/legacy...master) (in beta)
17+
## [1.0.1](https://github.com/reasonml-community/graphql_ppx/compare/v1.0.0...v1.0.1) (2020-09-07)
18+
19+
- :bug: remove `@ppxConfig` directive from query output
20+
([b697b83](https://github.com/reasonml-community/graphql_ppx/commit/b697b83))
21+
22+
- :bug: do not strengthen module type of extended module to prevent type errors
23+
like below when the the definition is being extended
24+
([4ae9895](https://github.com/reasonml-community/graphql_ppx/commit/4ae9895))
25+
26+
```
27+
This has type:
28+
MyQuery.t_variables
29+
But somewhere wanted:
30+
MyQuery.MyQuery_inner.t_variables
31+
```
32+
33+
## [1.0.0](https://github.com/reasonml-community/graphql_ppx/compare/v0.7.2...v1.0.0) (2020-09-06)
1834

1935
There has been a lot of new features in version 1.0 of `graphql-ppx`. Below some
2036
of the main changes. After 1.0 we are going to record a more detailed changelog.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reasonml-community/graphql-ppx",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "graphql-ppx rewriter for Bucklescript/ReasonML",
55
"repository": "https://github.com/reasonml-community/graphql-ppx",
66
"author": "Tomasz Cichocinski <tomaszcichocinski@gmail.com>",

src/bucklescript/output_bucklescript_module.re

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,26 @@ let wrap_query_module =
448448
let signature =
449449
List.concat([
450450
[signature_module(module_name, signature)],
451-
signature,
451+
[
452+
Sig.include_(
453+
Incl.mk(
454+
Mty.typeof_(
455+
Mod.mk(
456+
Pmod_structure([
457+
Str.include_(
458+
Incl.mk(
459+
Mod.ident({
460+
txt: Longident.parse(module_name),
461+
loc,
462+
}),
463+
),
464+
),
465+
]),
466+
),
467+
),
468+
),
469+
),
470+
],
452471
[
453472
Sig.include_(
454473
Incl.mk(

tests_bucklescript/__snapshots__/Generate_Apollo_extensions_re.c4a6997e.0.snapshot

Lines changed: 3 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests_bucklescript/__snapshots__/Generate_Objects_extensions_re.b512b846.0.snapshot

Lines changed: 3 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests_bucklescript/__snapshots__/Generate_Records_extensions_re.330a7e2a.0.snapshot

Lines changed: 3 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests_bucklescript/__snapshots__/Generate_Template_extensions_re.2d765912.0.snapshot

Lines changed: 3 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)