15 KiB
Changelog
0.18.0
BREAKING CHANGES
Remove resolver shorthands
#592 → f609380
Resolver shorthand API is now removed. The following will now not typecheck:
t.string('foo', () => ... )
Instead use:
t.string('foo', { resolve: () => ... })
Runtime support is still intact but will result in a logged warning. Runtime support will be removed in the next Nexus release.
Remove dynamic output builtins
9f01342 → #590
ext is no longer exported. The relayConnectionField and collectionField dynamic output methods have been removed. In their place try the connection plugin.
Features
b19e83eAllow specifying a node module for type imports (#604)
Fixes
2e93338deduplicate interfaces implementing interfaces (#608)0064dc9#588, #384 non-null list items & connection nullability (#598)
Improvements
f609380(breaking) remove resolver shorthands (#592)9f01342(breaking) remove dynamic output builtins (#590)
Docs
Chores
6e06f8fFixes broken windows tests (#607)
0.17.0
Features
-
9bfdf2callow interfaces to implement other interfaces (#496) -
b4e0debadd onObjectDefinition / onInputObjectDefinition (#533) -
f8d164aerror feedback if root typing path is invalid (#557)This may be a breaking change if you were relying on pointing root typing path to a non-file for some reason in the past. We think for almost all users this will not be a breaking change however.
Fixes
10c5f8b"union too complex to represent" for large union types (#571)cc12ec1(connection plugin) add deprecated, description, nullable to connectionField (#578)de7cdfd(connection plugin) various fixes (#569)- Global connection field extensions were never executed
- Typings of global connection field extension (root, args and the resolver return type was wrong)
- Typings of local connection field extension (everything was any)
2edfcfasubscription type static typings (#564)10208e3input fields with default should not be typed as optional (#563)
Improvements
Docs
489b5abdocs: Fix ts-node-dev flag in the docs (#529)fb1216eheader media query (#554)2aaaf5cfix nullabillity guard docs (#575)980920afix for outdated prisma-labs link in the documentation #518 (#572)9960015Update 06-chapter-5-persisting-data-via-prisma.mdx (#574)e65f6efRemove references to nexus framework (#528)c68a94cfix typo in migration guide (#527)69af932fix typo in nexus framework migration guide (#526)8cea40aFix a prisma client call b/c latest Prisma Client (#535)0a6db6afix link to announcement (#544)e2cfcb0fix typo in 02-chapter-1-setup-and-first-query docs (#547)ebdb55aUpdate docs content (#553)00fb8a6fix duplicate in 020-nexus-framework-users.mdx (#561)04fe2f5touch api/schema.ts (#562)ceeea8cfix typosd4d32f7fix migration guide ts-node command0dd8ea3Fix a typo in 030-neuxs-framework-prisma-users.mdx (#537)d1bb819Remove framework mention, update link (#525)
Chores
393de57update test in trunk.ymla8df05cUse codecov/codecov-action GH action (#534)85bf467Restoring codecov (#532)8f3189cKeep prettier config local to the project (#531)2bceeb9Bumping deps & adding scripts for running examples (#530)27d5b82update url in package.json (#524)
0.16.0
BREAKING CHANGES
c7eff85output types & list items are now nullable by default (#508)0ee644bupgrade to graphql v15 (#486)
MIGRATION GUIDE
As Nexus Schema just made output types and list items nullable by default, there's a couple of changes you need to do to produce the same schema as before the update.
Changing global defaults to revert to non-nullable output types
import { makeSchema } from '@nexus/schema'
makeSchema({
+ nonNullDefaults: {
+ output: true
+ }
})
Changing type-level configuration to revert to non-nullable output types
import { objectType } from '@nexus/schema'
objectType({
name: 'User',
nonNullDefaults: {
+ output: true
}
definition(t) {
/* ... */
}
})
Updating lists output types to be non-nullable
import { objectType } from '@nexus/schema'
objectType({
name: 'User',
definition(t) {
t.field('posts', {
- list: true
+ list: [true]
})
}
})
Features
c7eff85(breaking) output types & list items are now nullable by default (#508)efa96cbnew docs site (#500)0ee644b(breaking) upgrade to graphql v15 (#486)
Fixes
e4a68e5config file fixed (#522)646879dchange netlify config (#519)796add7Github linkb7ecbb0Logo URL and Github link2327a94force release3c38a65message for missing resolveType in interfaces (#495)
Improvements
2fef488tmp: tmp/index.html99b34f6temp: Temporary redirects for old nexus.js.org (#514)5e156acdocs: update asNexusMethod example with the changes from #473 (#476)
Chores
Unspecified Changes
4bd0ffcUpdate netlify.toml (#521)
0.15.0
BREAKING CHANGES
-
1d97b78allow asNexusMethod to specify TS type (#473)The global TS type
NexusGenRootTypesno longer contains scalars. All scalars now live under a new global TS type namedNexusGenScalars.// before let foo: NexusGenRootTypes['String']// after let foo: NexusGenScalars['String'] -
122b0e1basehasNextPagein connectionPlugin upon gt not gte (#458)
Features
-
1d97b78(breaking) allow asNexusMethod to specify TS type (#473)- Create a new
NexusGenScalarsfor all scalar types - Remove scalars from
NexusGenRootTypes(might be a breaking change, need review) - Use the
NexusGenScalarsfor all non specified (base GraphQL) scalars ininputandoutputtypes - Add
rootTypingparameter toasNexusMethodto allow the user to specify it, otherwise it will fallback to thebackingTypeMap
- Create a new
-
903ceb8add subscriptionType (#462) -
ee7c371use prettier api to load config (#460) -
9c8e776support typescript 3.9 (#459) -
122b0e1(breaking) base hasNextPage in connectionPlugin upon gt not gte (#458)
Fixes
61ecccaMaybePromiseDeep case of null with .then (#475)5b900b1connectionPlugin config: allow first and last to be zero (#436)
Improvements
bf0df64tests: add windows to os matrix (#405)
Chores
f0c163amove renovate config into github dir78af756format with prisma-labs prettier config (#461)fe2553cUpdate repo name in examples readme (#443)b3abdb9dripip managed version
0.14.0
Features
Fixes
8c7615ereturn types of queryField and mutationField (#415)035e0a1typegen stable path generation with Windows (#400)
Improvements
286bd66improve: update warning to use new package name358c33erefactor: add typegen utils module72a13a9refactor: update lang headerscd08bb2refactor: update lang headersb9df04brefactor: getOwnPackage util (#409)3156f9brefactor: sort imports
Chores
8c7b047setup dripip for release scripts7fce3dcfix links (#433)57f1c7cupdate example lock file, fix tests6e58acdDisable Renovate (#430)0518101fix typo on readme file (#420)70d2abbfix linkd74f997examples update17fad3aupdate snapshots9deb327setup renovatea10463eupdate lockfile entries (#404)ccae81aupdate changelog
Unspecified Changes
0.13.1
- fix: remove transition postinstall message
0.13.0
The first release of Nexus schema under the package name @nexus/schema
0.12.0
The last release of Nexus schema under the package name nexus
See previous release notes for details on what's new in 0.12.0
0.12.0-rc.14
- improve: add post-install framework notice (#398)
0.12.0-rc.13
- improve: add post-install framework notice (#398)
- fix: typegen always use manifest for package import (#382)
0.12.0-rc.12
- feat: respect manifest name in typegen imports (#380)
0.12.0-rc.11
- fix: TypeScript error from missing
graphql-query-complexityimport (#376)
0.12.0-rc.10
- feat: add
queryComplexityPlugin(#369) - feat: expose
nameonfieldConfig(#368)
0.12.0-rc.9
- fix: iteration if # nodes requested > connection length
0.12.0-rc.8
- fix: typings for
connectionPluginnode field (#364)
0.12.0-rc.7
- feat: Added
connectionPlugin(#324)
0.12.0-rc.6
- fix: #329: Union members typing (#363)
- fix: #361, error when using interfaceType & implements (#362)
0.12.0-rc.5
- feat: Add
customPrintSchemaFnto makeSchema config
0.12.0-rc.4
-
refactor: Remove NEXUS_SHOULD_GENERATE_ARTIFACTS env var
-
feat: Add
shouldExitAfterGenerateArtifacts -
Warn on missing
outputsinmakeSchemaconfig -
Type-level
defaultResolverhas been removed, similar functionality can be achieved with theonCreateFieldResolverplugin API
0.12.0-rc.2, rc.3
- fix: bug in nullability check plugin
0.12.0-rc
-
feat(deps): Bumps the default minimum version of graphql-js to 14.5.0
Nexus uses the new
extensionsproperty on types to store metadata provided to Nexus types, in order to make them usable by plugins. -
feat: Adds "Plugins" API, see the docs for more info on what all these can help accomplish
-
feat(plugin): Add
nullabilityGuardPlugin. See the docs for more info -
feat(plugin): Add
fieldAuthorizePlugin. See the docs for more infoThis is the same behavior as before, but implemented more flexibly as a plugin. This will be automatically added if no plugins are specified, otherwise it will need to be imported & added to
makeSchema. -
feat(schema): Adds
shouldExitAfterGenerateArtifactsoption tomakeSchemaThe
shouldExitAfterGenerateArtifactsmakes it possible to exit after the types are generated, useful if you do not check a schema artifact into source control, but wish to generate before the code runs. -
refactor: Removes
nexusWrappedTypeThis was an internal implementation detail which should not affect end users
-
refactor: Removes
t.modifyTypeAPIThis may not have ever worked, it was only intended to modify fields on an
objectTypewhich were originally implemented by an interface. Please open an issue if this is a breaking change for you, so we can understand the use-case and design a better API. -
test: Improved code coverage, adds base threshold to new PRs
beta.14
- feat(plugins): onInstall hook (#236)
- feat(deps): add support for TypeScript 3.6 (#255)
beta.13
- fix(typegen): explicitly await removeFile before write (#254)
beta.12
-
feat(config):
env var for should-generate-artifacts (#244)You can now set the(removed, see 0.12 release notes)shouldGenerateArtifactsconfig option by env varNEXUS_SHOULD_GENERATE_ARTIFACTS=true|false. -
fix(typegen): delete prev file before writing next (#252)
Before, sometimes, you would have to open the typegen file to make VSCode pick up its changed version. This change should reduce/remove the need for this workaround.
-
feat:
by default typegen as an @types package (#230)BREAKING CHANGE
You should not have to configure typegen manually anymore. We generate by default into
node_modules/@types/nexus-typegenwhich TypeScript will automatically pick up. If you use thetypestsccompiler option however, make sure to includenexus-typegen.This is a breaking change because typegen is enabled even when config(removed, see 0.12 release notes)outputshave not been configured (before, they were required). The heuristics ofshouldGenerateArtifactsremain unchanged.
0.11.7
- Types: Allow Promise return value for subscriptions
0.11.6
- More for #55, incorrect return types.
0.11.5
- Fix lists w/ configurable depth/nullability, #89
0.11.4
- Fix import path gen on windows, #84
- More improvements to
MaybePromiseDeep
0.11.3
- Fix type for passing
NexusWrappedTypeas arg type #81 - Fix types on
MaybePromiseDeep
0.11.2
- Fix
mkdirfor versions of node without recursive option (< 10.15.1).
0.11.1
- Export
queryField&subscriptionFieldon public API
0.11.0
- Fix allowing nested input types (#68), fixes default type definitions for input fields
- Add
queryFieldabstraction to mirrormutationField - Alpha release of
subscriptionField(working, but undocumented) for GraphQL subscriptions
0.10.0
- Add an optional field level authorize #32, part of a more robust authorization story in #23
- Add mutationField abstraction, #46
0.9.17
- More for #55, type error on Promise/null resolve
0.9.16
- Fix #52, args being incorrectly imported as types
- Feature: extendInputType, #51
0.9.15
- Fix #55, type error for Promise numeric field return
0.9.14
- Fix #44, add correct typings for union type
0.9.13
- Fix #41, replace
path.sepwith '/' intypegenAutoConfig
0.9.12
- Fix #33, consistent
t.listchaining output for inputs & scalars - Fix #34, include used imports on SDL converter
- Fix #27, args output for SDL converter
- Other SDL converter cleanup: reference types rather than strings, default values
0.9.11
- Fix typing regression in 0.9.10
0.9.10
- Fix #26, incorrect typing on boolean return type
0.9.9
TypegenConfigSourceModule:sources.module->sources.source
0.9.8
- Fix
MaybePromiseDeeptyping for non-object values NexusGenCustomScalarMethods->NexusGenCustomDefinitionMethodsfor when we allow non-scalars to beasNexusMethod
0.9.7
- Fix
MaybePromiseDeeptyping - Add
asNexusMethodto annotate GraphQLScalarType
0.9.6
- Fallback Query construction to
missingTypeinternally
0.9.5
- Fix
nonNullDefaultson schema - Finalize objects as they are constructed
- Changes to a few internal methods
0.9.4
- Internal: nexusWrappedFn -> nexusWrappedType
0.9.3
- Minor internal changes
0.9.2
- Fixes for conditional nullability check
- Fixes for return type of MaybePromiseDeep
- Docs cleanup
0.9.1:
- General deploy/package.json cleanup
0.9.0:
- Major API changes. See #16 for more info
0.7.0-alpha.1
Changed the type-signatures around so fields which are not defined in the backing types associated with the
0.6.2
Initial release