Skip to content

Commit

Permalink
graphql-inspector 5.0.8 (new formula)
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Dec 10, 2024
1 parent 2c5af43 commit 9498898
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,7 @@ grails
grap
graph-tool
graphicsmagick
graphql-inspector
graphqurl
graphqxl
graphviz
Expand Down
37 changes: 37 additions & 0 deletions Formula/g/graphql-inspector.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
class GraphqlInspector < Formula
desc "Validate schema, get schema change notifications, validate operations, and more"
homepage "https://the-guild.dev/graphql/inspector"
url "https://registry.npmjs.org/@graphql-inspector/cli/-/cli-5.0.8.tgz"
sha256 "738d81999b8c2851ce264112d2a773b225794f21aee3c555f9bdb0f78bc79aab"
license "MIT"
head "https://github.com/kamilkisiela/graphql-inspector.git", branch: "master"

depends_on "node"

def install
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]
end

test do
(testpath/"oldSchema.graphql").write <<~GRAPHQL
type Query {
hello: String
}
GRAPHQL

(testpath/"newSchema.graphql").write <<~GRAPHQL
type Query {
hello: String
world: String
}
GRAPHQL

diff_output = shell_output("#{bin}/graphql-inspector diff oldSchema.graphql newSchema.graphql")
assert_match "Field world was added to object type Query", diff_output
assert_match "No breaking changes detected", diff_output

system bin/"graphql-inspector", "introspect", "oldSchema.graphql"
assert_path_exists "graphql.schema.json"
end
end

0 comments on commit 9498898

Please sign in to comment.