Skip to content

@dotansimha dotansimha released this Aug 16, 2019 · 21 commits to master since this release

Do you want The Guild to keep your codebase up to date and run your build on each GraphQL Code Generator commit so we'll make sure not to break your app?
Contact us here: the-guild.dev/connected-build

core/cli

  • Update dependencies
  • Fixed issues with graphql-toolkit - not it will no longer try to require code files when looking for operations.
Assets 2

@dotansimha dotansimha released this Aug 16, 2019 · 25 commits to master since this release

Do you want The Guild to keep your codebase up to date and run your build on each GraphQL Code Generator commit so we'll make sure not to break your app?
Contact us here: the-guild.dev/connected-build

core/cli

  • Update dependencies
  • Sort documents by file-path in order to avoid inconsistency coming from globy (#2311)
  • Fix issues with swallowed errors when schema/documents are loaded (#2318)
  • Introduce Lifecycle hooks (#2361), make sure to read the latest docs in order to use Prettier now.
  • Removed prettify option (not a breaking change because it only apply to code beautify - you can now use lifecycle hooks for that)
  • Fix for issues with output file not being ignored correctly
  • Move normalize method to plugin-helpers lib
  • Able to provide custom fetch implementation (#2369)
  • Allow to load schema and documents from node_modules
  • Fixes for issues with exported schema from code file that has scalars.
  • Support extend input.
  • Improvements for watch mode: avoid triggering the codegen when not need, added hash calculation to avoid file-system access when not needed, trigger reload when the config file changes.

typescript-react-apollo

  • Generate lazy query hooks on react-apollo plugin (#2309)
  • [typescript-react-apollo] Add support for importing document node from external file for hooks and HOCs (#2331, thanks @eddeee888)
  • properly dedupe react hooks names (#2375, thanks @anderson-amorim )
  • Fix problem with unnecessary fragment imports for external mode (#2360, thanks @eddeee888)

typescript-operations

  • Generate correct union/interface type definitions (#2248, thanks @n1ru4l)
  • Fixed issue with missing Types import when variables are set for queries (when used with near-operation-file preset)
  • Fix issues with non-boolean avoidOptionals - now only true will be considered as true value, and not object.
  • Fix issues with preResolveTypes and enums (#2385)

flow-operations

  • Generate correct union/interface type definitions (#2248, thanks @n1ru4l)
  • Fixed issue with missing Types import when variables are set for queries (when used with near-operation-file preset)
  • Fix issues with preResolveTypes and enums (#2385)

typescript

  • Fix enums usage in args (#2370)

typescript-resolvers

  • Fix SubscriptionSubscribeFn interface (#2346, thanks @const86)
  • Support namespaces in mappers (#2352)
  • Include NonNull argument as required (#2348)
  • Some resolver query arguments are generated as optional but are required in schema #2323

near-operation-file

  • Deduplicate fragment names (#2371)

docs/website

Assets 2

@dotansimha dotansimha released this Aug 7, 2019 · 91 commits to master since this release

Core

  • Update dependencies
  • Fixes for process.env.DEBUG - not it's possible to mute it if needed (#2227, thanks @Qeneke)
  • Minor type changes for visitor-plugin-common (#2266, thanks @james2mid)
  • Allow plugin's addToSchema to be a function that depends on plugin config.
  • Fix for prettier parsers (use latest instead of deprecated).
  • Upgrade graphql-toolkit and use globby for easier glob (#2283) - not it's easier to exclude documents of schema files using negative glob.
  • Add newline character at the first line of multiline comments (#2291)

typescript

  • Fixed issue with enumValues as string (import all enums from a single file and introspection types - now they are ignored) (#2181)
  • Fix external enums to be re-exported from the generated file when they are imported from external file (#2233)
  • Added enumPrefix configuration - you can now disable the typesPrefix for enums (#2267)
  • Added missing dependency in package.json (ae47c71)
  • [TypeScript] Added support for generating output with no export (#2278)
  • Fixes for issues with js objects and scalars config (#2286)

flow

  • Fixed issue with enumValues as string (import all enums from a single file and introspection types - now they are ignored) (#2181)
  • Fix external enums to be re-exported from the generated file when they are imported from external file (#2233)
  • Added enumPrefix configuration - you can now disable the typesPrefix for enums (#2267)
  • Added support for generating output with no export (#2278)

typescript-react-apollo

  • Added support for React-Apollo V3 (#2182)
  • Remove Partial from ReactApollo HOC (#2297)
  • Fix custom HOC data props type names (#2166)
  • Add withResultType and withMutationOptionsType options (#2172, thanks @eddeee888)
  • Fix issues with unused fragments imports with noGraphQLTag (#2260)
  • Allow for skip to be a boolean type (#2251, thanks @boom)
  • Fix issues with react-apollo plugin and compatibility plugin (#2285)
  • Add option to import document nodes from an external file (#2261, thanks @eddeee888)

documents-nodes

  • Fixed issue with missing fragments (#2295)

typescript-operations

  • Fix for issues with RequireFields that caused invalid usage of generics (#2169)
  • Introduce dedupeOperationSuffix to operations plugin - allow you to make sure the operation suffix is not duplicated (#2258)
  • Introduce a new way to use avoidOptionals - now you can specify when to use it (#2191, thanks @ekfn)
  • Fixes for missing modifiers with preResolveType (#2175) (#2270)
  • Added support for generating output with no export (#2278)
  • Fixes for enums and preResolveTypes - now enums values will be pre-resolved as well (#2284)

near-operation-files preset

  • Allow duplicate operations when near-operation-file is used (#2269)

typescript-resolvers

  • Added support for Apollo Federation (#2275)
  • Allow to customize ResolverTypeWrapper (#2254)

add

  • Fixed issues with multiline string (#2169)

typescript-urql

  • Add variables type parameter to urql useMutation hook (#2171)
  • Fix issues with unused fragments imports with noGraphQLTag (#2260)
  • Add option to import document nodes from an external file (#2261, thanks @eddeee888)

typescript-apollo-angular

  • Fix issues with unused fragments imports with noGraphQLTag (#2260)
  • Add option to import document nodes from an external file (#2261, thanks @eddeee888)

🚀🚀🚀 NEW PLUGIN: @graphql-codegen/type-graphql

#2177, thanks @borremosch

Documentation

Thanks @glenwinters for the help with the docs!

Assets 2

@dotansimha dotansimha released this Jul 12, 2019 · 194 commits to master since this release

Core

  • Update dependencies
  • Fix a bug that caused the programmatic usage to fail when there were not documents (d38dde4)
  • Fix watch mode when using presets (#2072, thanks @mvestergaard)
  • Improve performance by not building schema AST over and over (#2073, thanks @mvestergaard)
  • Add config option for disabling output formatting (#2074, thanks @mvestergaard)
  • Allow codegen to skip schema building when it's not possible - required for plugins that use addToSchema (#2120)
  • Fix import causing issues when compiled to commonjs (#2126, thanks @mvestergaard and @therealtbs)

NEW PLUGIN: typescript-document-nodes

With this plugin, you can easily compile your GraphQL document files into a .ts file that exports DocumentNode (so no need to do that on runtime).
Thanks @dex4er !

typescript plugin

  • You can now pre-resolve types, and avoid using Pick in your generated output (#2107)
  • Added addUnderscoreToArgsType - set this to true if you have a conflicts with generates Args types (#2111, thanks @mxstbr)
  • Fix the combination of typesPrefix and enumValues (#2121)
  • Allow to use a single file for all enums with enumValues (#2121)
  • Added graphql as peerDependency (#2142)

flow plugin

  • You can now pre-resolve types, and avoid using $Pick in your generated output (#2107)
  • Fix the combination of typesPrefix and enumValues (#2121)
  • Allow to use a single file for all enums with enumValues (#2121)

near-operation-file preset

  • Use the proper output filename when invoking prettier (#2071, thanks @mvestergaard)
  • Fixed fragments imports and eliminate all unnecessary imports (#2099)
  • Fixed: before declare fragment for .graphql files causes self imports and duplicated declarations as a result (#2099)
  • Fixes issue where base types file is not referenced (#2137, thanks @mvestergaard)
  • Guard against duplicate fragment names in near-operations-file (#2139, thanks @mvestergaard)

typescript-operations plugin

  • Fixed issues with fragments and noGraphQlTag (#2106)
  • Added queryResponseSuffix that allow you to customize the suffix of the generated result type (#2116, thanks @jlkiri)

typescript-compatibility plugin

  • Fixes issues with interfaces (d4804df)

typescript-react-apollo plugin

  • new option reactApolloVersion- allow you to get the correct output according to the version of React-Apollo you prefer to use (#2077, thanks @ken0x0a )
  • Generate HookResult type (#2133)

typescript-stencil plugin

  • Added support for Stencil v1 (#2075)

schema-ast plugin

  • Set comment descriptions to false by default (#2085, thanks @jdreg95)
  • Allow to print schema with directives (#2129, thanks @alx13)

typescript-urql plugin

  • Fix generics for operation props to match the latest api (#2132)

typescript-resolvers plugin

  • Strip all extraneous type import characters (#2090, thanks @blakeembrey)
  • Override optional declaration of arguments type when used with default values (#2122)

flow-resolvers plugin

  • Strip all extraneous type import characters (#2090, thanks @blakeembrey)
  • Override optional declaration of arguments type when used with default values (#2122)

Docs & Website

Assets 2

@dotansimha dotansimha released this Jun 23, 2019 · 294 commits to master since this release

Core

  • Update dependencies
  • Remove graphql from dependencies.
  • Add support to use URLs as default value in the yml file (#2035, thanks @naglik)
  • Fix issues with programatic usage when documents field is not specified.

TypeScript

  • Fixes issue with transformUnderscore and update docs
  • Remove the option to change declaration kind for unions (#2049)

TypeScript Resolvers

  • Fix for circular type dependencies (#2033)
  • Use ResolverTypeWrapper only in returned values not in resolver parents (#2044)
Assets 2

@dotansimha dotansimha released this Jun 19, 2019 · 311 commits to master since this release

Core

  • Updated dependencies
  • Fixed issue with init command that didn't add the introspection plugin dependency (#2012)
  • Fixes issue with init - the default location of documents is src/**/*.graphql now (#2012)
  • Use empty array when documents are not specified in programatic usage (#2015)
  • Added support for loading env vars before loading the yml file (#2016)
  • Added support for adding a default value for environment variables (#2016)

Docs & Website

  • Updated documentation for CLI flags
  • Updated documentation for codegen.yml config file
  • Updated documentation regarding dotenv integration
  • Add Search feature to the website

TypeScript

  • Move validateTs and compileTs to testing, make ts visitors public - now you can use it to test and validate your generated TypeScript code easily (#2003)
  • You can now choose to export TypeScript interface instead of TypeScript type Interface Option (#1923)

TypeScript Operations

  • Fix for wrong type for variable with default value (#2018, thanks @n1ru4l)

TypeScript Resolvers

  • Added support for mapper from default export (#2014)
  • Fix issues with mappers and indirection usage of types (#2022)
  • Introduce MaybePromise - allow resolvers to return Promise or Promise[] (#2023)

Flow Resolvers

  • Added support for mapper from default export (#2014)
  • Fix issues with mappers and indirection usage of types (#2022)
  • Introduce MaybePromise - allow resolvers to return Promise or Promise[] (#2023)
Assets 2

@dotansimha dotansimha released this Jun 9, 2019 · 344 commits to master since this release

Core

  • Update dependencies
  • Fixed issues with website and live demo

Add Plugin

  • Allow add plugin to choose where to add the content (#1921)

TypeScript React-Apollo

  • Make variables optional if skip is provided (#1926)
  • Fix QueryHookOptions for @apollo/react-hooks (#1962)
Assets 2

@dotansimha dotansimha released this May 19, 2019 · 399 commits to master since this release

Core

  • Update dependencies
  • Update documentation (thanks @rfreydi, @Urigo )
  • Remove use of NODE_TLS_REJECT_UNAUTHORIZED env var. (#1820)
  • Fixes to support building and testing with Node 12.
  • Update CI to run with Node 12.
  • Added support for "presets".
  • Extend the possible return values of pluginFn in order to allow it to return prepend, content and append - this way all plugins are getting a better output, with imports at top of the file, and less conflicts about duplicate identifiers (#1869)
  • Better errors output - now if the codegen tries to load schema from a code file, it will make sure to display all compilation/syntax/exceptions (a2d52a5)

🚀 🎉 NEW PLUGIN: typescript-urql (#1814)

  • If you are using urql as your GraphQL client, this plugin will create a ready-to-use HOC/Component/Hooks with full type-safety according to your queries/mutations. (Thanks @mxstbr !)

🚀 🎉 NEW PRESET: near-operation-file

Added in #1846, this preset allow you to easily generate your client-side operations code near your original operation file.
Also had some fixes in #1893

TypeScript

  • Add __typename to base TS and flow types (#1701)
  • Add option for non-optional typename in operations (#1879)

TypeScript Operations

  • Add option for non-optional typename in operations (#1879)

TypeScript Compatibility

  • Better output when running along with react-apollo plugins, fixed issue with withHOC: false and a Props (#1889)

TypeScript Resolvers

  • Fix for resolvers type mapping when it refers to itself (#1891)

TypeScript React Apollo

  • Make suffix of generated React Apollo components customizable (#1843)
  • Import necessary imports only if they're used (#1853)
  • Export react-apollo component props (#1854)

TypeScript GraphQL Files Modules

  • Allow specifying module path prefix (#1875)
Assets 2

@dotansimha dotansimha released this May 16, 2019 · 862 commits to master since this release

  • Apply fix from: #1806, removed NODE_TLS_REJECT_UNAUTHORIZED.
Assets 2
You can’t perform that action at this time.