olragon / graphql_api

GraphQL for Drupal 7
GNU General Public License v2.0
13 stars 3 forks source link

Support for Paragraphs? #3

Closed klokie closed 7 years ago

klokie commented 7 years ago

Hello! I have a Paragraphs field that I would like to access via the GraphQL endpoint. However it seems like the only fields available in the schema are those raw properties of the field itself (archived, bundle, field_name, item_id, revision_id).

I can see that the paragraphs fields I want to access (e.g. body, images, etc) are accessible via the individual paragraph bundles (e.g. bundle1{body}, bundle2{images} etc), I would love to be able to access the fields directly within the node query, just like entity reference and taxonomy reference fields now work. What would be required for that to work?

Please let me know if this is unclear. Thanks!

olragon commented 7 years ago

https://github.com/olragon/graphql_api/commit/266b9bb0a8e577970d869dcce6dbb6b8af16cd7c

New code should fix your issue, please update

klokie commented 7 years ago

That works great - thanks so much!