Skip to content

Commit b7f8f12

Browse files
committed
chore: minor changes with linter and removed unused fields
1 parent 29d3332 commit b7f8f12

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

packages/cli/src/Editor.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ const jolt = () => {
2222
const token = Config.getTokenOptions('token');
2323
const headers: Record<string, string> = token
2424
? {
25-
Authorization: `Bearer ${token}`,
26-
}
25+
Authorization: `Bearer ${token}`,
26+
}
2727
: {};
2828
return Chain('https://api.staging.project.graphqleditor.com/graphql', {
2929
headers,
@@ -34,8 +34,8 @@ const joltSubscription = () => {
3434
const token = Config.getTokenOptions('token');
3535
const headers: Record<string, string> = token
3636
? {
37-
Authorization: `Bearer ${token}`,
38-
}
37+
Authorization: `Bearer ${token}`,
38+
}
3939
: {};
4040
return Subscription('https://api.staging.project.graphqleditor.com/graphql', {
4141
headers,
@@ -184,14 +184,9 @@ export class Editor {
184184
? (await fetch(libraryURL.getUrl!)).text()
185185
: new Promise<string>((resolve) => resolve('')),
186186
]);
187-
const sdlMerge = mergeSDLs(graphqlFile, libraryFile);
188-
if (sdlMerge.__typename === 'error')
189-
throw new Error(
190-
sdlMerge.errors
191-
.map((e) => `Conflict on: ${e.conflictingNode}.${e.conflictingField}`)
192-
.join('\n'),
193-
);
194-
return sdlMerge.sdl;
187+
const sdlMerge = mergeSDLs(graphqlFile, libraryFile)
188+
if (sdlMerge.__typename === 'error') throw new Error(sdlMerge.errors.map(e => `Conflict on: ${e.conflictingNode}.${e.conflictingField}`).join("\n"))
189+
return sdlMerge.sdl
195190
};
196191

197192
public static getSchema = async (resolve: {

packages/cli/src/common/handleTemplates/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import fs, { read } from 'fs';
1+
import fs from 'fs';
22
import path from 'path';
33
import { Action } from '@/common/handleTemplates/models.js';
4-
import { log } from 'console';
54
const unifyString = (s: string) =>
65
s.replace(/\s/g, '').replace(/\n/g, '').replace(/\"/g, `'`);
76
export class HandleTemplates {

0 commit comments

Comments
 (0)