Skip to content

Commit

Permalink
Updating to 8830d7c.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Jan 3, 2024
1 parent a90287b commit 6443458
Show file tree
Hide file tree
Showing 590 changed files with 752 additions and 790 deletions.
4 changes: 2 additions & 2 deletions authorization/authorization.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down Expand Up @@ -200,7 +200,7 @@ <h4 id="argument-authorization">Argument Authorization</h4>

<h2 id="handling-unauthorized-objects">Handling Unauthorized Objects</h2>

<p>By default, GraphQL-Ruby silently replaces unauthorized objects with <code class="language-plaintext highlighter-rouge">nil</code>, as if they didn’t exist. You can customize this behavior by implementing <a href="/api-doc/2.2.3/GraphQL/Schema#unauthorized_object-class_method" target="_blank" title="API docs for GraphQL::Schema.unauthorized_object"><code>Schema.unauthorized_object</code></a> in your schema class, for example:</p>
<p>By default, GraphQL-Ruby silently replaces unauthorized objects with <code class="language-plaintext highlighter-rouge">nil</code>, as if they didn’t exist. You can customize this behavior by implementing <a href="/api-doc/2.2.4/GraphQL/Schema#unauthorized_object-class_method" target="_blank" title="API docs for GraphQL::Schema.unauthorized_object"><code>Schema.unauthorized_object</code></a> in your schema class, for example:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">MySchema</span> <span class="o">&lt;</span> <span class="no">GraphQL</span><span class="o">::</span><span class="no">Schema</span>
<span class="c1"># Override this hook to handle cases when `authorized?` returns false for an object:</span>
Expand Down
6 changes: 3 additions & 3 deletions authorization/can_can_integration.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down Expand Up @@ -203,7 +203,7 @@ <h3 id="bypassing-cancan">Bypassing CanCan</h3>

<h3 id="handling-unauthorized-objects">Handling Unauthorized Objects</h3>

<p>When any CanCan check returns <code class="language-plaintext highlighter-rouge">false</code>, the unauthorized object is passed to <a href="/api-doc/2.2.3/GraphQL/Schema#unauthorized_object-class_method" target="_blank" title="API docs for GraphQL::Schema.unauthorized_object"><code>Schema.unauthorized_object</code></a>, as described in <a href="/authorization/authorization#handling-unauthorized-objects">Handling unauthorized objects</a>.</p>
<p>When any CanCan check returns <code class="language-plaintext highlighter-rouge">false</code>, the unauthorized object is passed to <a href="/api-doc/2.2.4/GraphQL/Schema#unauthorized_object-class_method" target="_blank" title="API docs for GraphQL::Schema.unauthorized_object"><code>Schema.unauthorized_object</code></a>, as described in <a href="/authorization/authorization#handling-unauthorized-objects">Handling unauthorized objects</a>.</p>

<h2 id="scopes">Scopes</h2>

Expand Down Expand Up @@ -307,7 +307,7 @@ <h3 id="authorizing-by-attribute">Authorizing by attribute</h3>
<span class="k">end</span>
</code></pre></div></div>

<p>(See <a href="/api-doc/2.2.3/GraphQL/Schema/Field" target="_blank" title="API docs for GraphQL::Schema::Field"><code>GraphQL::Schema::Field</code></a> for the different values available for defaults.)</p>
<p>(See <a href="/api-doc/2.2.4/GraphQL/Schema/Field" target="_blank" title="API docs for GraphQL::Schema::Field"><code>GraphQL::Schema::Field</code></a> for the different values available for defaults.)</p>

<h3 id="providing-a-custom-cancan-subject">Providing a Custom CanCan Subject</h3>

Expand Down
2 changes: 1 addition & 1 deletion authorization/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down
4 changes: 2 additions & 2 deletions authorization/pundit_integration.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down Expand Up @@ -243,7 +243,7 @@ <h4 id="bypassing-policies">Bypassing Policies</h4>

<h4 id="handling-unauthorized-objects">Handling Unauthorized Objects</h4>

<p>When any Policy method returns <code class="language-plaintext highlighter-rouge">false</code>, the unauthorized object is passed to <a href="/api-doc/2.2.3/GraphQL/Schema#unauthorized_object-class_method" target="_blank" title="API docs for GraphQL::Schema.unauthorized_object"><code>Schema.unauthorized_object</code></a>, as described in <a href="/authorization/authorization#handling-unauthorized-objects">Handling unauthorized objects</a>.</p>
<p>When any Policy method returns <code class="language-plaintext highlighter-rouge">false</code>, the unauthorized object is passed to <a href="/api-doc/2.2.4/GraphQL/Schema#unauthorized_object-class_method" target="_blank" title="API docs for GraphQL::Schema.unauthorized_object"><code>Schema.unauthorized_object</code></a>, as described in <a href="/authorization/authorization#handling-unauthorized-objects">Handling unauthorized objects</a>.</p>

<h2 id="scopes">Scopes</h2>

Expand Down
2 changes: 1 addition & 1 deletion authorization/scoping.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down
2 changes: 1 addition & 1 deletion authorization/visibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down
4 changes: 2 additions & 2 deletions changesets/definition.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down Expand Up @@ -207,7 +207,7 @@ <h2 id="examples">Examples</h2>

