Skip to content

Commit

Permalink
Add rake task for generating GraphQL docs
Browse files Browse the repository at this point in the history
Keep GraphQL tasks co-located.
  • Loading branch information
dannymidnight committed Nov 20, 2023
1 parent a671a58 commit 8e0047b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .buildkite/update_graphql_docs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ -n "$PULL_REQUEST_NUMBER" ]; then
fi

echo "+++ Generate GraphQL docs"
./scripts/generate-graphql-api-content.sh
rake graphql:generate

echo "--- Commit and push changes"
git add .
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ If you need to fetch the latest schema you can either:
API_ACCESS_TOKEN=xxx rake graphql:fetch_schema >| data/graphql/schema.graphql

# Generate docs based on latest schema
./scripts/generate-graphql-api-content.sh
rake graphql:generate
```


Expand Down
5 changes: 5 additions & 0 deletions lib/tasks/graphql.rake
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ namespace :graphql do

puts GraphQL::Client.load_schema(HTTP).to_definition
end

desc "Generate GraphQL docs and navigation from GraphQL schema"
task :generate do
ruby "scripts/generate_graphql_api_content.rb"
end
end
5 changes: 0 additions & 5 deletions scripts/generate-graphql-api-content.sh

This file was deleted.

0 comments on commit 8e0047b

Please sign in to comment.