Comments (7)
Many AST nodes of the graphql_parser
don't have a position property, and I might actually create a new parser later to solve this problem.😁
from async-graphql.
Any type already exists and I have added it to support Federation. Is that what you want?
from async-graphql.
Yes I know and I'm using it. I wanted to implement the From trait for being able to write something like this:
let test: Any = json!({ "a": 42 }).into()
Which is only possible if I construct a graphql_parser::Value by hand because there is no impl From serde_json::Value for graphql_parser::Value
. But I think I can just add impl<T> From T for Any where T: Into<graphql_parser::Value>
which does not let you write code like the above quite yet but when the functionality is added to graphql_parser and also gives you more flexibility for other use-cases. I solved this in my code by implementing a helper trait which is kind of ugly and unnecessary. I will commit the code and it becomes clear. 😆
from async-graphql.
Sorry I misread it, it was serde_json::Value
, in fact I've already written an json_value_to_gql_value
for this ugly transformation function.😂
Line 114 in 26120e2
from async-graphql.
Yes but this is the other way around. 😆 I opened an issue at graphql_parser for providing the conversion but as I wrote its not trivial because of different base types on Number. Anyway I think 26120e2 solves this issue now.
from async-graphql.
I think removing the dependency on graphql_parser is a good Idea!
from async-graphql.
Now with the dependency removed this should be possible.
from async-graphql.
Related Issues (20)
- Get mutable referenece to the global data defined in the `Context` or `Schema` HOT 1
- Confusing `unused_mut` warning in `#[Object]` HOT 8
- How to handle both directions of one-to-many relation in federated graph
- Question: How to get server to send ping messages on subscriptions? HOT 2
- Parsing multiple operations in a file HOT 1
- Non nullable variables should allow default values HOT 3
- Object with single skipped field but with ComplexObject HOT 2
- As using proxy type
- Using flatten inside an impl with no other fields causes a compile error
- Subscription with MPSC receiver in context data
- Reduce clippy noise from #[Object] macro HOT 2
- Guard trait lifetime HOT 1
- Using generics with both SimpleObject and InputObject as field in output type fails HOT 1
- Subscription Authentication
- Stack overflow after upgrade to 7.0.2 HOT 5
- Does async-graphql validate responses?
- Error reading data from ExtensionContext after upgrade to 7.0.3 HOT 1
- Create a general error formateer
- Allow flatten on arguments
- External fields not getting generated in SDL
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 async-graphql.