Commit Graph

723 Commits

Author SHA1 Message Date
Jason Kuhrt abed6e001e chore(docs): update playground link to codesandbox
closes #597
2020-11-27 15:30:11 -05:00
Tim Griesser fae8aeb722 chore: bump jest testTimeout, seems to flake on unionTooComplexToRepresent 2020-11-27 14:40:49 -05:00
Tim Griesser cf5b2695dc
feat: support graphql@^14.5 (#677) 2020-11-27 14:22:48 -05:00
Tim Griesser 6220d85513 fix: proper typings for edge extension 2020-11-27 13:09:10 -05:00
Tim Griesser 927d4b8ca6 fix: #456, export connection plugin args 2020-11-27 13:09:10 -05:00
Tim Griesser 71ea266c9a feat: #479, allow promise to be returned from pageInfoFromNodes 2020-11-27 13:09:10 -05:00
Tim Griesser bb136009c0 feat: #399, add requireResolver: false
Will skip requiring global extension fields
2020-11-27 13:08:57 -05:00
Tim Griesser af7c06ce9d feat: #515, connection can accept non-String cursor 2020-11-27 13:08:50 -05:00
Tim Griesser 8d14709311 fix: #450 - custom edge fields not resolved 2020-11-27 13:05:36 -05:00
Tim Griesser 2dd90b4d87
fix: #618 Add inputFieldDefTypes for declarativeWrappingPlugin (#682) 2020-11-27 12:20:50 -05:00
Misha Marinenko 79e6c0278f
docs: Update index.mdx, add missing list import (#680) 2020-11-27 10:29:57 -05:00
Jason Kuhrt 13f7423dca chore(docs): add about section to prisma plugin docs 2020-11-26 10:02:30 -05:00
Jason Kuhrt d3af6076df chore: publish canary releases on every trunk commit
closes #676
2020-11-26 09:48:14 -05:00
Junggeun Lee 4296286d2a
chore(docs): tutorial typo nullable schema defined (#675)
Co-authored-by: 이정근 <junggelee@ebay.com>
2020-11-26 09:29:17 -05:00
Tim Griesser 24a78e8cf4
fix: #670 - explicit nullability for connectionPlugin (#671) 2020-11-25 09:49:27 -05:00
Jason Kuhrt f49d0b0c32
chore(docs): update to use new 0.19 api (#667) 2020-11-24 13:39:17 -05:00
Tim Griesser 15515069c1
feat: Improved description for types on output method / output field (#666) 2020-11-24 11:40:55 -05:00
Tim Griesser 5ab7dd35d1
feat: Simplified upgrade path w/ better warning messages (#663)
Co-authored-by: Jason Kuhrt <jason.kuhrt@dialogue.co>
2020-11-24 11:40:38 -05:00
Tim Griesser 57bb5b078b
fix: Ensure we can modify nullability of an interface field (#662) 2020-11-23 22:13:59 -05:00
Tim Griesser 5c73102819
fix: Fix #622, custom scalars should work with interfaceType (#661) 2020-11-23 21:38:28 -05:00
Tim Griesser eb04d8f572
fix: SDL converter list/nonNull chaining (#660) 2020-11-23 16:52:17 -05:00
Jason Kuhrt 4877161e5b fix: faux commit for dripip release 2020-11-23 15:10:00 -05:00
Tim Griesser bff7008a6b
chore: resolveType warning, restore declarativeWrapping list behavior (#658) 2020-11-23 14:41:59 -05:00
Tim Griesser 306dbaae10
feat: .nonNull / .nullable chaining, additional cleanup (#655)
- Fixes SDL conversion
- Defer wrapping until types are built
- Supports GraphQL types anywhere that a type can be used, wrapped, etc.
- Split out the wrapping, w/ `finalizeWrapping` helper which adds in the `NonNull` to the list as needed
- Make `nonNull(nonNull(T))` & `nullable(nullable(T))` no-op for simplicity
- Change: `nullable(nonNull(T))` will undo the `nonNull`
- Properly type-check's `subscriptionType` by passing `Event` generic properly
- Adds `declarativeWrappingPlugin` for previous `nullable` / `list` behavior

Co-authored-by: Flavian DESVERNE <flavian.desverne@epitech.eu>
2020-11-23 10:41:03 -05: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
Luc Vauvillier 3e8843faa7
chore(docs): add atomicOperations setting for prisma plugin (#587) 2020-11-23 09:39:30 -05:00
Jason Kuhrt 506b61b2a8
deps: update to latest (#649)
* deps: update to latest

* update docs
2020-11-23 09:27:11 -05:00
Tim Griesser 75c4c0913f
chore: Add release changelog entries to CHANGELOG.md (#656) 2020-11-23 09:26:23 -05:00
Tim Griesser ab4b627acb
chore: Restore integration codegen removed in #629 and #630 (#654) 2020-11-21 17:02:58 -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
Tim Griesser 3a3d03bc73
refactor: move wrapping helper fns to definitions/wrapping.ts (#643) 2020-11-20 07:07:52 -05:00
Tim Griesser 4f4f9f49e8
feat(plugin): add onFieldDefinition / onArgDefinition / onInputFieldDefinition (#640) 2020-11-19 11:50:14 +01:00
Tim Griesser e2c88ea3f0 chore: fix types in nullabilityGuardPlugin spec 2020-11-18 22:59:37 -05:00
Tim Griesser 1e11720e00
chore: Refine exports for plugins (#639) 2020-11-18 22:06:32 -05:00
Tim Griesser bfcc959fd6
feat: add t.modify API for modifying inherited fields (#634)
Adds `t.modify` API for modifying inherited types. 

Use cases:

- If you have an `interface` type, but want to override the resolver or description for the field per-`objectType`
- If an inherited field's value is abstract, and you want to narrow it to a subtype which conforms to the inherited type
- If you want to add additional optional arguments for an inherited field, as is permitted by the spec

The types should validate that only fields inherited from interfaces can be modified, and the `type` can only be 
changed if the result of that field is an abstract type which implements the existing inherited return type.
2020-11-18 21:58:14 -05:00
Tim Griesser 94ba687f1e
feat: deprecate plugin onInstall return for consistent API (#637) 2020-11-18 17:01:27 -05:00
Tim Griesser 36503f7bd1
chore: @tgriesser/schemats for simpler DB output in ghost example (#633) 2020-11-18 12:51:23 -05:00
Flavian Desverne de832e79ca
feat: replace list & nullable API by type wrappers (#538)
This PR removes the `nullable: boolean` and `list: boolean | boolean[]` API and replaces it with top-level type wrappers named: `list()`, `nonNull()` and `nullable()`
2020-11-18 17:59:59 +01:00
Keisuke Kan f7b9cf8678
docs: fix typo 2020-11-18 16:10:44 +01:00
Jason Kuhrt d8571213c9
chore(docs): nexus plugin prisma for prisma v2.11 (#621) 2020-11-17 15:04:21 -05:00
Tim Griesser 9ba7d9b702
refactor: Simplify typegen with keyof and intersection types (#628) 2020-11-17 13:17:22 -05:00
Flavian Desverne 5a8fcae3bd
chore: run integration tests separately (#630) 2020-11-17 18:31:13 +01:00
Flavian Desverne d5b8ea73da
chore: fix tests (#629)
- removes typegenPrinter.spec.ts generated artifacts
2020-11-17 17:16:37 +01:00
Francisco Canela 45938cfee7
chore(docs): fix little typo in 021-abstract-types.mdx (#624) 2020-11-16 13:24:19 -05:00
Tim Griesser e33906c82a
refactor: remove namespace, separate internal types (#627) 2020-11-16 13:23:28 -05:00
Flavian DESVERNE 0c4023bc6f chore: fix test 2020-11-13 20:25:20 +01:00
Flavian DESVERNE 6107b063ca chore: fix test 2020-11-13 20:24:50 +01: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
Samuel Kauffmann 5870d5e032
chore(docs): fix installation note (#609) 2020-11-12 09:14:42 -05:00
Jason Kuhrt ca744420c5 chore: update zeit example 2020-11-09 13:46:23 -05:00