<h3 id="fields">Fields</h3>

<p>To add or redefine a field, use <code class="language-plaintext highlighter-rouge">field(..., added_in: ...)</code>, including all configuration values for the new implementation (see <a href="/api-doc/2.2.3/GraphQL/Schema/Field#initialize-instance_method" target="_blank" title="API docs for GraphQL::Schema::Field#initialize"><code>GraphQL::Schema::Field#initialize</code></a>). The definition given here will override the previous definition (if there was one) whenever this Changeset applies.</p>
<p>To add or redefine a field, use <code class="language-plaintext highlighter-rouge">field(..., added_in: ...)</code>, including all configuration values for the new implementation (see <a href="/api-doc/2.2.4/GraphQL/Schema/Field#initialize-instance_method" target="_blank" title="API docs for GraphQL::Schema::Field#initialize"><code>GraphQL::Schema::Field#initialize</code></a>). The definition given here will override the previous definition (if there was one) whenever this Changeset applies.</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Types::Recipe</span> <span class="o">&lt;</span> <span class="no">Types</span><span class="o">::</span><span class="no">BaseObject</span>
<span class="c1"># This new field is available when `context[:changeset_version]`</span>
Expand Down
2 changes: 1 addition & 1 deletion changesets/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down
2 changes: 1 addition & 1 deletion changesets/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down
4 changes: 2 additions & 2 deletions changesets/releases.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down Expand Up @@ -144,7 +144,7 @@ <h3 class="contents-header">Contents</h3>

<h2 id="inspecting-releases">Inspecting Releases</h2>

<p>To preview releases, you can create schema dumps by passing <code class="language-plaintext highlighter-rouge">context: { changeset_version: ... }</code> to <a href="/api-doc/2.2.3/GraphQL/Schema#to_definition-class_method" target="_blank" title="API docs for GraphQL::Schema.to_definition"><code>Schema.to_definition</code></a>.</p>
<p>To preview releases, you can create schema dumps by passing <code class="language-plaintext highlighter-rouge">context: { changeset_version: ... }</code> to <a href="/api-doc/2.2.4/GraphQL/Schema#to_definition-class_method" target="_blank" title="API docs for GraphQL::Schema.to_definition"><code>Schema.to_definition</code></a>.</p>

<p>For example, to see how the schema looks with <code class="language-plaintext highlighter-rouge">API-Version: 2021-06-01</code>:</p>

Expand Down
4 changes: 2 additions & 2 deletions dataloader/adopting.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down Expand Up @@ -117,7 +117,7 @@ <h3 class="contents-header">Contents</h3>
</div>
</div>
<div class="guide-container">
<p><a href="/api-doc/2.2.3/GraphQL/Dataloader" target="_blank" title="API docs for GraphQL::Dataloader"><code>GraphQL::Dataloader</code></a> solves the same problem as <a href="https://github.com/shopify/graphql-batch"><code class="language-plaintext highlighter-rouge">GraphQL::Batch</code></a>. There are a few major differences between the modules:</p>
<p><a href="/api-doc/2.2.4/GraphQL/Dataloader" target="_blank" title="API docs for GraphQL::Dataloader"><code>GraphQL::Dataloader</code></a> solves the same problem as <a href="https://github.com/shopify/graphql-batch"><code class="language-plaintext highlighter-rouge">GraphQL::Batch</code></a>. There are a few major differences between the modules:</p>

<ul>
<li><strong>Concurrency Primitive:</strong> GraphQL-Batch uses <code class="language-plaintext highlighter-rouge">Promise</code>s from <a href="https://github.com/lgierth/promise.rb"><code class="language-plaintext highlighter-rouge">promise.rb</code></a>; GraphQL::Dataloader uses Ruby’s <a href="https://ruby-doc.org/core-3.0.0/Fiber.html"><code class="language-plaintext highlighter-rouge">Fiber</code> API</a>. These primitives dictate how batch loading code is written (see below for comparisons).</li>
Expand Down
6 changes: 3 additions & 3 deletions dataloader/async_dataloader.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down Expand Up @@ -115,7 +115,7 @@ <h3 class="contents-header">Contents</h3>
</div>
</div>
<div class="guide-container">
<p><code class="language-plaintext highlighter-rouge">AsyncDataloader</code> will run GraphQL fields and Dataloader sources in parallel, so that external service calls (like database queries or network calls) don’t have to wait in a queue.</p>
<p><code class="language-plaintext highlighter-rouge">AsyncDataloader</code> will run <a href="/api-doc/2.2.4/GraphQL/Dataloader/Source#fetch-instance_method" target="_blank" title="API docs for GraphQL::Dataloader::Source#fetch"><code>GraphQL::Dataloader::Source#fetch</code></a> calls in parallel, so that external service calls (like database queries or network calls) don’t have to wait in a queue.</p>

<p>To use <code class="language-plaintext highlighter-rouge">AsyncDataloader</code>, hook it up in your schema <em>instead of</em> <code class="language-plaintext highlighter-rouge">GraphQL::Dataloader</code>:</p>

Expand All @@ -128,7 +128,7 @@ <h3 class="contents-header">Contents</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bundle add async
</code></pre></div></div>

<p>Now, <a href="/api-doc/2.2.3/GraphQL/Dataloader/AsyncDataloader" target="_blank" title="API docs for GraphQL::Dataloader::AsyncDataloader"><code>GraphQL::Dataloader::AsyncDataloader</code></a> will create <code class="language-plaintext highlighter-rouge">Async::Task</code> instances instead of plain <code class="language-plaintext highlighter-rouge">Fiber</code>s and the <code class="language-plaintext highlighter-rouge">async</code> gem will manage parallelism.</p>
<p>Now, <a href="/api-doc/2.2.4/GraphQL/Dataloader/AsyncDataloader" target="_blank" title="API docs for GraphQL::Dataloader::AsyncDataloader"><code>GraphQL::Dataloader::AsyncDataloader</code></a> will create <code class="language-plaintext highlighter-rouge">Async::Task</code> instances instead of plain <code class="language-plaintext highlighter-rouge">Fiber</code>s and the <code class="language-plaintext highlighter-rouge">async</code> gem will manage parallelism.</p>

<p>For a demonstration of this behavior, see: <a href="https://github.com/rmosolgo/rails-graphql-async-demo">https://github.com/rmosolgo/rails-graphql-async-demo</a></p>

Expand Down
10 changes: 5 additions & 5 deletions dataloader/dataloader.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</a>
<a href="/getting_started">Get Started</a>
<a href="/guides">Guides</a>
<a href="/api-doc/2.2.3/">API</a>
<a href="/api-doc/2.2.4/">API</a>
<a href="https://tinyletter.com/graphql-ruby">Newsletter</a>
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
<a href="https://graphql.pro">Upgrade to Pro</a>
Expand Down Expand Up @@ -110,7 +110,7 @@
<h1 class="guide-header">Dataloader</h1>
<div class="guide-table-of-contents"></div>
<div class="guide-container">
<p><a href="/api-doc/2.2.3/GraphQL/Dataloader" target="_blank" title="API docs for GraphQL::Dataloader"><code>GraphQL::Dataloader</code></a> instances are created for each query (or multiplex) and they:</p>
<p><a href="/api-doc/2.2.4/GraphQL/Dataloader" target="_blank" title="API docs for GraphQL::Dataloader"><code>GraphQL::Dataloader</code></a> instances are created for each query (or multiplex) and they:</p>

<ul>
<li>Cache <a href="/dataloader/sources">Source</a> instances for the duration of GraphQL execution</li>
Expand All @@ -120,9 +120,9 @@ <h1 class="guide-header">Dataloader</h1>
<p>During a query, you can access the dataloader instance with:</p>

<ul>
<li><a href="/api-doc/2.2.3/GraphQL/Query/Context#dataloader-instance_method" target="_blank" title="API docs for GraphQL::Query::Context#dataloader"><code>GraphQL::Query::Context#dataloader</code></a> (<code class="language-plaintext highlighter-rouge">context.dataloader</code>, anywhere that query context is available)</li>
<li><a href="/api-doc/2.2.3/GraphQL/Schema/Object#dataloader-instance_method" target="_blank" title="API docs for GraphQL::Schema::Object#dataloader"><code>GraphQL::Schema::Object#dataloader</code></a> (<code class="language-plaintext highlighter-rouge">dataloader</code> inside a resolver method)</li>
<li><a href="/api-doc/2.2.3/GraphQL/Schema/Resolver#dataloader-instance_method" target="_blank" title="API docs for GraphQL::Schema::Resolver#dataloader"><code>GraphQL::Schema::Resolver#dataloader</code></a> (<code class="language-plaintext highlighter-rouge">dataloader</code> inside <code class="language-plaintext highlighter-rouge">def resolve</code> of a Resolver, Mutation, or Subscription class.)</li>
<li><a href="/api-doc/2.2.4/GraphQL/Query/Context#dataloader-instance_method" target="_blank" title="API docs for GraphQL::Query::Context#dataloader"><code>GraphQL::Query::Context#dataloader</code></a> (<code class="language-plaintext highlighter-rouge">context.dataloader</code>, anywhere that query context is available)</li>
<li><a href="/api-doc/2.2.4/GraphQL/Schema/Object#dataloader-instance_method" target="_blank" title="API docs for GraphQL::Schema::Object#dataloader"><code>GraphQL::Schema::Object#dataloader</code></a> (<code class="language-plaintext highlighter-rouge">dataloader</code> inside a resolver method)</li>
<li><a href="/api-doc/2.2.4/GraphQL/Schema/Resolver#dataloader-instance_method" target="_blank" title="API docs for GraphQL::Schema::Resolver#dataloader"><code>GraphQL::Schema::Resolver#dataloader</code></a> (<code class="language-plaintext highlighter-rouge">dataloader</code> inside <code class="language-plaintext highlighter-rouge">def resolve</code> of a Resolver, Mutation, or Subscription class.)</li>
</ul>

</div>
Expand Down
Loading

0 comments on commit 6443458

Please sign in to comment.