@@ -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-01-31T06:40:58.761Z
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 = [ ] ;
@@ -3520,7 +3520,7 @@ function resolveGraphDBQueryFromAppSyncEvent(event) {
3520
3520
}
3521
3521
3522
3522
3523
- function resolveGraphDBQueryFromApolloQueryEvent ( event ) {
3523
+ export function resolveGraphDBQueryFromApolloQueryEvent ( event ) {
3524
3524
// TODO
3525
3525
}
3526
3526
@@ -4425,7 +4425,7 @@ function gremlinElementToJson(o, fieldsAlias) {
4425
4425
}
4426
4426
4427
4427
4428
- function refactorGremlinqueryOutput ( queryResult , fieldsAlias ) {
4428
+ export function refactorGremlinqueryOutput ( queryResult , fieldsAlias ) {
4429
4429
4430
4430
//const r = JSON.parse(queryResult).result.data;
4431
4431
const r = queryResult ;
@@ -4530,7 +4530,7 @@ function parseQueryInput(queryObjOrStr) {
4530
4530
* @param {(Object|string) } queryObjOrStr the GraphQL document containing an operation to resolve
4531
4531
* @returns {string }
4532
4532
*/
4533
- function resolveGraphDBQuery ( queryObjOrStr ) {
4533
+ export function resolveGraphDBQuery ( queryObjOrStr ) {
4534
4534
let executeQuery = { query :'' , parameters : { } , language : 'opencypher' , refactorOutput : null } ;
4535
4535
4536
4536
const obj = parseQueryInput ( queryObjOrStr ) ;
@@ -4554,6 +4554,3 @@ function resolveGraphDBQuery(queryObjOrStr) {
4554
4554
4555
4555
return executeQuery ;
4556
4556
}
4557
-
4558
-
4559
- module . exports = { resolveGraphDBQueryFromAppSyncEvent, resolveGraphDBQueryFromApolloQueryEvent, resolveGraphDBQuery, refactorGremlinqueryOutput } ;
0 commit comments