Skip to content

Support extensions property #19

Closed
Closed
@MichalLytek

Description

@MichalLytek
Contributor

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

ivome

ivome commented on Sep 23, 2019

@ivome
Collaborator

This is great news... thanks for raising the issue! I added a new fieldExtensionsEstimator and added deprecation notices to the fieldConfigEstimator so we can remove this in future releases (plus those hacky TypeScript extensions of the GraphQL types we currently have).

MichalLytek

MichalLytek commented on Sep 23, 2019

@MichalLytek
ContributorAuthor

those hacky TypeScript extensions of the GraphQL types we currently have

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 😕

added a commit that references this issue on Oct 6, 2019

Merge pull request #20 from slicknode/feature/field-extension-estimator

61f5803
ivome

ivome commented on Oct 6, 2019

@ivome
Collaborator

I just published a new version v0.4.0 with this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ivome@MichalLytek

        Issue actions

          Support `extensions` property · Issue #19 · slicknode/graphql-query-complexity