Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.8] custom introspection #1170

Merged
merged 8 commits into from
Dec 14, 2017
Merged

[1.8] custom introspection #1170

merged 8 commits into from
Dec 14, 2017

Conversation

rmosolgo
Copy link
Owner

@rmosolgo rmosolgo commented Dec 5, 2017

A beast of a PR to add custom introspection to GraphQL-Ruby

  • custom types for schema introspection
  • custom introspection entry points (a la __type(name:) & __schema)
  • custom dynamic fields (a la __typename)

I've added docs here.

Fixes #793
Fixes #733

Also, this includes some other interesting stuff:

  • Inheriting name & description (needs test)
  • Introspection schema totally converted to class-based API
  • GraphQL::Schema::LateBoundType: for referencing types by name, this could be nice to make public somehow
  • extras: API for sneaking :irep_node and :ast_node into method resolve. Should I document that, or just let it disappear and see if anyone needs it?

@rmosolgo rmosolgo added this to the 1.8.0 milestone Dec 5, 2017
@@ -29,6 +29,8 @@
name_field = new_object_class.fields.find { |f| f.name == "name" }
assert_equal "The new description", name_field.description
end

it "inherits name and description"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is empty 🙊

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😉

image

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added, thanks for the reminder!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants