Skip to content

Commit 980e2fa

Browse files
authored
Merge pull request #11 from mikdiet/patch-1
Broken error links.
2 parents e6923fd + 32fa63a commit 980e2fa

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

lib/graphql/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def query(definition, variables: {}, context: {})
338338
end
339339

340340
if allow_dynamic_queries == false && definition.name.nil?
341-
raise DynamicQueryError, "expected definition to be assigned to a static constant https://git.io/vXXSE"
341+
raise DynamicQueryError, "expected definition to be assigned to a static constant https://github.com/github-community-projects/graphql-client/blob/master/guides/dynamic-query-error.md"
342342
end
343343

344344
variables = deep_stringify_keys(variables)

lib/graphql/client/collocated_enforcement.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def verify_collocated_path(location, path, method = "method")
2626
return yield if Thread.current[:query_result_caller_location_ignore]
2727

2828
if (location.path != path) && !(WHITELISTED_GEM_NAMES.any? { |g| location.path.include?("gems/#{g}") })
29-
error = NonCollocatedCallerError.new("#{method} was called outside of '#{path}' https://git.io/v1syX")
29+
error = NonCollocatedCallerError.new("#{method} was called outside of '#{path}' https://github.com/github-community-projects/graphql-client/blob/master/guides/collocated-call-sites.md")
3030
error.set_backtrace(caller(2))
3131
raise error
3232
end

lib/graphql/client/schema/object_type.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,13 @@ def method_missing(name, *args)
255255
end
256256

257257
unless field
258-
raise UnimplementedFieldError, "undefined field `#{e.name}' on #{type.graphql_name} type. https://git.io/v1y3m"
258+
raise UnimplementedFieldError, "undefined field `#{e.name}' on #{type.graphql_name} type. https://github.com/github-community-projects/graphql-client/blob/master/guides/unimplemented-field-error.md"
259259
end
260260

261261
if @data.key?(field.name)
262-
raise ImplicitlyFetchedFieldError, "implicitly fetched field `#{field.name}' on #{type} type. https://git.io/v1yGL"
262+
raise ImplicitlyFetchedFieldError, "implicitly fetched field `#{field.name}' on #{type} type. https://github.com/github-community-projects/graphql-client/blob/master/guides/implicitly-fetched-field-error.md"
263263
else
264-
raise UnfetchedFieldError, "unfetched field `#{field.name}' on #{type} type. https://git.io/v1y3U"
264+
raise UnfetchedFieldError, "unfetched field `#{field.name}' on #{type} type. https://github.com/github-community-projects/graphql-client/blob/master/guides/unfetched-field-error.md"
265265
end
266266
end
267267
end

test/test_query_result.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def test_no_method_error
347347
person.nickname
348348
flunk
349349
rescue GraphQL::Client::UnimplementedFieldError => e
350-
assert_match "undefined field `nickname' on Person type. https://git.io/v1y3m", e.to_s
350+
assert_match "undefined field `nickname' on Person type. https://github.com/github-community-projects/graphql-client/blob/master/guides/unimplemented-field-error.md", e.to_s
351351
end
352352
end
353353

@@ -362,7 +362,7 @@ def test_no_method_when_field_exists_but_was_not_fetched
362362

363363
person = @client.query(Temp::Query).data.me
364364

365-
assert_raises GraphQL::Client::UnfetchedFieldError, "unfetched field `name' on Person type. https://git.io/v1y3U" do
365+
assert_raises GraphQL::Client::UnfetchedFieldError, "unfetched field `name' on Person type. https://github.com/github-community-projects/graphql-client/blob/master/guides/unfetched-field-error.md" do
366366
person.name
367367
end
368368
end
@@ -378,7 +378,7 @@ def test_no_method_when_snakecase_field_exists_but_was_not_fetched
378378

379379
person = @client.query(Temp::Query).data.me
380380

381-
assert_raises GraphQL::Client::UnfetchedFieldError, "unfetched field `firstName' on Person type. https://git.io/v1y3U" do
381+
assert_raises GraphQL::Client::UnfetchedFieldError, "unfetched field `firstName' on Person type. https://github.com/github-community-projects/graphql-client/blob/master/guides/unfetched-field-error.md" do
382382
person.first_name
383383
end
384384
end
@@ -401,7 +401,7 @@ def test_no_method_error_leaked_from_parent
401401

402402
person = Temp::Person.new(@client.query(Temp::Query).data.me)
403403

404-
assert_raises GraphQL::Client::ImplicitlyFetchedFieldError, "implicitly fetched field `name' on Person type. https://git.io/v1yGL" do
404+
assert_raises GraphQL::Client::ImplicitlyFetchedFieldError, "implicitly fetched field `name' on Person type. https://github.com/github-community-projects/graphql-client/blob/master/guides/implicitly-fetched-field-error.md" do
405405
person.name
406406
end
407407
end
@@ -424,7 +424,7 @@ def test_no_method_error_snakecase_field_leaked_from_parent
424424

425425
person = Temp::Person.new(@client.query(Temp::Query).data.me)
426426

427-
assert_raises GraphQL::Client::ImplicitlyFetchedFieldError, "implicitly fetched field `firstName' on Person type. https://git.io/v1yGL" do
427+
assert_raises GraphQL::Client::ImplicitlyFetchedFieldError, "implicitly fetched field `firstName' on Person type. https://github.com/github-community-projects/graphql-client/blob/master/guides/implicitly-fetched-field-error.md" do
428428
person.first_name
429429
end
430430
end
@@ -446,7 +446,7 @@ def test_no_method_error_leaked_from_child
446446

447447
person = @client.query(Temp::Query).data.me
448448

449-
assert_raises GraphQL::Client::ImplicitlyFetchedFieldError, "implicitly fetched field `name' on Person type. https://git.io/v1yGL" do
449+
assert_raises GraphQL::Client::ImplicitlyFetchedFieldError, "implicitly fetched field `name' on Person type. https://github.com/github-community-projects/graphql-client/blob/master/guides/implicitly-fetched-field-error.md" do
450450
person.name
451451
end
452452
end

0 commit comments

Comments
 (0)