Generating TypeScript Types from GraphQL Schema in Apollo

preview_player
Показать описание
In this video we'll see how to generate TypeScript types automatically from our GraphQL queries using Apollo.

Рекомендации по теме
Комментарии
Автор

I just came across this right now, and the first 3minutes of the video got me hooked. Its like you made the video for me. Thanks alot.

judeokafor
Автор

you're amazing at explanation. thank you so much. Cleared lots of concepts which other tutorials are not even touching!

DanishRaza-jidu
Автор

Thaaaank youuuu! This has saved me countless hours!!

javiasilis
Автор

Useful and simple explanation. Thank you, Leigh, for explanation!

alex_chugaev
Автор

That's what I've been looking for. Thanks so much! :)

sankov
Автор

This content is so good, it gave me goosebumps! :) Nice work, keep it up!

Kaptany
Автор

Awesome video bro, keep it up. Thx a lot!

juancamiloq
Автор

Hi Leigh, nice job explaining! I wanted to ask, is there a way to add multiple endpoints? As in, we have 2 API endpoints and use them in Vuex action but each uses a different endpoint URL.

jousireischig
Автор

Thank you Leigh. It's really helpful and clear enough to follow along. I need code generation samples with included client side schemas, i.e. @client directives. Do you have any video on that?

muratasarslan
Автор

Thanks a lot! Great information. Quick question: In one of your previous videos you remind us that we should NOT commit our tokens to our repositories. Here you added the Shopify token to the package.json file since it's a public API. But what if the API is not public. What do you suggest we dp in order to grab the token from our .env file?

gablabelle
Автор

Hello Leigh, great video. Helped a lot.
I have a question, some of the types generated comes in snake case bu I'd like to use them in my code, do you know how it could be turned to camel case?

sphm
Автор

Thank you ! I'm new to Typescript and this was one of my issues. Will I need to re-type the GraphQL Schemas? (didn't make sense to me - double the work). Very simple explanation. Thank you.

AntonioSantosYT
Автор

Thanks for a great video 👍 Do you know if it’s possible to use the types when writing the gql queries? It feels weird that you get auto completion in graphiql, but not in the IDE

AndersBechMellson
Автор

Why is the scalar DateTime field not typed as a javascript Date type instead of string?

aritradattagupta
Автор

Thanks for this. Be careful tho your Shopify token is still in the git repo

rtorcato
Автор

I have an issue with generating types for API which has no mutations. I have no possibility to add anything to the API schema.

PS. API with mutations defined works great!

justfly
Автор

Unfortunately it seems like the api has moved from that endpoint - Have tried accessing it with insomnia and I usually get a 404 :/

(Tried adding in /admin as well, didn't work though)

twiggeh
Автор

Nice but how to get the @client directive to work?

crweskf
Автор

HI Leigh, great video! At around 14:03, it is loading the Apollo Project, but fails to generate query files with 'typescript' target

Console:
Error: Cannot use GraphQLEnumType "ImageContentType" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
Does anybody want to hazard a guess as to what I'm missing?

David-kgdk
Автор

5:55 doesn't suspend default to false?

alextjn