Skip to content

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Aug 26, 2024
1 parent 42f1c4c commit f7288f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
29 changes: 12 additions & 17 deletions packages/cli/src/controller/project-controller.spec.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors
// SPDX-License-Identifier: GPL-3.0

import {ROOT_API_URL_DEV} from '../constants';
import {ROOT_API_URL_PROD} from '../constants';
import {delay} from '../utils';
import {createProject, deleteProject} from './project-controller';

const projectSpec = {
org: process.env.SUBQL_ORG_TEST,
projectName: 'mocked_project',
repository: 'https://github.com/bz888/test-deployment-2',
ipfs: 'QmaVh8DGzuRCJZ5zYEDxXQsXYqP9HihjjeuxNNteSDq8xX',
subtitle: '',
description: '',
logoURl: '',
apiVersion: '2',
logoUrl: '',
};

// Replace/Update your access token when test locally
Expand All @@ -25,22 +23,19 @@ const testIf = (condition: boolean, ...args: Parameters<typeof it>) =>
jest.setTimeout(120000);
describe('CLI create project and delete project', () => {
testIf(!!testAuth, 'Create project and delete', async () => {
const {apiVersion, description, logoURl, org, projectName, repository, subtitle} = projectSpec;
const create_project = await createProject(
org!,
const {description, logoUrl, org, projectName, subtitle} = projectSpec;
const create_project = await createProject(ROOT_API_URL_PROD, testAuth!, {
key: `${org}/${projectName}`,
subtitle,
logoURl,
1,
projectName,
testAuth!,
repository,
logoUrl,
type: 1,
name: projectName,
description,
apiVersion,
undefined,
ROOT_API_URL_DEV
);
apiVersion: 'v2',
tag: [],
});
await delay(10);
const delete_project = await deleteProject(testAuth!, org!, projectName, ROOT_API_URL_DEV);
const delete_project = await deleteProject(testAuth!, org!, projectName, ROOT_API_URL_PROD);
// eslint-disable-next-line jest/no-standalone-expect
expect(create_project.key).toMatch(`${process.env.SUBQL_ORG_TEST}/mocked_project`);
// eslint-disable-next-line jest/no-standalone-expect
Expand Down
1 change: 1 addition & 0 deletions packages/query/src/graphql/graphql.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export class GraphqlModule implements OnModuleInit, OnModuleDestroy {
replaceAllPlugins: plugins,
subscriptions: true,
dynamicJson: true,
simpleCollections: 'both',
graphileBuildOptions: {
connectionFilterRelations: false, // We use our own forked version with historical support

Expand Down

0 comments on commit f7288f2

Please sign in to comment.