Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: embedder doesn't dive deep into schema #9582

Merged
merged 2 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/embedder/types/shared.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
import '../../server/types/modules'
import '../../server/types/webpackEnv'
2 changes: 1 addition & 1 deletion packages/server/database/rethinkDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SlackAuth from '../database/types/SlackAuth'
import SlackNotification from '../database/types/SlackNotification'
import TeamInvitation from '../database/types/TeamInvitation'
import TeamMember from '../database/types/TeamMember'
import {ScheduledJobUnion} from '../graphql/private/mutations/runScheduledJobs'
import {ScheduledJobUnion} from '../types/custom'
import {AnyMeeting, AnyMeetingSettings, AnyMeetingTeamMember} from '../postgres/types/Meeting'
import getRethinkConfig from './getRethinkConfig'
import {R} from './stricterR'
Expand Down
2 changes: 1 addition & 1 deletion packages/server/dataloader/customLoaderMakers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import getRethink, {RethinkSchema} from '../database/rethinkDriver'
import {RDatum} from '../database/stricterR'
import MeetingSettingsTeamPrompt from '../database/types/MeetingSettingsTeamPrompt'
import MeetingTemplate from '../database/types/MeetingTemplate'
import Organization from '../database/types/Organization'
import OrganizationUser from '../database/types/OrganizationUser'
import {Reactable, ReactableEnum} from '../database/types/Reactable'
import Task, {TaskStatusEnum} from '../database/types/Task'
import isValid from '../graphql/isValid'
import {Organization} from '../graphql/public/resolverTypes'
import {SAMLSource} from '../graphql/public/types/SAML'
import getKysely from '../postgres/getKysely'
import {TeamMeetingTemplate} from '../postgres/pg.d'
Expand Down
2 changes: 0 additions & 2 deletions packages/server/graphql/private/mutations/runScheduledJobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ const processMeetingStageTimeLimits = async (
})
}

export type ScheduledJobUnion = ScheduledJobMeetingStageTimeLimit | ScheduledTeamLimitsJob

const processJob = async (job: Selectable<DB['ScheduledJob']>, dataLoader: DataLoaderWorker) => {
const pg = getKysely()
const res = await pg.deleteFrom('ScheduledJob').where('id', '=', job.id).executeTakeFirst()
Expand Down
1 change: 0 additions & 1 deletion packages/server/graphql/public/rootSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,4 @@ const addRequestors = (schema: GraphQLSchema) => {

const rootSchema = addRequestors(resolveTypesForMutationPayloads(parabolWithNestedResolversSchema))

export type RootSchema = typeof rootSchema
export default rootSchema
2 changes: 1 addition & 1 deletion packages/server/integrations/gitlab/GitLabServerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import getIssue from '../../graphql/nestedSchema/GitLab/queries/getIssue.graphql
import getProfile from '../../graphql/nestedSchema/GitLab/queries/getProfile.graphql'
import getProjectIssues from '../../graphql/nestedSchema/GitLab/queries/getProjectIssues.graphql'
import getProjects from '../../graphql/nestedSchema/GitLab/queries/getProjects.graphql'
import {RootSchema} from '../../graphql/public/rootSchema'
import {IGetTeamMemberIntegrationAuthQueryResult} from '../../postgres/queries/generated/getTeamMemberIntegrationAuthQuery'
import {RootSchema} from '../../types/custom'
import {
CreateIssueMutation,
CreateNoteMutation,
Expand Down
11 changes: 11 additions & 0 deletions packages/server/types/custom.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import {GraphQLSchema} from 'graphql'
import type nestGitHubEndpoint from 'nest-graphql-endpoint/lib/nestGitHubEndpoint'
import '../../client/types/reactHTML4'
import type AuthToken from '../database/types/AuthToken'
import type ScheduledJobMeetingStageTimeLimit from '../database/types/ScheduledJobMetingStageTimeLimit'
import type ScheduledTeamLimitsJob from '../database/types/ScheduledTeamLimitsJob'
export interface OAuth2Success {
access_token: string
token_type: string
Expand Down Expand Up @@ -35,3 +39,10 @@ export interface GQLRequest {
// Datadog opentracing span of the calling server
carrier?: any
}

export type ScheduledJobUnion = ScheduledJobMeetingStageTimeLimit | ScheduledTeamLimitsJob

export type RootSchema = GraphQLSchema & {
githubRequest: ReturnType<typeof nestGitHubEndpoint>['githubRequest']
gitlabRequest: ReturnType<typeof nestGitHubEndpoint>['githubRequest']
}
11 changes: 5 additions & 6 deletions packages/server/utils/analytics/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import Meeting from '../../database/types/Meeting'
import MeetingMember from '../../database/types/MeetingMember'
import MeetingRetrospective from '../../database/types/MeetingRetrospective'
import MeetingTemplate from '../../database/types/MeetingTemplate'
import {Reactable} from '../../database/types/Reactable'
import {Reactable, ReactableEnum} from '../../database/types/Reactable'
import {SlackNotificationEventEnum} from '../../database/types/SlackNotification'
import {TaskServiceEnum} from '../../database/types/Task'
import {ReactableEnum} from '../../graphql/private/resolverTypes'
import TemplateScale from '../../database/types/TemplateScale'
import {DataLoaderWorker} from '../../graphql/graphql'
import {ModifyType} from '../../graphql/public/resolverTypes'
import {IntegrationProviderServiceEnumType} from '../../graphql/types/IntegrationProviderServiceEnum'
import {UpgradeCTALocationEnumType} from '../../graphql/types/UpgradeCTALocationEnum'
import {TeamPromptResponse} from '../../postgres/queries/getTeamPromptResponsesByIds'
Expand All @@ -16,10 +19,6 @@ import {MeetingTypeEnum} from '../../postgres/types/Meeting'
import {MeetingSeries} from '../../postgres/types/MeetingSeries'
import {AmplitudeAnalytics} from './amplitude/AmplitudeAnalytics'
import {createMeetingProperties} from './helpers'
import {SlackNotificationEventEnum} from '../../database/types/SlackNotification'
import TemplateScale from '../../database/types/TemplateScale'
import {DataLoaderWorker} from '../../graphql/graphql'
import {ModifyType} from '../../graphql/public/resolverTypes'

export type AnalyticsUser = {
id: string
Expand Down
2 changes: 1 addition & 1 deletion packages/server/utils/getGitHubRequest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {GraphQLResolveInfo} from 'graphql'
import {EndpointContext} from 'nest-graphql-endpoint/lib/types'
import {RootSchema} from '../graphql/public/rootSchema'
import {RootSchema} from '../types/custom'

// This helper just cleans up the input/output boilerplate.
// It breaks githubRequest into 2 parts so the info, endpointContext, and batchRef are kept in context
Expand Down
1 change: 1 addition & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noEmit": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
Expand Down
Loading