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

Fragment Typematching #552

Open
fameoflight opened this issue Dec 20, 2021 · 0 comments
Open

Fragment Typematching #552

fameoflight opened this issue Dec 20, 2021 · 0 comments

Comments

@fameoflight
Copy link

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
/>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant