Commit Graph

31 Commits

Author SHA1 Message Date
Daniel Schwartz b906288c58
chore: change facebook.github.io to relay.dev links (#1083) 2022-05-03 11:24:45 -04: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 cc12ec16fb
fix: add deprecated, description, nullable to connectionField (#578) 2020-10-27 14:21:30 -04:00
Flavian Desverne de7cdfd396
fix: connection plugin (#569)
fixes #402
fixes #450

Fixes:

- 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)
2020-10-26 09:24:20 -04:00
Tim Griesser 2bceeb915f
chore: Bumping deps & adding scripts for running examples (#530) 2020-10-03 15:50:56 -04:00
Bjorn Lu 14fcbcdc22
feat: Add queryComplexityPlugin for query cost analysis (#369)
* Add graphql-query-complexity package

* Add query complexity plugin

* Add tests

* Add example

* Add docs

* Remove redundant async
2020-02-10 19:00:45 -05:00
Tim Griesser 4351a1d051
feat: Add connectionPlugin for relay style pagination (#324)
Adds `connectionsPlugin` for cursor style connections. These adhere to the Relay specification and offer plenty of options for customization:

https://facebook.github.io/relay/graphql/connections.htm
2020-01-22 20:17:17 -05: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
Tim Griesser 17b9afb8ce
Cleanup codegen from examples to make plugins diff less noisy (#298) 2019-11-04 15:04:06 -05:00
Tim Griesser 1e932eb4b5
Initial pass at dynamic field inclusion/definition (#143)
* Initial pass at dynamic field inclusion/definition

* Split input/output custom fields, fixes #93 and #129

* Bump some lib versions

* Change around some dynamic field implementation details

* Make args override collection args

* Rename dynamicField -> dynamicMethod, export types from root

* Add decorateType, ability to specify rootType, fixes #17
2019-06-02 20:29:53 -04:00
Tim Griesser 09abed674a
.list on custom scalar type (#141)
* Fix #114 - .list on custom scalar type
2019-05-16 23:44:26 -04:00
Tim Griesser 0060cb9ec7 Don't output the version number in typegen 2019-05-16 23:34:41 -04:00
Tim Griesser 18401c465a
Fix #68, allow nested input types, fix typings for input field default values (#72) 2019-03-07 19:38:14 -05:00
Tim Griesser 4e894c2081
Add mutationField shorthand helper (#58)
* Add mutationField helper, closes #46
2019-02-23 12:25:12 -05:00
Tim Griesser 4af597f566
Fix #55 (#56) 2019-02-22 14:46:27 -05:00
Tim Griesser ee1589ae8c
Fix #44, add correct typing for union types (#45) 2019-02-18 18:04:46 -05:00
Tim Griesser fbe836a10f Bump examples for 0.9.12 2019-02-15 00:06:45 -05:00
Tim Griesser 18a306ee29 Update examples 2019-02-11 11:49:15 -05:00
Tim Griesser cab1931fe7 Update documentation & site 2019-02-05 02:33:57 -05:00
Tim Griesser 87932f785d Add new "ghost" example project (WIP) 2019-02-03 20:44:48 -05:00
Tim Griesser ad9b19184d Bugfixes:
- Fix MaybePromise implementation
- Expose AllInputTypes, AllOutputTypes, FieldType
- Fix conditional null checking for NeedsResolver
2019-01-31 17:38:35 -05:00
Tim Griesser 28bfb96720 ScalarType asNexusMethod 2019-01-31 10:09:31 -05:00
Tim Griesser 76c1380cd3 Type extension working 2019-01-30 18:11:58 -05:00
Tim Griesser e822510ef2 Full type-safety complete 2019-01-30 17:46:19 -05:00
Tim Griesser 6c896e8aa3 No need to thread the NexusGen type through, it can be inferred at the root 2019-01-30 17:26:29 -05:00
Tim Griesser 320c6bfe7f Getting close, just need to finish up args 2019-01-30 16:22:53 -05:00
Tim Griesser 4ae853ec64 Restore the correct non-null default 2019-01-29 10:41:09 -05:00
Tim Griesser f95ffc303a Schema & type generation working again, need to cleanup the wrapping 2019-01-29 10:34:27 -05:00
Tim Griesser bda93402e8
Inline resolver, full-type safety on fields
More features for #1
2019-01-19 12:41:23 -05:00
Tim Griesser 6246ab39b4 Rebuild examples w/ graphql-nexus@0.1.0 2018-12-06 11:48:39 -05:00
Tim Griesser 0d582f4ebf WIP on several new features:
- Auto typegen config
- TypeScript AST Reader Example
- Passing a function to typegen
2018-12-01 16:53:42 -05:00