Skip to content

Commit

Permalink
chore: install tailcall from npm (#190)
Browse files Browse the repository at this point in the history
* chore: install tailcall from npm

* Update setup.sh
  • Loading branch information
amitksingh1490 authored May 17, 2024
1 parent 8748f1d commit d2bb321
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 5 deletions.
6 changes: 4 additions & 2 deletions graphql/tailcall/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
cd ../../../tailcall
cargo build --release
#!/bin/bash
pwd
cd graphql/tailcall
npm install
216 changes: 216 additions & 0 deletions graphql/tailcall/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions graphql/tailcall/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "tailcall",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@tailcallhq/tailcall": "0.82.19"
}
}
26 changes: 25 additions & 1 deletion graphql/tailcall/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
#!/bin/bash

# Base directory

cd graphql/tailcall

current_dir=$(pwd)
TAILCALL_LOG_LEVEL=error TC_TRACKER=false $HOME/.tailcall/bin/tailcall start $current_dir/graphql/tailcall/benchmark.graphql
echo "Current directory: $current_dir"

base_dir="./node_modules"

# Pick the tailcall executable
for core_dir in $(find "$base_dir" -type d -name "core-*"); do
tailcall_executable="${core_dir}/bin/tailcall"

# Check if the tailcall executable exists
if [[ -x "$tailcall_executable" ]]; then
echo "Executing $tailcall_executable"

# Run the executable with the specified arguments
TAILCALL_LOG_LEVEL=error TC_TRACKER=false "$tailcall_executable" start $current_dir/benchmark.graphql
exit 0
fi
done

echo "tailcall executable not found."
exit 1
5 changes: 3 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ cd graphql/netflix_dgs
cd ../../

# For tailcall:
curl -sSL https://raw.githubusercontent.com/tailcallhq/tailcall/main/install.sh | bash -s -- v0.82.19
export PATH=$PATH:/root/.tailcall/bin
cd graphql/tailcall
npm install
cd ../../

# For caliban
cd graphql/caliban
Expand Down

0 comments on commit d2bb321

Please sign in to comment.