T
T
Tash1moto2021-06-20 14:24:57
Frontend
Tash1moto, 2021-06-20 14:24:57

How to convert *.graphqls content to typeDefinition typescript?

Hello everyone
There is a graphql backend and it describes the types
here is an example broker.graphqls file
60cf2478013f6977299448.png
Question: how can I import this type into d.ts in order to use it in the front as a data type?
so as not to rewrite types 2nd time

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2021-06-20
@inoise

Use some code generator. Just keep in mind that you still have to regenerate when changing the schema - there is no getting away from this. She is the scheme that describes the contract, and not interaction with it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question