Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Fragment Typematching #552

Open
Open
@fameoflight

Description

@fameoflight

I am sorry if this is not appropriate place to ask this question.

How do I get type when passing fragment, right now I have typecast them to any for typescript to stop complaining

Example

const CompanyHomePageQuery = graphql`
  query CompanyHomeQuery {
    viewer {
     id
     apps {
       id
       ...AppHomeIcon_app
     }
    }
  }
`

Now in my code fragment I have to do this

<AppHomeIcon
    key={app.id}
    app={app as any} // this is the problem I am trying to avoid
/>

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

    Issue actions