You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, I really appreciate Strawberry Shake. We have a GQL API and I felt that in order to be really usable for our customers using C# we need a good client lib. I think Strawberry Shake can be that library that I am now recommending to our users.
Anyway, I am too consuming GQL and is struggling a bit with mutations and "undefined fields".
In my case I want to use Strawberry shake but the schema I am interacting with has some dynamism to it.
What I am looking for is that I would sometimes want to set orgUnit1 and orgUnit2 but leave orgUnit3 as is. In other scenario Is like to set 2 and 3 but leave 1 as is.
In the real use case there are more than 10 fields rather than 3.
In JavaScript we use undefined to represent a missing value but that doesn't work for me here as C# (and graphql?) don't have the concept of undefined.
Generating all variants of how I like to set the fields will lead to millions of functions so that doesn't seem a like a way forward.
I can also use dynamically created GQL using string builder but I would like to use Strawberry Shake as much as possible.
I am thinking the approach I should take is loading orgUnit row from the external system, update the fields I am interested in and update the orgUnit from the new row. The issue here then is that I need an extra query and I will also overwrite the other fields if there is a change that came between the query and the update.
Anyway, as I am not an expert in neither Strawberry shake nor GraphQL I am looking for ideas. Perhaps there's already support for this scenario?
I hope my question made sense and in conclusion I want to say again that I really appreciate Strawberry Shake.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi.
First, I really appreciate Strawberry Shake. We have a GQL API and I felt that in order to be really usable for our customers using C# we need a good client lib. I think Strawberry Shake can be that library that I am now recommending to our users.
Anyway, I am too consuming GQL and is struggling a bit with mutations and "undefined fields".
In my case I want to use Strawberry shake but the schema I am interacting with has some dynamism to it.
So with this mutation
What I am looking for is that I would sometimes want to set orgUnit1 and orgUnit2 but leave orgUnit3 as is. In other scenario Is like to set 2 and 3 but leave 1 as is.
In the real use case there are more than 10 fields rather than 3.
In JavaScript we use undefined to represent a missing value but that doesn't work for me here as C# (and graphql?) don't have the concept of undefined.
Generating all variants of how I like to set the fields will lead to millions of functions so that doesn't seem a like a way forward.
I can also use dynamically created GQL using string builder but I would like to use Strawberry Shake as much as possible.
I am thinking the approach I should take is loading orgUnit row from the external system, update the fields I am interested in and update the orgUnit from the new row. The issue here then is that I need an extra query and I will also overwrite the other fields if there is a change that came between the query and the update.
Anyway, as I am not an expert in neither Strawberry shake nor GraphQL I am looking for ideas. Perhaps there's already support for this scenario?
I hope my question made sense and in conclusion I want to say again that I really appreciate Strawberry Shake.
Regards,
Mårten
Beta Was this translation helpful? Give feedback.
All reactions