Comments (3)
The data from the first code block is generated by the lookahead system/etc. It can change in patch versions and is heavily influenced by user input in the query itself. You are not expected to deal with anything that contains an @
symbol; these implementation details are internal.
This question is not one you should be asking; could you share what you're trying to achieve so that I can perhaps guide you down a better path?
from operation-hooks.
Thanks @benjie
I'm working on a micro-payment system for graphql queries. I'm using the after
hook to request a payment from the client based on the size of the response payload. The request is throttled until payment is received. I have all the logic working well except:
- I need to be able to generate a hash of the payload that the client can later match against the payments they made (an alternative solution might be attaching the hash of the
input
to the payload) - I also need the payload to be in its final form when pricing the data to enable the client to later verify that they were charged the right amount
Would really appreciate your advice on how I can accomplish this.
from operation-hooks.
As discussed in chat, this needs to be done outside of GraphQL after GraphQL has resolved. One option is to use a server plugin for this, it should work for queries and mutations but we donβt have hooks for post-processing subscription bodies currently.
from operation-hooks.
Related Issues (11)
- Invocation of SQL functions should cast input param to JSONB, not JSON
- SQL operation hooks should be per-table
- Logic error: operation hook returned 'undefined' with Byid queries HOT 2
- error when requiring library HOT 1
- Getting error "Default resolvers at the root level are not supported" following the custom subscriptions guide HOT 8
- Allow messages to be registered from any SQL function HOT 6
- Question about operation hooks in JavaScript
- failed assertion at PgNoticeMessagesPlugin: "processNotice should not be set yet!" HOT 1
- Achive cookie with the help of graphile/operation-hooks HOT 1
- Access RAISE NOTICE details from GraphQL client HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from operation-hooks.