-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: plugin:graphqlSource is plugin/graphql packageSource is plugin/graphql packagestalestale-before-2022status: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Description
Feature request
Please describe your feature request
- I have created my request on the Product Board before I submitted this issue
- I have looked at all the other requests on the Product Board before I submitted this issue
Summary
I would like to add some extra fields in user like firstName and lastName but adding them using Content-Type Builder doesn't make them available in GraphQL API
Steps to reproduce the behavior
- Using the Content-Type Build, add a Text field in User
- Go on http://localhost:1337/graphql and check GraphQL documentation
- The added text field isn't exposed
Screenshots
firstName and lastName text fields added in user using Content-Type Builder:

Added fields not available in GraphQL API:

Why is it needed?
Since user is a central part for most authenticated API and adding extra fields or relations to user is a very common use case. For now, we have to manually write specific code to add extra fields (in addition to Content-Type Builder). Thanks @iicdii to remember me the way we do it in v3.
Suggested solution(s)
The added text field should be exposed, both on query and mutation.
Related issue(s)/PR(s)
None, since I have "transform" the current issue from "bug report" to "feature request" 😉
vitor-mariano, LaurenzSommerlad, PHTremor, ShahriarKh, kolyabazlov and 1 more
Metadata
Metadata
Assignees
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: plugin:graphqlSource is plugin/graphql packageSource is plugin/graphql packagestalestale-before-2022status: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Type
Projects
Status
Fixed/Shipped