Resolver shorthand API is now removed. The following will now not typecheck:
```ts
t.string('foo', () => ... )
```
Instead use:
```ts
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.
<br/>
#### 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.
<br/>
<br/>
### Features
- b19e83e Allow specifying a node module for type imports (#604)
- f8d164a error 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)
- c7eff85 output types & list items are now nullable by default (#508)
- 0ee644b upgrade 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**
```diff
import { makeSchema} from '@nexus/schema'
makeSchema({
+ nonNullDefaults: {
+ output: true
+ }
})
```
**Changing type-level configuration to revert to non-nullable output types**
```diff
import { objectType } from '@nexus/schema'
objectType({
name: 'User',
nonNullDefaults: {
+ output: true
}
definition(t) {
/* ... */
}
})
```
**Updating lists output types to be non-nullable**
```diff
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)
- efa96cb new docs site (#500)
- 0ee644b (breaking) upgrade to graphql v15 (#486)
#### Fixes
- e4a68e5 config file fixed (#522)
- 646879d change netlify config (#519)
- 796add7 Github link
- b7ecbb0 Logo URL and Github link
- 2327a94 force release
- 3c38a65 message for missing resolveType in interfaces (#495)
#### Improvements
- 2fef488 tmp: tmp/index.html
- 99b34f6 temp: Temporary redirects for old nexus.js.org (#514)
- 5e156ac docs: update asNexusMethod example with the changes from #473 (#476)
#### Chores
- a44dbe4 fix link
- f8288b5 fix link
- 58c3ad9 release changes
- ddb1211 upgrade dripip
#### Unspecified Changes
- 4bd0ffc Update netlify.toml (#521)
### 0.15.0
#### BREAKING CHANGES
- 1d97b78 allow asNexusMethod to specify TS type (#473)
The global TS type `NexusGenRootTypes` no longer contains scalars. All scalars now live under a new global TS type named `NexusGenScalars`.
```ts
// before
let foo: NexusGenRootTypes['String']
```
```ts
// after
let foo: NexusGenScalars['String']
```
- 122b0e1 base `hasNextPage` in connectionPlugin upon gt not gte (#458)
#### Features
- 1d97b78 (breaking) allow asNexusMethod to specify TS type (#473)
- Create a new `NexusGenScalars` for all scalar types
- Remove scalars from `NexusGenRootTypes` (might be a breaking change, need review)
- Use the `NexusGenScalars` for all non specified (base GraphQL) scalars in `input` and `output` types
- Add `rootTyping` parameter to `asNexusMethod` to allow the user to specify it, otherwise it will fallback to the `backingTypeMap`
- 903ceb8 add subscriptionType (#462)
- ee7c371 use prettier api to load config (#460)
- 9c8e776 support typescript 3.9 (#459)
- 122b0e1 (breaking) base hasNextPage in connectionPlugin upon gt not gte (#458)
#### Fixes
- 61eccca MaybePromiseDeep case of null with .then (#475)
- 5b900b1 connectionPlugin config: allow first and last to be zero (#436)
#### Improvements
- bf0df64 tests: add windows to os matrix (#405)
#### Chores
- f0c163a move renovate config into github dir
- 78af756 format with prisma-labs prettier config (#461)
- fe2553c Update repo name in examples readme (#443)
- b3abdb9 dripip managed version
### 0.14.0
#### Features
- 133c4a4 publish esm builds (#438)
- a6c29ba allow control over nexus schema import id (#408)
#### Fixes
- 8c7615e return types of queryField and mutationField (#415)
- 035e0a1 typegen stable path generation with Windows (#400)
#### Improvements
- 286bd66 improve: update warning to use new package name
- feat(deps): Bumps the default minimum version of graphql-js to 14.5.0
Nexus uses the new [`extensions` property](https://github.com/graphql/graphql-js/pull/2097) on types to store metadata provided to Nexus types, in order to make them usable by plugins.
- feat: Adds "Plugins" API, [see the docs](docs/api-plugins.md) for more info on what all these can help accomplish
- feat(plugin): Add `nullabilityGuardPlugin`. See [the docs](docs/plugin-nullabilityGuard.md) for more info
- feat(plugin): Add `fieldAuthorizePlugin`. See [the docs](docs/plugin-fieldAuthorize.md) for more info
This 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 `shouldExitAfterGenerateArtifacts` option to `makeSchema`
The `shouldExitAfterGenerateArtifacts` makes 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 `nexusWrappedType`
This was an internal implementation detail which should not affect end users
- refactor: Removes `t.modifyType` API
This may not have ever worked, it was only intended to modify fields on an `objectType` which 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