drupal-graphql / graphql

GraphQL integration for Drupal 9/10
286 stars 202 forks source link

Text (formatted, long) no longer accessible directly via the query after upgrading to Beta1 #425

Closed pavlosdan closed 6 years ago

pavlosdan commented 6 years ago

Previously in alpha7 a field (Text (formatted, long)'s value was directly accessible using:

{ fieldRichTextWidget }

now to get the same result one needs to do:

{ fieldRichTextWidget { value } }

even though the explorer reports that inside the 'fieldRichTextWidget' there is only a string. (please see screenshot)

screen shot 2017-11-02 at 3 49 57 pm

pmelab commented 6 years ago

Did you add graphql_legacy?

This is on purpose (see the release notes, 2nd bullet. This behaviour is still available in graphql legacy, but the preferred way is to use the processed typed data property, which will provide the same result (and the trimmed text as well).

pavlosdan commented 6 years ago

No I didn't add legacy as it said it's not meant to be used: "These modules have been deprecated and should not be used."

Thought it may be better to rewrite the queries than using code that's deprecated.

pavlosdan commented 6 years ago

I see in Voyager the same field has the properties: processed, format and value. Shouldn't explorer have the same?

pmelab commented 6 years ago

Yes, they use the same data. Sounds like a caching issue to me.

pavlosdan commented 6 years ago

duh yes. cleared the browser cache and refreshed. yes now it reports the new properties!

pavlosdan commented 6 years ago

Thanks! closing this :)