Commit Graph

20 Commits

Author SHA1 Message Date
Tim Griesser 0d06f26b12
feat: add GraphQL 16 support (#977) 2022-02-17 12:47:40 -05:00
Tim Griesser a003ff074f
fix: printer imports, follow up from #967 (#970) 2021-08-19 14:56:35 +00:00
Tim Griesser 380ed9d4ca
fix: correct imports for changes in #967 (#968)
* fix: correct imports for changes in #967
2021-08-17 19:35:56 -04:00
Jan Piotrowski 145f664914
chore(tests): update snapshots that were forgotten in #887 (#910) 2021-05-20 15:01:42 -04:00
Flavian Desverne d66e8f10d7 feat: rename typegenAutoConfig and rootTyping (#723)
BREAKING CHANGES:
- Renames `typegenAutoConfig` to `sourceTypes`
- Renames `typegenAutoConfig.sources` to `sourceTypes.modules`
- Renames `typegenAutoConfig.sources[].source` to `sourcesTypes.modules[].module`
- Renames `rootTyping` to `sourceType`
2020-12-10 19:23:23 +01:00
Flavian DESVERNE 642be8b69f feat: make contextType independent of source types
BREAKING CHANGES:
- `contextType` is no longer nested in `typegenAutoConfig`
- `contextType` can no longer references `sources` registered in `typegenAutoConfig`
- `contextType` API was refactored to use  `module` instead of `path` and `export` instead of `name`
- `rootTyping` API was refactored to use  `module` instead of `path` and `export` instead of `name`
2020-12-10 19:23:23 +01:00
Jason Kuhrt 618521dea0
feat(config): SDL file generation by default in development (#652)
Co-authored-by: Tim Griesser <tgriesser10@gmail.com>

closes #632

BREAKING CHANGE:

SDL file generation will be enabled by default in development now.

If you were enabling it manually before and outputting to project root at `schema.graphql` You can probably now just rely on the default.

If you were relying on the default to disable SDL file generation before then now you need to pass an explicit false:

```ts
makeSchema({
  outputs: {
    schema: false
  }
})
```
2020-11-23 09:51:24 -05:00
Tim Griesser 481e2c77fe
feat: Allow contextType to specify an TypingImport config (#606)
Co-authored-by: Flavian DESVERNE <flavian.desverne@epitech.eu>
Co-authored-by: Jason Kuhrt <jasonkuhrt@me.com>
2020-11-20 11:00:18 -05:00
Flavian Desverne 967d2df73e
feat: improve abstract types (#602)
BREAKING CHANGES:

- `isTypeOf` is now the _default_ strategy to discriminate members of an abstract type. To keep using `resolveType` as you might have been before, enable the following config in `makeSchema`:

```ts
makeSchema({
  features: {
    abstractTypeStrategies: {
      resolveType: true
    }
  }
})
```
2020-11-13 20:19:15 +01:00
Jason Kuhrt f60938079a
improve: remove resolver shorthands (#592)
closes #582

As discussed. In most cases resolver shorthands are not a serious use of the API.

BREAKING CHANGE:

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.
2020-11-04 12:03:29 -05:00
Flavian Desverne f8d164aee7
fix: error if root typing path is invalid (#557)
closes #396
2020-10-20 11:06:00 -04:00
Jason Kuhrt 78af75686d
chore: format with prisma-labs prettier config (#461) 2020-07-01 23:42:06 -04:00
Jason Kuhrt 3156f9bc46 refactor(style): sort imports 2020-04-07 08:19:45 -04:00
Tim Griesser 50bf2981e7
feat(epic): 0.12.0 Plugin System and Internal Refactor (#242)
See #242 for a full summary
2019-11-07 16:39:33 -05:00
Jason Kuhrt 013a606548
feat: by default typegen as an @types package (#230) 2019-10-03 14:25:01 -04:00
Tim Griesser 9f4ab9d830
Improving code coverage (#225)
* Improving overall coverage
* Improve jest config
* Remove unused internal builder methods
* Prefer non-inline snapshots
2019-09-22 21:28:27 -04:00
Flavian Desverne 611a19b6a0
[RFR] Allow schema construction even with unknown types (#155)
* Allow schema construction even with unknown types

* Fix TS type errors
2019-06-26 19:39:24 +02:00
Pascal Sthamer b1089a5665 Fix wrong fieldName type on subscriptionField (and fix backingTypes.spec.ts) (#159)
* Fix wrong fieldName type on subscriptionField

Closes #158

* Try to fix backingTypes.spec.ts

* Remove unused NexusSchemaExtensions import
2019-06-19 11:08:25 +02:00
Tim Griesser c141ce2fce Allow referencing backing types via rootTypings in codegen 2019-06-11 08:38:22 -04:00
Rutger Hendrickx 459f3cfff1 Allow enum backing types (#142)
* Allow enums to have backing types

* Update typeMatch regex references

* Ignore const enums for backing-types.

* Allow native TS enum as members config

* Allow const enum backing types

* Add assertValidName for enum keys
2019-06-05 08:55:07 -04:00