-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200737 from Homebrew/graphql-inspector
graphql-inspector 5.0.8 (new formula)
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1214,6 +1214,7 @@ grails | |
grap | ||
graph-tool | ||
graphicsmagick | ||
graphql-inspector | ||
graphqurl | ||
graphqxl | ||
graphviz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |