/ graphql.nim
graphql.nim
 1  # nim-graphql
 2  # Copyright (c) 2021-2025 Status Research & Development GmbH
 3  # Licensed under either of
 4  #  * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
 5  #  * MIT license ([LICENSE-MIT](LICENSE-MIT))
 6  # at your option.
 7  # This file may not be copied, modified, or distributed except according to
 8  # those terms.
 9  
10  import
11    faststreams/inputs,
12    graphql/[parser, api],
13    graphql/builtin/json_respstream as jrs
14  
15  export
16    # faststreams inputs
17    inputs,
18  
19    # query_parser, schema_parser
20    # and full_parser
21    parser,
22  
23    # ast helper types
24    api.ast_helper,
25  
26    # exported types
27    api.`$`,
28    api.ErrorDesc,
29    api.ErrorLevel,
30    api.Name,
31    api.Result,
32    api.GraphqlRef,
33    api.NodeResult,
34    api.RespResult,
35    api.GraphqlResult,
36    api.GraphqlError,
37    api.NameCounter,
38    api.InstrumentFlag,
39    api.InstrumentResult,
40    api.InstrumentObj,
41    api.InstrumentRef,
42    api.InstrumentProc,
43    api.ExecRef,
44    api.FieldSet,
45    api.FieldRef,
46  
47    # exported results
48    api.isErr,
49    api.isOk,
50    api.err,
51    api.ok,
52    api.error,
53    api.get,
54  
55    # graphql api
56    api.init,
57    api.new,
58    api.customScalar,
59    api.customCoercion,
60    api.addVar,
61    api.parseVar,
62    api.parseVars,
63    api.addResolvers,
64    api.createName,
65    api.executeRequest,
66    api.validate,
67    api.parseSchema,
68    api.parseSchemaFromFile,
69    api.parseSchemas,
70    api.parseQuery,
71    api.parseQueryFromFile,
72    api.purgeQueries,
73    api.purgeSchema,
74    api.getNameCounter,
75    api.purgeNames,
76    api.treeRepr,
77    api.addInstrument,
78  
79    # graphql response
80    api.respMap,
81    api.respList,
82    api.respNull,
83    api.resp,
84  
85    # builtin json response stream
86    jrs.new,
87    jrs.getString,
88    jrs.getBytes,
89    jrs.JsonRespStream,
90    jrs