@@ -10,12 +10,12 @@ express or implied. See the License for the specific language governing
10
10
permissions and limitations under the License.
11
11
*/
12
12
13
- const { astFromValue, buildASTSchema, typeFromAST } = require ( 'graphql' ) ;
14
- const gql = require ( 'graphql-tag' ) ; // GraphQL library to parse the GraphQL query
13
+ import { astFromValue , buildASTSchema , typeFromAST } from 'graphql' ;
14
+ import { gql } from 'graphql-tag' ; // GraphQL library to parse the GraphQL query
15
15
16
16
const useCallSubquery = false ;
17
17
18
- // 2025-02-04T20:17:38.303Z
18
+ // 2025-02-05T01:35:32.969Z
19
19
20
20
const schemaDataModelJSON = `{
21
21
"kind": "Document",
@@ -3475,7 +3475,7 @@ const schemaDataModel = JSON.parse(schemaDataModelJSON);
3475
3475
const schema = buildASTSchema ( schemaDataModel , { assumeValidSDL : true } ) ;
3476
3476
3477
3477
3478
- function resolveGraphDBQueryFromAppSyncEvent ( event ) {
3478
+ export function resolveGraphDBQueryFromAppSyncEvent ( event ) {
3479
3479
const fieldDef = getFieldDef ( event . field ) ;
3480
3480
3481
3481
const args = [ ] ;
@@ -3518,9 +3518,9 @@ function resolveGraphDBQueryFromAppSyncEvent(event) {
3518
3518
const graphQuery = resolveGraphDBQuery ( obj ) ;
3519
3519
return graphQuery ;
3520
3520
}
3521
-
3522
-
3523
- function resolveGraphDBQueryFromApolloQueryEvent ( event ) {
3521
+
3522
+
3523
+ export function resolveGraphDBQueryFromApolloQueryEvent ( event ) {
3524
3524
// TODO
3525
3525
}
3526
3526
@@ -4428,7 +4428,7 @@ function gremlinElementToJson(o, fieldsAlias) {
4428
4428
}
4429
4429
4430
4430
4431
- function refactorGremlinqueryOutput ( queryResult , fieldsAlias ) {
4431
+ export function refactorGremlinqueryOutput ( queryResult , fieldsAlias ) {
4432
4432
4433
4433
//const r = JSON.parse(queryResult).result.data;
4434
4434
const r = queryResult ;
@@ -4533,7 +4533,7 @@ function parseQueryInput(queryObjOrStr) {
4533
4533
* @param {(Object|string) } queryObjOrStr the GraphQL document containing an operation to resolve
4534
4534
* @returns {string }
4535
4535
*/
4536
- function resolveGraphDBQuery ( queryObjOrStr ) {
4536
+ export function resolveGraphDBQuery ( queryObjOrStr ) {
4537
4537
let executeQuery = { query :'' , parameters : { } , language : 'opencypher' , refactorOutput : null } ;
4538
4538
4539
4539
const obj = parseQueryInput ( queryObjOrStr ) ;
@@ -4557,6 +4557,3 @@ function resolveGraphDBQuery(queryObjOrStr) {
4557
4557
4558
4558
return executeQuery ;
4559
4559
}
4560
-
4561
-
4562
- module . exports = { resolveGraphDBQueryFromAppSyncEvent, resolveGraphDBQueryFromApolloQueryEvent, resolveGraphDBQuery, refactorGremlinqueryOutput } ;
0 commit comments