We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0f012f commit 838f081Copy full SHA for 838f081
guides/schema/instrumentation.md
@@ -30,14 +30,19 @@ class MyFieldInstrumentation
30
old_resolve_proc.call(obj, args, ctx)
31
Rails.logger.info("#{type.name}.#{field.name} END: #{Time.now.to_i}")
32
}
33
+
34
+ # Return a copy of `field`, with a new resolve proc
35
+ field.redefine do
36
+ resolve(new_resolve_proc)
37
+ end
38
end
39
40
41
```
42
43
It can be attached as shown above. This implementation will _modify_ the underlying `GraphQL::Field` instance... be warned!
44
-## Query Instrumetation
45
+## Query Instrumentation
46
47
48
Query instrumentation can be attached during schema definition:
0 commit comments