Next.js GraphQL API using Apollo Server 3 and Prisma

  Рет қаралды 29,042

Prisma

Prisma

Күн бұрын

Пікірлер: 58
@MahmoudAbdelwahab
@MahmoudAbdelwahab 3 жыл бұрын
Hey friends, one thing I forgot to do is install the `micro` package. Some of you may run into an error because of that
@markcuello5
@markcuello5 2 жыл бұрын
Thanks for the warning.
@desireed7115
@desireed7115 2 ай бұрын
Wow!! My mind has exploded in 20min! Great Job!! You are a VERY good instructor!! Thanks!
@dinoscheidt
@dinoscheidt 3 жыл бұрын
Guys, I gotta say: You Dev Advocates do an excellent job in providing contained end-to-end examples to smoke test potential use cases without firing up a dev environment myself. Including great audio, time stamps and skipping the whole “everyone is a beginner assumptions so lets explain GraphQL again” mantra. That is very pleasant. We are looking into using Prisma & GraphQL now in a large Machine Learning system to facilitate the schema maintenance and combination for the AI Feature Store so Machine Learning Engineers have a one stop shop for assembling their feature layers at will to experiment and iterate on Machine Learning Models. I would not consider Prisma without having the feeling that it is solid and proven tech - and the content you create provides that feeling despite Prisma being relatively new compared to the world of Apache XYZ alternatives. So good job; greetings from Berlin to Berlin/SF !
@PrismaData
@PrismaData 3 жыл бұрын
Hello there! Thank you so much for this amazing feedback! We're so happy to hear that you're enjoying the content that our DevRel team is producing and that that's giving you the confidence to consider Prisma for your Machine Learning project. We'd love to learn more about your experience as your project progresses, and any feedback or pain points you can share with us! 💚 Greetings back from Berlin and SF! 😉
@danielacosta1292
@danielacosta1292 2 жыл бұрын
wow! I find it very interesting. I would like to know more about AI applications of this type, any blog or publication where I can read a little more about this type of similar applications? Thank you
@LewisRidyard
@LewisRidyard 3 жыл бұрын
This was such a well explained, well rounded tutorial. Bookmarked. Great stuff!
@PrismaData
@PrismaData 3 жыл бұрын
That's awesome, we're glad you enjoyed it! 💚
@markcuello5
@markcuello5 2 жыл бұрын
Which one?
@AdityaKarnamGRao
@AdityaKarnamGRao 2 жыл бұрын
I was missing the micro cors and broke my head for 2 hours. Finally thanks for the walkthrough it was great and it worked for me. Cheers!
@markcuello5
@markcuello5 2 жыл бұрын
Yeah, but what are the `micro cors`?
@Sbz-i2c
@Sbz-i2c 11 ай бұрын
thanks for your tutorials. however, it would have been nice to finish the 1st part with postgres db and actually use the db...
@pr0fanator
@pr0fanator Жыл бұрын
One problem of those technologies, that is to much changes... To fast to maintain stable business application.
@danielacosta1292
@danielacosta1292 2 жыл бұрын
Do you have an idea of how many simultaneous accesses your production website supports before it becomes a problem for your DB? Or passing prisma client in the context reuses the instance between calls to your api?
@carlosdubon8539
@carlosdubon8539 Жыл бұрын
I have a question. Do I have to create a GraphQL schema and a Prisma schema. Or is there a way to codegen one (GQL Schema or Prisma schema) based on the other. For eg. If I already have a Prisma Schema can I run a CLI command that codegens the GQL Schema for me? I'm new to both of these technologies and I'm wondering if it's a best practice to create 2 schemas. Because we lose the "single source of truth". And it's as against the "don't repeat yourself" principle as well.
@naylord5
@naylord5 Жыл бұрын
I have the exact same question, do you find any solution for this?
@carlosdubon8539
@carlosdubon8539 Жыл бұрын
@@naylord5 well after months of working with them it seems to be the norm. To have a Prisma schema and a GraphQL schema. This is because your end API has a different schema than your database (after creating relations etc). For e.g. You can have a Prisma schema that contains the names of famous artists. But in your GraphQL API only have a "artistsCount" property.
@naylord5
@naylord5 Жыл бұрын
@@carlosdubon8539 Oh I see, thank you for your input. It sounds really tedious, hoping you only need to do that once or twice per project if the schema doesn't change often.
@trenom
@trenom 2 жыл бұрын
Sorry but I was just wondering, why use GraphQL to fetch only the data we want when Prisma allows us to do the same thing with their select and include APIs?
@MichaelShingo
@MichaelShingo 2 ай бұрын
If anyone is wondering how he has syntax highlighting inside the gql``, you need to install the VSCode extension, Apollo GraphQL.
@brandonly7634
@brandonly7634 2 жыл бұрын
Awesome!!! Love this so much. Great tutorial, and I absolutely love love love this stack.
@MatthewHinton
@MatthewHinton 3 жыл бұрын
This is a really good tutorial. PS what VSCode theme are you using?
@PrismaData
@PrismaData 2 жыл бұрын
Hey there 👋🏽 Mahmoud is using the GitHub Vs Code Theme: marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme
@markcuello5
@markcuello5 2 жыл бұрын
Which tutorial?; and: ?
@falsifyingdream
@falsifyingdream 2 жыл бұрын
I'm having trouble with _parent, _args, and ctx typing with Typescript (around 18:08 in the video). I'm having to type them as 'any' to get the TS errors to go away. Is there a simple fix for this?
@markcuello5
@markcuello5 2 жыл бұрын
?
@BatgioK
@BatgioK 2 жыл бұрын
Great tutorial!! explained all the extra little stuff I was banging my head on for hours. liked subbed commented, Good job
@atheerapeter5174
@atheerapeter5174 3 жыл бұрын
more of this please
@liltripple_reid8917
@liltripple_reid8917 2 жыл бұрын
hey I'm getting a weird error that says 'error - Error: called start() with surprising state started' any ideas?
@yashuapervez1533
@yashuapervez1533 2 жыл бұрын
is there any limitations of using, apollo-server-micro. dose this package offers all the features available in core apollo-server.
@MahmoudAbdelwahab
@MahmoudAbdelwahab 2 жыл бұрын
Hey Yashua! The package contains all features available in apollo-server. It's just optimized to be used in serverless environments like Next.js
@100timezcooler
@100timezcooler 2 жыл бұрын
still getting CORS issues about access-control methods.
@lucabaxter4002
@lucabaxter4002 2 жыл бұрын
What font are you using in vs code? looks so cool and clean!
@adimaralimuddin96
@adimaralimuddin96 2 жыл бұрын
we would love to learn how to setup the right way or right archetecture for building a full nextjs project with best practices. we would love to learn about neo4j, nexus and what makes a better nextjs app... that would be great.
@yehudamakarov
@yehudamakarov 2 жыл бұрын
What are you using for your terminal that provides the documentation for flags
@PrismaData
@PrismaData 2 жыл бұрын
That's a tool called fig - fig.io
@thomas-sinkala
@thomas-sinkala 2 жыл бұрын
Thank you, Mahmoud, I am using javascript. Any idea how to add the promise type to the context as in 20:18 time stamp?
@PrismaData
@PrismaData 2 жыл бұрын
Hey there 👋🏽 If you're using VS Code as your editor, you can use JS Doc to annotate types to your code. Here's a link to a gist you can use to add types to your JavaScript code: gist.github.com/ruheni/9df3cca7c0f73f7f4c9002cf8657a38c 🙂 Let us know if you run into any issues.
@ntro-p
@ntro-p 2 жыл бұрын
Super solid video! Using it to set up my project. One uncertainty I have though, isn't micro not designed to be used in serverless environments? They have a disclaimer for it in their readme I guess futhering my question, why is micro being used here rather than apollo-server + cors ?
@markcuello5
@markcuello5 2 жыл бұрын
1st part: which video? 2nd part: I don`t know.
@adimaralimuddin96
@adimaralimuddin96 2 жыл бұрын
prisma-client, apollo-client and apollo-server are sometimes confusing at startup and i missed them up like a lot of times. probably because it is something that you don't do a lot.
@orozcorp
@orozcorp Жыл бұрын
Hey, since apollo-server-micro is deprected, how would you migrate this to apollo server 4?
@PrismaData
@PrismaData Жыл бұрын
Hi 👋🏽 We've updated the written course to use Pothos and GraphQL Yoga. Let us know if you run into any issues. 🙂
@DavidAbishay
@DavidAbishay 2 жыл бұрын
I've installed cors and micro but still getting ReferenceError: cors is not defined for function. Problematic line seems to be: export default cors... any ideas? Great tutorial, thank you!
@MahmoudAbdelwahab
@MahmoudAbdelwahab 2 жыл бұрын
Hey David! you should be installing micro-cors and micro. No need to install cors. Hope that helps! Let me know if you're still running into the error
@markcuello5
@markcuello5 2 жыл бұрын
I would stay away from `cors` and `micro`.
@igotbit9454
@igotbit9454 2 жыл бұрын
perfect. very helpful thanks.
@euanmorgann
@euanmorgann 2 жыл бұрын
How would this work with getStaticProps etc?
@viacheslavshakhnazarov3612
@viacheslavshakhnazarov3612 Жыл бұрын
how i can get data rom db, not from .ts file?
@kamalkamals
@kamalkamals 2 жыл бұрын
16:04 should update ur code for nodejs higher thatn 14.x, then if using ts should define type of each arguments of function
@ankurvishwakarma8731
@ankurvishwakarma8731 2 жыл бұрын
Awesome :)
@kamalkamals
@kamalkamals 2 жыл бұрын
this example it s for a small app, not recommended for medium or big app
@herbertk9266
@herbertk9266 2 жыл бұрын
Thank you
@PrismaData
@PrismaData 2 жыл бұрын
You're very welcome!
@markcuello5
@markcuello5 2 жыл бұрын
Help me
@misterbg1
@misterbg1 6 ай бұрын
you do a lot of 'oh yeah we need this cuz it wont work without it'. Not alot of explaining the specific reason. You're providing code to copy, why not explain it more in depth, there is no context here
Setting Up Apollo Client 3 with Nextjs
7:08
Prisma
Рет қаралды 13 М.
Redux не нужен. GraphQL и Apollo Client.
27:48
knowcity
Рет қаралды 52 М.
The day of the sea 😂 #shorts by Leisi Crazy
00:22
Leisi Crazy
Рет қаралды 1,2 МЛН
Worst flight ever
00:55
Adam W
Рет қаралды 21 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 746 М.
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 11 МЛН
GraphQL для фронтенд разработчиков
35:52
Михаил Непомнящий
Рет қаралды 47 М.
I Fixed Next.js Server Actions
11:42
Theo - t3․gg
Рет қаралды 57 М.
Create A GraphQL API with Apollo Server V3 and MongoDB Atlas
36:27
Cooper Codes
Рет қаралды 32 М.
How to Auth: Secure a GraphQL API with Confidence
25:18
Apollo GraphQL
Рет қаралды 41 М.
GraphQL Requests on Your Front-end w/Next.js
15:13
Discover Sitecore
Рет қаралды 11 М.
The day of the sea 😂 #shorts by Leisi Crazy
00:22
Leisi Crazy
Рет қаралды 1,2 МЛН