strapi / community-content

Contribute and collaborate on educational content for the Strapi Community
https://strapi.io/write-for-the-community
572 stars 404 forks source link

How to set up Strapi with Postgres and GraphQL #954

Closed Alex-is-Gonzalez closed 1 year ago

Alex-is-Gonzalez commented 2 years ago

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

Alex-is-Gonzalez commented 2 years ago

@PaulBratslavsky- How can I be assigned my topic?

PaulBratslavsky commented 2 years ago

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.

Alex-is-Gonzalez commented 2 years ago

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

PaulBratslavsky commented 1 year ago

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.

icode247 commented 1 year ago

Hi @PaulBratslavsky, I can work on this article following the outline you've provide.

Thanks

icode247 commented 1 year ago

Hi @Alex-is-Gonzalez , I can work on this topic

dessireugarte commented 1 year ago

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

Alex-is-Gonzalez commented 1 year ago

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

PaulBratslavsky commented 1 year ago

@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.

Ashimi0x commented 1 year ago

@malgamves How about this one?

Ashimi0x commented 1 year ago

Hi @malgamves

malgamves commented 1 year ago

hey @Ashimi0x, I'll let @PaulBratslavsky get back to you on this one.

PaulBratslavsky commented 1 year ago

@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.

Alex-is-Gonzalez commented 1 year ago

@Ashimi0x you can go ahead and author this Article, If the Strapi community approves it!

dessireugarte commented 1 year ago

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?

Ashimi0x commented 1 year ago

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.

dessireugarte commented 1 year ago

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.

Ashimi0x commented 1 year ago

Alright. I will get started and will sure do as requested. Thank you. @dessireugarte

dessireugarte commented 1 year ago

Hello @Ashimi0x ! Are you still working on this topic?

Ashimi0x commented 1 year ago

Hello @dessireugarte Yes, I am. I will send my draft link today.

Ashimi0x commented 1 year ago

Hi @dessireugarte

Attached is the link to my draft https://www.dropbox.com/scl/fi/vnu7ysdhw9ldshzdqahug/Untitled-1.paper?dl=0&rlkey=hqk9qg5qbs4v93l2ijdg17cwy

dessireugarte commented 1 year ago

Thank you @Ashimi0x! We will review the draft

Ashimi0x commented 1 year ago

Alright @dessireugarte

Ashimi0x commented 1 year ago

Hi @dessireugarte any update?

PaulBratslavsky commented 1 year ago

@Ashimi0x I started the review process will let you know if we need any changes.

PaulBratslavsky commented 1 year ago

@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.

Ashimi0x commented 1 year ago

I have updated that. @PaulBratslavsky

Ashimi0x commented 1 year ago

Hi @PaulBratslavsky

PaulBratslavsky commented 1 year ago

@Ashimi0x thank you I will take a look at it, can you also share the git hub repo for the project.

Ashimi0x commented 1 year ago

Hi @PaulBratslavsky https://github.com/Ashimi0x/strapibuild

Ashimi0x commented 1 year ago

Hello @PaulBratslavsky @dessireugarte Any updates on this please?

dessireugarte commented 1 year ago

Hello @Ashimi0x 👋 @PaulBratslavsky will get back to you if there is any additional feedback regarding the content. We will publish the article the first week of July.

PaulBratslavsky commented 1 year ago

@Ashimi0x Thank you for submitting your article. After careful review by other members on our team, we have determined that your article does not show the appropriate code for Strapi v4 with a working example.

We appreciate your dedication but can not accept the article in this state.