What is the Replit GraphQL endpoint?

I’m making a project in which I need to query Replit user data using GraphQL, but I do not know what GraphQL to query.

I would appreciate any help.


I tried that but I’m getting this error in the GraphQL playground (https://replit.com/graphql):

What do I do?

I get that error too! Welcome to the community btw!

heya! Is this project made with node.js?

I’m a leading dev in replapi-it python ver. Most mods have agreed that gql should be banned from public circulation. However, we’re you to attempt this, you would need the right headers as well as retrieving your sid for mutations.

send it with these headers:

    "X-Requested-With": "replit",
    "Origin": "https://replit.com",
    "Accept": "application/json",
    "Referrer": "https://replit.com",
    "Content-Type": "application/json",
    "Connection": "keep-alive",
    "Host": "replit.com",
    "x-requested-with": "XMLHttpRequest",
    "User-Agent": "Mozilla/5.0",

Also, we’re you to send for mutations (which the most illegal, so would have trouble finding these), send with the additional entry

"Cookie": `connect.sid=${YOUR_SID}`

@sonicx180 I’m planning on making it in Go but right now I’m still exploring GraphQL + Replit.

@bigminiboss okay, thanks. I’ll include those headers in the app, but it seems that the GraphQL playground doesn’t send a "x-requested-with’ header. How can I change the headers that the playground is sending?

@TheNoobKing you can test your query here.

In production, you can send a POST request to https://replit.com/graphql with these headers

      'X-Requested-With': 'replit',
      'Origin': 'https://replit.com',
      'Accept': 'application/json',
      'Referrer': 'https://replit.com',
      'Content-Type': 'application/json',
      'Connection': 'keep-alive',
      'Host': 'replit.com',
      'x-requested-with': 'XMLHttpRequest',
      'User-Agent': 'Mozilla/5.0'

and in the body a valid json string

    "variables": {},
    "operationName": "an operation name",
    "query": "your query here"

@nathanTi thanks for the reply. Also, what is the operationName k-v pair in the JSON string for?

It’s not really important, I think it’s just used when you run several queries at the same time, to clarify which query you want.

You can learn more on it here. I think you can leave it empty.

um yes, this is what I posted :stuck_out_tongue: