Skip to content

Commit

Permalink
Merge pull request #200737 from Homebrew/graphql-inspector
Browse files Browse the repository at this point in the history
graphql-inspector 5.0.8 (new formula)
  • Loading branch information
BrewTestBot authored Dec 11, 2024
2 parents 764cbb5 + cf1e217 commit 786e628
Show file tree
Hide file tree
Showing 2 changed files with 47 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
46 changes: 46 additions & 0 deletions Formula/g/graphql-inspector.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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"

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd9a9963b98f89373fa2a37db49e9012f9ca0d1a1485ad554038f5d45e7f9125"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd9a9963b98f89373fa2a37db49e9012f9ca0d1a1485ad554038f5d45e7f9125"
sha256 cellar: :any_skip_relocation, arm64_ventura: "cd9a9963b98f89373fa2a37db49e9012f9ca0d1a1485ad554038f5d45e7f9125"
sha256 cellar: :any_skip_relocation, sonoma: "5b3ebcff1fd9ff768e66b7b4edb37995ab3c079ad0e9bf08501965a60f36c6ae"
sha256 cellar: :any_skip_relocation, ventura: "5b3ebcff1fd9ff768e66b7b4edb37995ab3c079ad0e9bf08501965a60f36c6ae"
sha256 cellar: :any_skip_relocation, x86_64_linux: "cd9a9963b98f89373fa2a37db49e9012f9ca0d1a1485ad554038f5d45e7f9125"
end

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 786e628

Please sign in to comment.