GraphQL is not a standard, it's just a technology for building custom API's which are far from "agnostic" in practice. You can use SPARQL if interoperability if your goal.
If you have a Postgres database you can expose it as GraphQL by putting Hasura in front if it. A piece of software used by Walmart and Atlassian among others, despite being just 5 years old.
Nothing like that exists for SPARQL, RDF and Postgres