Title: Strapi: Is there a to override plugin GraphQL schema?
Tags: graphql;strapi
Question: I am trying to modify the GraphQL schema of the users-permissions plugin.
I want to change:
type UsersPermissionsLoginPayload {
jwt: String!
user: UsersPermissionsMe!
type UsersPermissionsLoginPayload {
isAuthenticated: Boolean!
user: UsersPermissionsMe!
But I get  many errors when I  create ./extensions/users-permissions/config/schema.graphql.js:
There can be only one type named &quot;UsersPermissionsLoginInput&quot;.
Field &quot;UsersPermissionsLoginInput.identifier&quot; can only be defined once.
Field &quot;UsersPermissionsLoginInput.password&quot; can only be defined once.
Field &quot;UsersPermissionsLoginInput.provider&quot; can only be defined once.
There can be only one type named &quot;UsersPermissionsLoginPayload&quot;.
Field &quot;UsersPermissionsLoginPayload.jwt&quot; can only be defined once.
Field &quot;UsersPermissionsLoginPayload.user&quot; can only be defined once.
What is the correct way to customize/extend the schema?
I see the types can simply be extended like so:
module.exports = {
definition: `
extend type UsersPermissionsLoginPayload {
isAuthenticated: Boolean!
that adds the isAuthenticated field to the UsersPermissionsLoginPayload  type  but does not remove the jwt field.
Is there no way to override the typedefs  and resolvers?   Do I need to implement my custom functionality using new types and new unique resolvers?



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2020:00:07/16/20', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<graphql><strapi>', 'Title': 'Strapi: Is there a to override plugin GraphQL schema?', 'ViewCount': 471, 'id': 62932339, 'user_AboutMe': None, 'user_AccountId': 14002983.0, 'user_DisplayName': 'Oguntoye', 'user_Reputation': 625.0, 'user_Views': 63.0, 'user_id': 10113985.0}}