Skip to content

GraphQL query "me" get related content #2627

@deeq14

Description

@deeq14

What is the current behavior?
I am using GraphQL plugin and the query 'me' doesn't have for example a related content by the user, just the basics, id, username, email e.t.c..

for example I have to do this way,

query {
  user(id: "5c38667108f3c10d9fe2981f") {
    articles {
      posts
    }
  }
}

which means I have to allow a user to access /user:_id which also exposes that the user can get other users content!

Steps to reproduce the problem
Create a content add a field and relation to a user and do a query "me" with the related content

Suggested solutions
It will be nice to have a way we can do this

query {
  me {
    articles {
      posts
    }
  }
}

which means a user has access to only his/her content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersissue: enhancementIssue suggesting an enhancement to an existing featureseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: plugin:graphqlSource is plugin/graphql package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions