mondaycom / monday-graphql-api

4 stars 2 forks source link

use of graphql-request may be problematic #27

Open codyfrisch opened 3 months ago

codyfrisch commented 3 months ago

Due to the way monday.com API often returns errors in a structure that does not conform to the graphql specification, graphql-request may throw errors for the invalid structure rather than the actual API error, making error handling difficult

1) monday.com can update the api to return errors in a graphql spec compliant manner (I've heard this may be on the roadmap) 2) extend graphql-request with middleware to handle the non-standard errors and modify the raw response into a somewhat spec compliant error.

RomKadria commented 3 weeks ago

hey, yes we are planning to start returning errors with the correct spec from version 2024-10, Thanks =)

codyfrisch commented 3 weeks ago

I'd heard it was pushed to 2025-01 with the infra change since that affords devs more time to adapt since all the error changes would require rewriting. But regardless, if this project isn't on a fast track to deprecate the existing sdk client then all is good.

RomKadria commented 2 weeks ago

So the plan is to return the errors both formats from 2024-10 version (spec compliant + backward compatible), from 2025-01 we will remove the backward compatible ones :)

This project is supposed to replace the old sdk =)