Comments (5)
Hello from a future Google searcher --
I gave up with this and used QueryParser.parse(s""" ... ${InterpolationVariable} ... """).get
instead.
Hope this helps.
from drunk.
Unlike the examples, I had to escape $
in the query with $$
, as my Scala compiler was interpreting $
as string interpolation. So something like
val query =
graphql"""
query getPeople($$fams: String) {
getPeople(families: [$$fams]) {
name
}
}
"""
worked for me.
Regarding the decoders, I did have to use io.circe.generic.auto._
as shown above instead of io.circe.generic.semiauto._
as shown in the README.
There was also some Akka version dependency incompatibility that I was able to fix by including "com.typesafe.akka" %% "akka-actor" % "2.5.19"
as a dependency in my project.
from drunk.
Hi @evbo !
I think you miss the var definition in the query sentence:
val query =
graphql"""
query getPeople($fams: String) {
getPeople(families: [$fams]) {
name
}
}
"""
also the last error could be that you miss to import circe, to have the json decoder for People and List. Try with:
import io.circe._, io.circe.generic.auto._
from drunk.
Thanks, and I really appreciate you making this library, but since posting I've been under a tight deadline to get something working so I've implemented a fairly light weight Sangria client of my own. Just a bare bones simple akka post or get request with circe marshaling using only simple case classes to avoid complex encoding/decoding. Unless there's something else I haven't accounted for I may just stick with this approach.
thanks for getting back to me though. Love the title of this repo too, though it's a challenge to google :)
from drunk.
Rats. I'm having these exact same issues.
from drunk.
Related Issues (8)
- Add support for Http connection headers
- Client implementation errror "Cannot deduce decoder" HOT 3
- Getting Size Limit Error on client side
- Akka: Implications of the streaming nature of Request/Response Entities HOT 4
- Maven repository HOT 3
- Use STTP instead of Akka as the backend HOT 1
- can't resolve 2.5.0 version with scala 2.11.12 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 drunk.