@@ -415,7 +415,7 @@ info "arg_n: ${arg_n}"
415
415
416
416
# woo.sh
417
417
echo " Now ready for GrahpQL server generation!"
418
-
418
+ input= " $( pwd ) / ${arg_i} "
419
419
config_file=" $( cd " $( dirname " ${arg_c} " ) " && pwd) /$( basename " ${arg_c} " ) "
420
420
421
421
# Check if driver exists
@@ -443,27 +443,27 @@ else
443
443
custom_resolvers=${__dir} /graphql-server/empty_custom_resolvers.js
444
444
fi
445
445
446
- echo ${arg_i}
447
- echo ${config_file}
448
- echo ${driver_dir}
449
- echo ${output_dir}
450
- echo ${custom_schema}
451
- echo ${custom_resolvers}
446
+ echo " Input: ${arg_i} "
447
+ echo " Output: ${output_dir} "
448
+ echo " Config: ${config_file} "
449
+ echo " Driver: ${driver_dir} "
450
+ echo " Custom schema: ${custom_schema} "
451
+ echo " Custom resolvers: ${custom_resolvers} "
452
452
453
453
# copy server files
454
- cp . /graphql-server/server.js ${output_dir}
454
+ cp ${__dir} /graphql-server/server.js ${output_dir}
455
455
cp ${driver_dir} /* ${output_dir}
456
456
(cd ${output_dir} ; npm install)
457
457
# Hack: Modify executeFieldsSerially(...) in /node_modules/graphql/execution/execute.js
458
458
# The mod is required to support nested transactions.
459
- cp . /graphql-server/graphql/execution/execution.js ${output_dir} /node_modules/graphql/execution/execute.js
459
+ cp ${__dir} /graphql-server/graphql/execution/execution.js ${output_dir} /node_modules/graphql/execution/execute.js
460
460
cp ${custom_schema} ${output_dir} /api-schema/custom-api-schema.graphql
461
461
cp ${custom_resolvers} ${output_dir} /custom-resolvers.js
462
462
463
463
# generate GraphQL API schema (for now, assume that arg_i is a relative path/file)
464
- cd . /graphql-api-generator
464
+ cd ${__dir} /graphql-api-generator
465
465
python3 generator.py \
466
- --input ../ ${arg_i } \
466
+ --input ${input } \
467
467
--output ${output_dir} /api-schema/api-schema.graphql \
468
468
--config ${config_file}
469
469
cd ..
0 commit comments