Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL - Query current user and custom user settings #15214

Closed
gvkries opened this issue Jan 31, 2024 · 0 comments · Fixed by #15215
Closed

GraphQL - Query current user and custom user settings #15214

gvkries opened this issue Jan 31, 2024 · 0 comments · Fixed by #15215

Comments

@gvkries
Copy link
Contributor

gvkries commented Jan 31, 2024

Is your feature request related to a problem? Please describe.

Getting information about the current user and additionally its custom user settings (aka user profile) is currently not possible out of the box with GraphQL.

Describe the solution you'd like

A query as described in the documentation (https://docs.orchardcore.net/en/latest/docs/reference/modules/Apis.GraphQL/#http-methods-headers-and-body) would be handy for using OC as headless CMS with frontend users. This can then also allow querying custom user settings (i.e. content types with CustomUserSettings stereo type).

A sample query could look like:

query MyQuery {
  me {
    email
    phoneNumber
    userName
    userId
    userProfile {
      name
      profilePicture {
        urls
      }
    }
  }
}

Describe alternatives you've considered

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant