Discussion regarding the complex response structure for REST & GraphQL (Developer Experience)

why nothing is mentioned about this in the migration guide? :smiley:

2 Likes

Fantastic question, of which I don’t have the answer to but I will pass the question along.

THANK YOU! I saved like 20+ hours because of this <3

1 Like

Is this the official view on GraphQL? Makes me wanna run away… :scream_cat:

1 Like

Is there any plan for fixing this monstruosity?

The transform plugin can’t fix this yet.

1 Like

We are planning on writing a blog post and doing some AMA live streams I think to give into this a bit more and explain why some of it is required for the future with the features we will be building.

1 Like

If that is the case, then it will be hard to recommend using Strapi. Having a solid graphql API was one of the main points for me choosing Strapi for my clients.

5 Likes

I started using Strapi because it’s fast easy to use setup and its support of GraphQL. It’s really discouraging to learn the team sees GraphQL as something many people don’t need.

6 Likes

Does anyone have a good work around? I don’t mind the messy queries but my code has.data.attributes.become.data.attributes.a.mess.

1 Like

Not yet I fear.

I’m also realizing this breaks Apollo cache too. Does anyone have an example of they were able to get Apollo working with this new schema?

1 Like

I don’t think they will fix this soon. And there is no solutions yet.

1 Like

I just completed a (really awful) migration from v3 to v4, finally got into the graphql playground, and… yeah, that’s not good. These queries are obviously painful to read and write and my initial impression is that it’ll really screw up Apollo cache. I’m scared to see what the mutations look like.

Simplicity was one of the primary reasons I’ve sold clients on Strapi, but this migration process was painful and costly in time. That fact and the resulting decrease in usability is plenty enough reason to re-evaluate the choice, “free” or not.

You’ve had some reasonable recommendations of potential solutions here. I’d recommend you reconsider just re-explaining why you’re not going to do any of them.

Do you have any alternative for Strapi?

1 Like

There are many, but I would suggest reading the JSON:API spec, or the summary to understand what and why Strapi are doing what they are doing. It won’t necessarily make everything OK, but it will at least point your bewilderment in the same direction. When Strapi release their V4 SDK and integration tools, I think we’ll be at the point of ease we had with V3, but this hasn’t been an easy experience to migrate to v4 (at all!).

To answer your question: Ghost is the one I looked at a few years ago, it seemed like the choice at the time, but when I revisited it last year, Strapi seemed better. I think maybe because of the Beauty bias (their site is/was nicer).

1 Like

Do you use any other alternative for it?

Sorry, I don’t understand, didn’t I cover that in my response? I continue to use Strapi and I am working around the current state of things by custom mapping and generating custom types (my project is entirely in typescript).

how do you manage all the sh*** in the GraphQL response?

I gave up. I’m using REST API. I did look at GraphQL as a fix for things, but since mapping/flatten the output is a violation of GraphQL spec, I couldn’t see a way of doing it that was any better than the approach I’d half-done with my rest implementation, so I’ve gone back to that.

Thank you for your feedback. The Strapi team’s goal is to ensure that we continue to create the best possible CMS we can.

Changes, like going from Srapi v3 to v4, brought some new challenges. But we are listening to the community, even when some comments are negative.

We are also human beings, and we are working at a company where we believe in the product and want to continue making it better.

We will be holding a Livestream around Strapi v3 vs. v4 to discuss some changes made and why. Also, it would be a great place to ask questions.

You can join us here Difference Between Strapi v3 and v4, what changed, and why?

I know the migration process was difficult, specifically when migrating a v3 GraphQl Strapoi Project to v4 since we fundamentally rewrote how that is handled in version 4.

But if you have any suggestions to help us improve the process. Please feel free to let me know.

Thanks, Toby.

I know changes can be frustrating. But unfortunately, we “dropped the ball” on communicating why we made the changes.

And what is coming next to help with some of the issues we are currently facing.

Thank you all for your input.

3 Likes