Hi all, Quick question. I am using `apollo-client`...
# orm-help
c
Hi all, Quick question. I am using
apollo-client
prisma
react-native
I want to import graphql query from generated js file with prisma. How can I import queries and mutations directly from generated files?
j
There's a slight difference to those files. The generated file by Prisma (apart from the client itself) is often the GraphQL Schema. The schema describes what the API looks like and what you can interact with/which queries and mutations are available to you. It does not, however, specify any queries or mutations to execute. The Schema is often used in combination with IDE Extensions to give auto-completion and more in the IDE, but the application itself will work perfectly without ever knowing what the Schema looks like.
c
I totally got your point. It would be very helpful that I can use auto completion on my vs code. Really Thanks for your help:)
❤️ 1
j
Both the GraphQL Extension by Prisma as well as the one by Apollo supports this. Happy hacking!
🙆‍♂️ 1