List user GPG keys with Graphql api

I am trying to access Users’ GPG Public Keys through the API but I see discrepancies between the REST and Graphql APIs.

With REST, is possible to use

While in Graphql, I cannot understand how to do the same.
Is it supported? if yes, could you please show an example, please?

Any help is appreciated :slight_smile:

:wave: @cdbkr , welcome to the GitHub Support Community! Thanks for asking about this here. :+1:

Checking the list of objects in the GitHub GraphQL API v4, the User object does not currently expose a connection for listing that user’s GPG public keys. You may have noticed a GpgSignature object in that list, though this is an implementation only accessible on a Commit or Tag. If you’re interested in such a connection, we suggest sharing your interest with our product team for their review so they can consider it for future iterations.

For now, we suggest using the GitHub REST API’s GPG Keys API to get the information you’re looking for. I hope this helps!