UNPKG

3.56 kBMarkdownView Raw
1# Changelog
2
3All notable consumer-facing changes are documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
4and from `v0.14.0`, this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
6<!-- ## [Unreleased] -->
7
8### Changed
9
10- Upgrade yargs to `15` [[#107](https://github.com/Shopify/graphql-tools-web/pull/107)]
11- Update dependencies (`chalk`, `change-case`, `chokidar`, `upper-case-first`) [[#110](https://github.com/Shopify/graphql-tools-web/pull/110)]
12- Upgrade fs-extra to v9 [[#105](https://github.com/Shopify/graphql-tools-web/pull/105)]
13- Upgrade prettier to `v2.0.4` and change `eslint-plugin-shopify` to `@shopify/eslint-plugin` [[#104](https://github.com/Shopify/graphql-tools-web/pull/104)]
14- Upgrade graphql to `v14.6.0` [[#104](https://github.com/Shopify/graphql-tools-web/pull/104)]
15
16## [0.18.0] - 2019-10-09
17
18### Changed
19
20- duplicate checks now include fragments [[#88](https://github.com/Shopify/graphql-tools-web/pull/88)]
21
22## [0.17.0] - 2019-04-01
23
24- Added a `--config` option to allow a JSON-serialized config an an alternative to looking up a `.graphqlconfig` [[#70](https://github.com/Shopify/graphql-tools-web/pull/70), thanks to [alexkirsz](https://github.com/alexkirsz)]
25
26## [0.16.0] - 2019-03-11
27
28### Changed
29
30- Upgrading `graphql` to `^14.0.0` (`14.1.1`) [[#72](https://github.com/Shopify/graphql-tools-web/pull/72)]
31
32## [0.15.1] - 2019-01-22
33
34### Fixed
35
36- Using static utility functions from `graphql-tool-utilities` instead of `GraphQLProject` augmentations to prevent `TypeError: project.resolveSchemaPath is not a function` when a duplicate `graphql` packages exist in the node package dependency chain. [[#73](https://github.com/Shopify/graphql-tools-web/pull/73)]
37
38## [0.15.0] - 2019-01-22
39
40### Added
41
42- You can now pass a `--custom-scalars` flag (or the equivalent `customScalars` option in Node.js) to reference custom types that should be used for custom scalars in GraphQL [[#63](https://github.com/Shopify/graphql-tools-web/pull/63)]
43
44### Changed
45
46- The library now generates an `Other` type for union/ intersection fields, even when the type is "fully covered" [[#64](https://github.com/Shopify/graphql-tools-web/pull/64)]. Before, if there were only a single type that implemented the union or interface, it was generated without being postfixed with the implementing type's name, and without an `Other` type. If all implementing types were queried in some way, it would include the types with postfixed names, but would not include an `Other` type.
47
48 This can be a breaking change if you were querying fields where only a single type implemented a union or interface, as the types for these fields will have their names changed. For example, given the following schema:
49
50 ```graphql
51 type Ball = {
52 color: String!
53 }
54
55 union Object = Ball
56
57 type Query = {
58 object: Object
59 }
60 ```
61
62 And this query:
63
64 ```graphql
65 query BallQuery {
66 object {
67 ... on Ball {
68 color
69 }
70 }
71 }
72 ```
73
74 The library used to generate a type `BallQueryData.Object` with `{color: string}`, because `Ball` was the only implementing type. Now, the library will generate a `BallQueryData.ObjectBall` and a `BallQueryData.ObjectOther`, which represents future implementing types of `Object`. When a `__typename` field is added, either explicitly or with the `--add-typename` flag, the `Other` type has a `__typename: ''` definition, which allows you to disambiguate it from results that did query a member of the union or interface.
75
\No newline at end of file