Closed
Description
As graphql-js
now has a dedicated mechanism for storing additional metadata, we should use that to place and read complexity info from constructed types:
graphql/graphql-js#2097
As graphql-js
now has a dedicated mechanism for storing additional metadata, we should use that to place and read complexity info from constructed types:
graphql/graphql-js#2097
Activity
Add fieldExtensionsEstimator, deprecate fieldConfigEstimator #19
ivome commentedon Sep 23, 2019
This is great news... thanks for raising the issue! I added a new
fieldExtensionsEstimator
and added deprecation notices to thefieldConfigEstimator
so we can remove this in future releases (plus those hacky TypeScript extensions of the GraphQL types we currently have).MichalLytek commentedon Sep 23, 2019
They are not so bad, it's better to provide typings for the properties because this will check the signature of function which results in better DX. However I haven't tried to merge declarations for
extenstions
as they might be typed as record with any 😕Merge pull request #20 from slicknode/feature/field-extension-estimator
ivome commentedon Oct 6, 2019
I just published a new version v0.4.0 with this feature
graphql-query-complexity
dependency and related code MichalLytek/type-graphql#437