-
Notifications
You must be signed in to change notification settings - Fork 10.3k
/
types.ts
57 lines (51 loc) · 1018 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { IErrorMapEntry, ErrorId } from "./error-map"
export interface IConstructError {
details: {
id?: ErrorId
context?: Record<string, string>
error?: Error
[key: string]: unknown
}
}
export interface ILocationPosition {
line: number
column: number
}
export interface IStructuredError {
code?: string
text: string
stack: {
fileName: string
functionName?: string
lineNumber?: number
columnNumber?: number
}[]
filePath?: string
location?: {
start: ILocationPosition
end?: ILocationPosition
}
error?: unknown
group?: string
level: IErrorMapEntry["level"]
type?: IErrorMapEntry["type"]
docsUrl?: string
}
export interface IOptionalGraphQLInfoContext {
codeFrame?: string
filePath?: string
urlPath?: string
plugin?: string
}
export enum Level {
ERROR = `ERROR`,
WARNING = `WARNING`,
INFO = `INFO`,
DEBUG = `DEBUG`,
}
export enum Type {
GRAPHQL = `GRAPHQL`,
CONFIG = `CONFIG`,
WEBPACK = `WEBPACK`,
PLUGIN = `PLUGIN`,
}