Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-30351

Add a "viewer" root field to the GraphQL schema

    XMLWordPrintable

Details

    Description

      Add a viewer field at the root, that returns the currently logged in User. It is a standard feature on GraphQL schemas. It is an equivalent of REST's /me resource.

      It can be used by application developers to show informations about the currently logged in user, as a UserContent. It should give access to User Groups as well. Usage example with the Apollo client: https://reactgo.com/graphql-react-apollo-client.

      {
        viewer {
          user_account { login email }
          firstname
          lastname
          image { variation(identifier: avatar) { uri } }
        }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bertrand.dunogier@ibexa.co Bertrand Dunogier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: