README.md in graphql-batch-0.4.0 vs README.md in graphql-batch-0.4.1

- old
+ new

@@ -46,11 +46,13 @@ ids.each { |id| fulfill(id, nil) unless fulfilled?(id) } end end ``` -Use `GraphQL::Batch` as a plugin in your schema (for graphql >= `1.5.0`). +Use `GraphQL::Batch` as a plugin in your schema _after_ specifying the mutation +so that `GraphQL::Batch` can extend the mutation fields to clear the cache after +they are resolved (for graphql >= `1.5.0`). ```ruby class MySchema < GraphQL::Schema query MyQueryType mutation MyMutationType @@ -67,19 +69,10 @@ GraphQL::Batch.use(self) end ``` -##### With `1.9.0`'s `Interpreter` runtime - -Add `GraphQL::Batch` _after_ the interpreter, so that `GraphQL::Batch` can detect the interpreter and attach the right integrations: - -```ruby -use GraphQL::Execution::Interpreter -use GraphQL::Batch -``` - #### Field Usage The loader class can be used from the resolver for a graphql field by calling `.for` with the grouping arguments to get a loader instance, then call `.load` on that instance with the key to load. ```ruby @@ -97,10 +90,10 @@ ```ruby field :products, [Types::Product, null: true], null: false do argument :ids, [ID], required: true end -def product(ids:) +def products(ids:) RecordLoader.for(Product).load_many(ids) end ``` Although this library doesn't have a dependency on active record,