1- const defaultInitVariables = {
1+ const initVariables = global . initVariables || {
22 username : undefined ,
33 captcha : {
44 token : undefined ,
@@ -17,8 +17,6 @@ const defaultInitVariables = {
1717 } ,
1818} ;
1919
20- global . initVariables = defaultInitVariables ;
21-
2220export default {
2321 roleAttributes : 'id, name, key, tagline' ,
2422 languageAttributes : 'id, displayName, key, category, tagline, icon, isNew' ,
@@ -27,9 +25,9 @@ export default {
2725 userAttributes : 'id, username, firstName, lastName, bio, isVerified, displayName, fullName, url, isLoggedIn, isSubscribed, timeCreated, isBannedFromBoards, karma, isHacker, image' ,
2826 boardAttributes : 'id, name, description, slug, cta, titleCta, bodyCta, template, buttonCta, color, replRequired, isLocked, isAnswerable, isPrivate, timeCreated, timeUpdated, url, canPost' ,
2927 replAttributes : 'id, language, isProject, isPrivate, isStarred, title, slug, description, folderId, isRenamed, url, timeCreated, timeUpdated, isOwner, tags { id }, pinnedToProfile, files, hostedUrl, terminalUrl' ,
30- commentAttributes : `id, body, voteCount, timeCreated, timeUpdated, url, isAuthor, canEdit, canVote, canComment, hasVoted, canReport, hasReported, isAnswer, canSelectAsAnswer, canUnselectAsAnswer, preview(length: ${ global . initVariables . markdown . length || 150 } , removeMarkdown: ${ global . initVariables . markdown . removeMarkdown || true } )` ,
31- postAttributes : `id, title, body, showHosted, voteCount, commentCount, isPinned, isLocked, timeCreated, timeUpdated, url, isAnnouncement, isAuthor, canEdit, canComment, canVote, canPin, canSetType, canChangeBoard, canLock, hasVoted, canReport, hasReported, isAnswerable, tutorialPages, preview(length: ${ global . initVariables . markdown . length || 150 } , removeMarkdown: ${ global . initVariables . markdown . removeMarkdown || true } )` ,
32- graphql : `${ global . initVariables . endpoints . gql || 'https://staging.replit.com/graphql' } ` ,
33- login : `${ global . initVariables . endpoints . login || 'https://staging.replit.com/login' } ` ,
34- restful : `${ global . initVariables . endpoints . restful || 'https://staging.replit.com' } ` ,
28+ commentAttributes : `id, body, voteCount, timeCreated, timeUpdated, url, isAuthor, canEdit, canVote, canComment, hasVoted, canReport, hasReported, isAnswer, canSelectAsAnswer, canUnselectAsAnswer, preview(length: ${ initVariables . markdown . length || 150 } , removeMarkdown: ${ initVariables . markdown . removeMarkdown || true } )` ,
29+ postAttributes : `id, title, body, showHosted, voteCount, commentCount, isPinned, isLocked, timeCreated, timeUpdated, url, isAnnouncement, isAuthor, canEdit, canComment, canVote, canPin, canSetType, canChangeBoard, canLock, hasVoted, canReport, hasReported, isAnswerable, tutorialPages, preview(length: ${ initVariables . markdown . length || 150 } , removeMarkdown: ${ initVariables . markdown . removeMarkdown || true } )` ,
30+ graphql : `${ initVariables . endpoints . gql || 'https://staging.replit.com/graphql' } ` ,
31+ login : `${ initVariables . endpoints . login || 'https://staging.replit.com/login' } ` ,
32+ restful : `${ initVariables . endpoints . restful || 'https://staging.replit.com' } ` ,
3533} ;
0 commit comments