prisma / prisma-examples

πŸš€ Ready-to-run Prisma example projects
https://www.prisma.io/docs/
Apache License 2.0
6.19k stars 1.43k forks source link

tutorial out of date: End-To-End Type-Safety with GraphQL, Prisma & React #5489

Open bambery opened 1 year ago

bambery commented 1 year ago

I couldn't track down if the content on the prisma website's blog/tutorials is in the github or not, so I can't offer a PR.

This tutorial, "End-To-End Type-Safety with GraphQL, Prisma & React", featured as the third "Learn Prisma" link on this page: https://www.prisma.io/learn is out of date.

This tutorial works fine until part 3, and then it has issues immediately: https://www.prisma.io/blog/e2e-type-safety-graphql-react-3-fbV2ZVIGWg

graphql-yoga syntax has changed since this was written. Graphql-yoga no longer recommends installing @graphql-yoga/node anymore, it is not possible to import { createServer } from "graphql-yoga/node" any longer, etc. I see other code examples in this repo using the newly updated syntax, but the very first thing I did when attempting to evaluate whether or not I would use Prisma in my project has given me a tutorial which can't be completed as written.

Are there better/more up to date tutorials for Prisma aside from the ones linked to from the main site? I am extremely new to Prisma and don't have a sense of where is better to look.

Part 4 also appears to be out of date with the usage of urql, which requires importing cacheExchange and fetchExchange and passing an exchanges param to createClient

ruheni commented 1 year ago

πŸ‘‹ @bambery

Thanks for reporting this and sharing the details on what isn't working. We'll update the tutorials soon enough to make it functional. πŸ™‚

Are there better/more up to date tutorials for Prisma aside from the ones linked to from the main site? I am extremely new to Prisma and don't have a sense of where is better to look.

The tutorials on prisma.io/learn should still be relevant, aside from the minor hick-up you ran into. Is there any particular content you would be interested in? πŸ™‚

bambery commented 1 year ago

Thanks for replying. I was looking for a tutorial on exactly this, what a React/Prisma integration might look like. While I did complete this tutorial, I ended up finding some tutorials on other people's blogs that demonstrate more complex integrations. I have them still open in another tab and haven't yet gotten to them.

OEN007 commented 3 months ago

Its easily fixed, theres an updated example here how to do it: https://the-guild.dev/graphql/yoga-server/docs

Basically just import { createServer } from 'node:http' and then const server = createServer(yoga) server.listen(port, () => { ...

OEN007 commented 3 months ago

πŸ‘‹ @bambery

Thanks for reporting this and sharing the details on what isn't working. We'll update the tutorials soon enough to make it functional. πŸ™‚

Are there better/more up to date tutorials for Prisma aside from the ones linked to from the main site? I am extremely new to Prisma and don't have a sense of where is better to look.

The tutorials on prisma.io/learn should still be relevant, aside from the minor hick-up you ran into. Is there any particular content you would be interested in? πŸ™‚

What is Primsa Pulse by the way, would that addition replace anything component if the tutorial was written today?