Comments (5)
Fixed in 9c19db2
from graphjin.
I found the issue, reading your code here: https://github.com/dosco/super-graph/blob/master/core/args.go#L33.
I was passing an int
and not a string
for UserIDKey
value in context, with this code:
ctx := context.WithValue(r.Context(), core.UserIDKey, authentication.MyID()) // int
Now I'm using this instead:
ctx := context.WithValue(r.Context(), core.UserIDKey, strconv.Itoa(authentication.MyID()))
At first I didn't notice the error because nowhere is it written that it must be a string.
Shall we create a page for config
and "using SuperGraph as a library" related?
Can we specify it in code docs? Do you agree, @dosco?
from graphjin.
Thanks that would be very valuable if you could document your experience with using Super Graph as a library. You can add a page to this folder and i'll include it on the website. https://github.com/dosco/super-graph/tree/master/docs/website/docs
from graphjin.
Yes I'll create a page in a few hours.
For this problem, can we use both string
and int
for user_id
?
Here the code (https://github.com/dosco/super-graph/blob/master/core/args.go#L29-L36):
for i, p := range params {
switch p.Name {
case "user_id":
if v := c.Value(UserIDKey); v != nil {
vars[i] = v.(string) // maybe a case for int too?
} else {
return nil, argErr(p)
}
...
from graphjin.
That should work.
from graphjin.
Related Issues (20)
- Support `returns table (like <tablename>)` in stored procedure record returns. HOT 1
- Columns prefixed with "upper_" or "lower_" incorrectly parsed
- Support aggregation result as order field
- list query & id query having same args HOT 1
- count query field is not accepting correct arguments HOT 1
- webui: Error fetching schema HOT 1
- Perhaps there is a bug in the SetContextValues function within auth0.go. HOT 1
- Sorry, there was a problem running the beginner example and I don't know how to solve it HOT 4
- I have doubts about how to insert it password HOT 1
- I have a problem required variable 'user_id' of type 'integer' must be set HOT 4
- Does it not support mysql? HOT 1
- variable limit not work? HOT 1
- Introspection result missing inputFields HOT 1
- wasm / deno updates HOT 2
- Webshop example schema error with graphql-code-generator HOT 6
- How to use pgx.Pool
- Unable to connect postgres
- Dynamic configuration for big number of schemas
- wrong relation resolving in multiple schemas environment HOT 1
- Incorrect SDL types generated for insert/update HOT 7
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 graphjin.