0

I wonder if it's possbile to deal with the following situation with Craft CMS in graphQL: We have users related to projects in two different ways:

users.bookmarkedProjects = [projectIds]

project.projectOwners = [userIds]

Querying the projects related to a user would output the list of all projects no matter in which way they are connected. In twig you can differentiate by doing something like this:

{% set ingredients = craft.entries()
    .section('ingredients')
    .relatedTo({
        sourceElement: drink,
        field: 'ingredientsMatrix.relatedIngredient'
    })
    .all() %}

Because of the fact that we use Craft as a headless CMS only I wonder how I can do this on a graphQL query.

Thank you very much!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.