diff --git a/README.md b/README.md index 8ea6c96..7f23e57 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -JSONAPI Suite Documentation +Graphiti Documentation ========== This is a static website generated by [jekyll](https://jekyllrb.com). To diff --git a/_layouts/blog.html b/_layouts/blog.html new file mode 100644 index 0000000..cc63ae9 --- /dev/null +++ b/_layouts/blog.html @@ -0,0 +1,20 @@ + + + + {% include head.html %} + + +
+
+ {% include header.html %} +
+

{{ page.title }}

+ {{ content }} +
+
+
+ {% include footer.html %} + {% include highlight.html %} + + + diff --git a/_posts/2019-03-31-graphiti-1-0.md b/_posts/2019-03-31-graphiti-1-0.md new file mode 100644 index 0000000..4fca991 --- /dev/null +++ b/_posts/2019-03-31-graphiti-1-0.md @@ -0,0 +1,31 @@ +--- +layout: blog +author: Lee Richmond +title: Graphiti 1.0 Released 🎉 +--- + +This project has gone through a number of iterations over the past three years. I'm happy to say we've now released 1.0, committing to semantic versioning. Graphiti has now seen enough use, across a wide variety of scenarios, that we can commit to no backwards-incompatible changes for a long while, and a changelog for future releases. + +We'll be writing more in this blog about our future roadmap. Stay tuned! + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/_posts/2019-05-08-graphiti-1-1.md b/_posts/2019-05-08-graphiti-1-1.md new file mode 100644 index 0000000..77a7610 --- /dev/null +++ b/_posts/2019-05-08-graphiti-1-1.md @@ -0,0 +1,38 @@ +--- +layout: blog +author: Lee Richmond +title: Graphiti 1.1 Released +--- + +Our first minor version bump centers around an important update: +**better errors for clients**. This is the first phase of work to allow us to provide more actionable errors to API users who might not also be developers of the API itself. This was brought to us by Graphiti maintainer [Wade Tandy](https://github.com/wadetandy). + +Previously, when a client sent a bad write request to the server - +unwritable attributes/relationships, or bad types - we would render the +same generic 500 error JSON. We now render helpful error messages, so +third-party clients know how to correct their requests. + +This is currently only affecting invalid writes, but the foundation laid +will be extendable to reads as well. + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/_posts/2019-05-20-graphiti-1-2.md b/_posts/2019-05-20-graphiti-1-2.md new file mode 100644 index 0000000..59352d0 --- /dev/null +++ b/_posts/2019-05-20-graphiti-1-2.md @@ -0,0 +1,40 @@ +--- +layout: blog +author: Lee Richmond +title: Graphiti 1.2 Released +--- + +I'm thrilled to announce much-needed, much-improved Rails integration, +courtesy of the amazing [Peter Wagenet](https://github.com/wagenet) and +the new [graphiti-rails](https://github.com/graphiti-api/graphiti-rails) gem. +This gives us better error handling, tighter controllers, and a solid +foundation for the codebase moving forward. + +You'll be especially happy about this release if you've ever tried to +add error-handling middleware. Because prior versions of Graphiti used +`rescue_from` in `ApplicationController`, we intercepted errors before +other middleware had access to them. Now everything just works. + +As part of this upgrade, we're switching from `GraphitiErrors` to +[RescueRegistry](https://github.com/wagenet/rescue_registry). Think of +`RescueRegistry` as a well-refactored version of `GraphitiErrors`, available to +even non-Graphiti developers. + +Though you don't have to do anything to upgrade to Graphiti 1.2, this release will start throwing deprecation notices around `ApplicationController`. Don't worry, the required changes are quite minor and spelled out in the [graphiti-rails migration guide]({{site.github.url}}/guides/graphiti-rails-migration). + +I'm quite happy with how this effort turned out. This release dramatically improves our integration with Rails internals, and I think everyone involved learned a lot. I'm honored to work with such talented developers in our open-source community ❤️ + +If you have any further questions, check out the `#dev` or `#rails` +channels in our [Slack Chat](https://join.slack.com/t/graphiti-api/shared_invite/enQtMjkyMTA3MDgxNTQzLWVkMDM3NTlmNTIwODY2YWFkMGNiNzUzZGMzOTY3YmNmZjBhYzIyZWZlZTk4YmI1YTI0Y2M0OTZmZGYwN2QxZjg). + +
+
+
+
+
+
+
+
+
+
+
diff --git a/_sass/theme.scss b/_sass/theme.scss index 2537176..002b6ff 100755 --- a/_sass/theme.scss +++ b/_sass/theme.scss @@ -914,3 +914,15 @@ img[alt=glimmer_logo] { } } } + +.blog { + h2 a { + color: white; + + &:hover { + &:before { + display: none; + } + } + } +} diff --git a/blog.md b/blog.md new file mode 100644 index 0000000..937835f --- /dev/null +++ b/blog.md @@ -0,0 +1,57 @@ +--- +layout: page +--- + +
+Blog +==== + +{% for post in site.posts %} + * [{{post.title}}]({{post.url}}) +{% endfor %} + +
+ +
+ +> Here you can keep up-to-date with Graphiti, including updates, +> deprecations, and our future roadmap. If there's anything you'd like +> to read about, let us know [on Slack](https://join.slack.com/t/graphiti-api/shared_invite/enQtMjkyMTA3MDgxNTQzLWVkMDM3NTlmNTIwODY2YWFkMGNiNzUzZGMzOTY3YmNmZjBhYzIyZWZlZTk4YmI1YTI0Y2M0OTZmZGYwN2QxZjg). + +{% for post in site.posts %} +

{{ post.title }}

+
{{ post.excerpt }}
+{% endfor %} + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/guides/graphiti-rails-migration.md b/guides/graphiti-rails-migration.md index 2b68769..72be7a6 100644 --- a/guides/graphiti-rails-migration.md +++ b/guides/graphiti-rails-migration.md @@ -5,4 +5,33 @@ layout: page Migrating to graphiti-rails =========================== -Coming Soon +First, bump to Graphiti 1.2 - everything should work as-is, but you'll +start seeing deprecation notices. + +Then add `graphiti-rails` to your `Gemfile`: + +```ruby +gem 'graphiti-rails', '~> 0.1' +``` + +You'll see slightly different deprecation notices at this point. To fix: + +* Remove `include Graphiti::Rails` from `ApplicationController` +* Remove `include Graphiti::Responders` from `ApplicationController` +* Remove the `register_exception` for `404` errors if you have one. +* Add `include Graphiti::Rails::Responders` from `ApplicationController` +* Remove the `rescue_from` block. + +Finally, if you were passing the `show_raw_error` option to +`#handle_exception`, replace this with `#show_detailed_exceptions?`: + +```ruby +def show_detailed_exceptions? + current_user.admin? +end +``` + +> Keep in mind, we'll always show detailed exceptions in development +> mode, per Rails conventions. If this is confusing or not desirable, +> set `config.consider_all_requests_local = false` in +> `config/environments/development.rb` pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy