community-content
community-content copied to clipboard
How to set up Strapi with Postgres and GraphQL
Hello, I want to write a tutorial to help others set up Strapi V4 with Postgres and GraphQL!
Here is an example:
What is Strapi, GraphQL, and Postgres? Installing Strapi : Installing Postgress: Configure Strapi to use Postgres: Installing graphQl from Strapi Marketplace: Testing graphQL connection: Conclusion
My content is
- [X ] A Strapi Tutorial / Guide / How to article
- [ ] About Headless, CMS, javascript, open source, or jamstack
- [ ] Other, specify
@PaulBratslavsky- How can I be assigned my topic?
I think this is something that is already explained in our documentation. But if you like, you can write about how to create custom graphql resolvers and types to extend graphql functionality.
Yes I can do that! However, I believe you already wrote an amazing article on this topic using Nextjs Blog. In order to make it different I would want to use React instead.
New Outline:
What is Strapi, GraphQL, and React? Installing Strapi : Installing React: Installing GraphQL from Strapi Marketplace: What are GraphQl Resolvers and types? Creating Custom GraphQl Resolvers Setting up React to interact with GraphQL resolvers Conclusion
You can create something based on what I started with, possibly create a custom resolver that calls a custom service that pulls data from an API like GitHub and returns that data. Or saves it to Strapi. I can also answer any questions that you may have. In terms of GraphQl articles, we want to focus more on backend customization rather than frontend implementation.
Hi @PaulBratslavsky, I can work on this article following the outline you've provide.
Thanks
Hi @Alex-is-Gonzalez , I can work on this topic
Hello @Alex-is-Gonzalez 👋 Have you thought about what Paul suggested? Let's wait for Alex's answer, otherwise, you can propose an outline taking into consideration Paul's suggestion @icode247
Hello, Yes I can write an article for a custom graphQL resolver, @PaulBratslavsky , thank you for the direction. Here is a newly proposed outline for this article.
In this article, you will learn:
How to install and set up the Strapi GraphQL plugin Concepts like resolvers, mutations, and queries in the context of GraphQL How to customize Strapi's GraphQL backend with custom resolvers for queries and mutations
New Outline:
What is a headless CMS and graphQL? Installing Strapi : Installing GraphQL from Strapi Marketplace: What are GraphQl Resolvers and types? Creating Custom GraphQl Resolvers Setting up API to interact with GraphQL resolvers and Strapi Testing API data return to Strapi Conclusion
@Alex-is-Gonzalez sorry for a late response, we have a lot of item in the cue for this year. At the moment we are not taking any new articles until January.
If you are still interested in this topic let me know. I am putting this on hold and will revisit in January.
@malgamves How about this one?
Hi @malgamves
hey @Ashimi0x, I'll let @PaulBratslavsky get back to you on this one.
@Ashimi0x since @Alex-is-Gonzalez requested this article let's check if he is willing to write it, with that in. mind, we are looking for intermediate use cases and customizations and error handling of using graphql.
@Ashimi0x you can go ahead and author this Article, If the Strapi community approves it!
Thanks @Alex-is-Gonzalez!
@Ashimi0x consider that there is already an existing tutorial on how to setup PostgreSQL and Strapi. We want to dive into more advanced topics beyond setting up Postgres and GraphQL.
I think that should be the beginning of the tutorial, but as Paul mentioned, customization and error handling using GraphQl would be a topic we are more interested in. Could you provide a more elaborated outline that covers that?
Hi @dessireugarte
Here is a more indepth outline that covers all you mentioned.
Introduction to GraphQL and Strapi How GraphQL works Installing Strapi Installing GraphQL from Strapi Marketplace: Customing Strapi APIs with GraphQL Creating custom queries and mutations using GraphQL Errors that occur using GraphQL in Strapi Error handling in GraphQL Guidelines for error messages GraphQL Best Practices Performance optimization Security considerations Conclusion
Let me know what you think.
Thanks @Ashimi0x, please go ahead and start the article. Could you please include in the article any resources that you consider valuable for readers? They can be included throughout the article or at the end like in this article.
Alright. I will get started and will sure do as requested. Thank you. @dessireugarte
Hello @Ashimi0x ! Are you still working on this topic?
Hello @dessireugarte Yes, I am. I will send my draft link today.
Hi @dessireugarte
Attached is the link to my draft https://www.dropbox.com/scl/fi/vnu7ysdhw9ldshzdqahug/Untitled-1.paper?dl=0&rlkey=hqk9qg5qbs4v93l2ijdg17cwy
Thank you @Ashimi0x! We will review the draft
Alright @dessireugarte
Hi @dessireugarte any update?
@Ashimi0x I started the review process will let you know if we need any changes.
@Ashimi0x I added a note on your draft.
You can define GraphQL schema and resolvers to create custom queries and mutations in Strapi. The schema defines the structure of your APIs as well as the types of data you can query and the mutations you can perform.
Can you add an example of how to add this custom resolver in Strapi. Thank you.
I have updated that. @PaulBratslavsky
Hi @PaulBratslavsky
@Ashimi0x thank you I will take a look at it, can you also share the git hub repo for the project.
Hi @PaulBratslavsky https://github.com/Ashimi0x/strapibuild