data API
Access Replit’s GraphQL API to retrieve user information, Replit App metadata, and other platform data through the Extensions API.
The data API allows you to get information and metadata exposed from Replit’s GraphQL API.
Usage
Methods
data.currentUser
Fetches the current user via graphql
data.userById
Fetches a user by their id via graphql
data.userByUsername
Fetches a user by their username via graphql
data.currentRepl
Fetches the current Replit App via graphql
data.replById
Fetches a Repl by its ID via graphql
data.replByUrl
Fetches a Repl by its URL via graphql
Types
CurrentUser
Extended values for the current user
Property | Type |
---|---|
bio? | string |
displayName? | string |
firstName? | string |
followCount? | number |
followerCount? | number |
fullName? | string |
id | number |
image | string |
isUserHacker? | boolean |
isUserPro? | boolean |
lastName? | string |
roles? | UserRole[] |
socials? | UserSocial[] |
url? | string |
username | string |
CurrentUserDataInclusion
Options for the currentUser query
Property | Type |
---|---|
includePlan? | boolean |
includeRoles? | boolean |
includeSocialData? | boolean |
EditorPreferences
Editor Preferences
Property | Type |
---|---|
__typename | string |
codeIntelligence | boolean |
codeSuggestion | boolean |
fontSize | number |
indentIsSpaces | boolean |
indentSize | number |
keyboardHandler | string |
minimapDisplay | string |
multiselectModifierKey | string |
wrapping | boolean |
Replit App
A Replit App
Property | Type |
---|---|
commentCount? | number |
comments? | ReplCommentConnection |
description | string |
iconUrl? | string |
id | string |
imageUrl? | string |
isPrivate | boolean |
likeCount? | number |
multiplayers? | User[] |
owner? | ReplOwner |
publicForkCount? | number |
runCount? | number |
slug | string |
tags? | Tag[] |
timeCreated | string |
title | string |
url | string |
ReplComment
A Replit App Comment
Property | Type |
---|---|
body | string |
id | number |
user | User |
ReplCommentConnection
An array of ReplComments as items
Property | Type |
---|---|
items | ReplComment[] |
ReplDataInclusion
Options for replit app queries
Property | Type |
---|---|
includeComments? | boolean |
includeMultiplayers? | boolean |
includeOwner? | boolean |
includeSocialData? | boolean |
ReplOwner
A Replit App Owner, can be either a User or a Team
Property | Type |
---|---|
__typename | string |
description? | string |
id | number |
image | string |
username | string |
Tag
A Replit App tag
Property | Type |
---|---|
id | string |
isOfficial | boolean |
User
A Replit user
Property | Type |
---|---|
bio? | string |
displayName? | string |
firstName? | string |
followCount? | number |
followerCount? | number |
fullName? | string |
id | number |
image | string |
isUserHacker? | boolean |
isUserPro? | boolean |
lastName? | string |
roles? | UserRole[] |
socials? | UserSocial[] |
url? | string |
username | string |
UserDataInclusion
Options for user queries
Property | Type |
---|---|
includePlan? | boolean |
includeRoles? | boolean |
includeSocialData? | boolean |
UserRole
A user role
Property | Type |
---|---|
id | number |
key | string |
name | string |
tagline | string |
UserSocial
A user social media link
Property | Type |
---|---|
id | number |
type | UserSocialType |
url | string |
UserSocialType
An enumerated type of social media links
Property | Type |
---|
UserSocialType
An enumerated type of social media links
CurrentUserQueryOutput
A graphql response for the currentUser query
GraphResponse<T
>
A graphql response
ReplQueryOutput
A graphql response for the repl query
UserByUsernameQueryOutput
A graphql response for the userByUsername query
UserQueryOutput
A graphql response for the user query
Was this page helpful?