https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
kgraphql
  • m

    morbidmerve

    03/12/2019, 2:39 PM
    hey guys! glad to see this channel here! I have a concern that i cant seem to solve alone at this point: I have a rogue error here to do with a (de)serializer pair im writing in an AppSchema definition that is supposed to (de)serialize an ArrayList<T> type. I know generics arent strictly supported but was unsure as to how close to the border one could move with this. Ill add a reply in a thread with the source that i believe causes this. Any help would be greatly appreciated. I really want to understand whats happening behind the scenes here.
    • 1
    • 1
  • j

    jeggy

    04/29/2019, 3:16 PM
    I have forked the original KGraphQL over to https://github.com/aPureBase/KGraphQL We are maintaining this and are welcoming pull requests over here instead, as
    pgutkowski
    hasn't been active for a few months and not publishing new releases. Current latest release by us is:
    compile 'com.apurebase:kgraphql:0.4.1'
    • 1
    • 1
  • j

    janvladimirmostert

    06/09/2019, 7:17 PM
    it's been a while since i used kgraphql, does it support generics yet ?
    j
    • 2
    • 4
  • a

    anthony castillo

    01/02/2020, 4:53 AM
    happy new year everyone. we are creating a new graphql application in kotlin and saw kgraphql. decided to use it over kotling-graphql as it looks more functional. we are fairly new to graphql and is learning as we go along. one question we have is how can we include the user session in the operations? since user session would not be part of schema, is there a way to include this in the resolvers?
    j
    • 2
    • 3
  • z

    Zoltan

    03/04/2020, 9:08 AM
    Hi guys I want to ask you which is the best way to test my queries and resolvers?
    j
    • 2
    • 1
  • y

    Yuri Kornienko

    04/09/2020, 7:29 AM
    Hi all! How to make scalar YearMonth and Year classes of Kotlin? I make stringscalar like in docs, but have error
    j
    • 2
    • 10
  • s

    Strum355

    04/10/2020, 11:14 PM
    Just discovered theres a slack channel for this. Hello again o/
    👋 1
    🙂 1
    j
    • 2
    • 1
  • s

    Strum355

    04/12/2020, 7:16 PM
    not sure if i missed it, but is there a way to get the schema in SDL format?
    j
    • 2
    • 1
  • y

    Yuri Kornienko

    04/15/2020, 9:29 AM
    another question. How I can access to context in resolver? For example, I need check token from header
    j
    • 2
    • 3
  • y

    Yuri Kornienko

    06/14/2020, 12:44 PM
    Good day! How can I insert some query in mutation resolver?
    j
    • 2
    • 7
  • m

    Mattlangsenkamp

    07/06/2020, 4:16 AM
    is there a way to add authentication to certain operations only, while excluding others? for example having the querying of items be open but requiring auth for mutations. I am using ktor.
    👍 1
    j
    • 2
    • 3
  • m

    manlan

    07/18/2020, 6:18 PM
    Why is the error happening? I did define the variables in the query.
    j
    • 2
    • 31
  • m

    manlan

    07/29/2020, 6:56 PM
    Sorry, couldn't find it anywhere in the docs, hence asking here
    j
    • 2
    • 5
  • m

    manlan

    08/08/2020, 4:31 PM
    Is there a way I can define the schema in a file, in the typical SDL format and handle the resolvers in application code?
    j
    • 2
    • 1
  • m

    manlan

    08/14/2020, 4:59 PM
    And how do I handle file uploads? 🤔
    j
    • 2
    • 2
  • i

    Inaiat

    08/31/2020, 12:41 PM
    Hey Guys. Firstly, I would like to congratulate this amazing project. There is any plan to migrate to kotlin 1.4? Thank you
    j
    • 2
    • 13
  • m

    manlan

    09/03/2020, 5:37 PM
    Hello there! How do I handle authentication with KGraphQL?
    j
    • 2
    • 1
  • m

    Mattlangsenkamp

    09/14/2020, 2:23 AM
    is there a way to split up a schema into multiple files to keep it more readable?
    ➕ 1
    j
    • 2
    • 5
  • m

    Mattlangsenkamp

    10/02/2020, 12:08 AM
    Does anyone know of any examples on how to upload a file with kgraphql?
    j
    • 2
    • 8
  • m

    Mattlangsenkamp

    10/25/2020, 6:41 PM
    when I get errors on the server side, even ones that I catch and rethrow I get this. is there any way to make the errors propogate down?
    j
    • 2
    • 5
  • m

    Mattlangsenkamp

    11/09/2020, 6:28 PM
    How does one specify that a certain resolver returns I union type. I see how to define a type in the docs but not how to use it
    j
    • 2
    • 6
  • m

    manlan

    11/16/2020, 5:08 PM
    I know this isn't directly related to KGraphql, but I'm trying to host my server on ec2. But when I open [public ip]:8080/grahpql, I cannot connect to it. I see a blank page on Firefox. My inboud rules look like this:
    j
    m
    • 3
    • 8
  • m

    Mattlangsenkamp

    11/20/2020, 6:12 PM
    if this type of thing isnt allowed here lmk. Ive been working on a side project using kotlin, ktor, and kgraphql. its a todo app that has more features that most (auth, nested todos, different scopes) and I plan on adding more features down the road, as well as just harden the app in general. the links are below check it out if you want I would totally love some feedback! https://www.todotree.me/ https://github.com/MattLangsenkamp/TodoTree https://github.com/MattLangsenkamp/todotree-react
    👍 2
    j
    • 2
    • 6
  • p

    py

    01/06/2021, 5:22 AM
    This looks really interesting for what I’m trying to do, but I can’t even get sample code to run: https://github.com/aPureBase/KGraphQL/issues/123
    👍 1
    j
    • 2
    • 1
  • p

    py

    01/06/2021, 5:26 AM
    e.g.
    instances(className: "com.squareup.example.Foo") {
      someField
      someOtherField  
    }
    j
    • 2
    • 8
  • t

    Tristan F.-R.

    01/06/2021, 3:51 PM
    How would I convert a KGraphQL schema to a Java-GraphQL schema?
    j
    • 2
    • 1
  • t

    tim

    03/21/2021, 3:15 PM
    Hi all! I've started exploring kgraphql and really like the approach! One bit which is unclear to me, and I can't find any mention of it in the docs, is how to return an error? When an error is thrown inside a resolver its returned as an error, but is there any other way to return an error while still maintaining control? Basically our normally errors bubble up inside an Either and so it seems a bit odd to throw in the resolver at the very end. Thanks!
    j
    • 2
    • 3
  • a

    andylamax

    04/25/2021, 10:24 AM
    Is there a kotlin multiplatform client implementation? that targets android, ios and js as well?
    j
    • 2
    • 2
  • a

    andylamax

    04/29/2021, 9:12 AM
    How do I get a stream inside a resolver so that I may read a file that has been upload by a client?
    j
    • 2
    • 1
  • v

    vio

    07/29/2021, 12:32 PM
    Hi everyone! I was working on a graphql schema, and I would like to have a logout mutation. Is there a way to clear the context for future mutations/queries? Any help is appreciated, thank you 🙏
    j
    • 2
    • 6
Powered by Linen
Title
v

vio

07/29/2021, 12:32 PM
Hi everyone! I was working on a graphql schema, and I would like to have a logout mutation. Is there a way to clear the context for future mutations/queries? Any help is appreciated, thank you 🙏
j

jeggy

07/29/2021, 12:46 PM
Hi Vio, The context is fully built by you on a per request basis. So I would need to know more information about your setup to help you here 😕
v

vio

07/29/2021, 1:14 PM
Given a configuration like this, where I store some user details in a variable called
user
, Is there a way to remove the user details from context with a logout mutation?
context { +user }

schema {

    mutation("logout") {
        resolver { ctx: Context ->
            val user = ctx.get<User>()
            
            // I'm looking for something like bellow
            ctx.clear() 
        }
    }

}
j

jeggy

07/29/2021, 1:53 PM
No, something like that is not directly possible. But what you are looking for is to understand the logic of
context { +user }
. As that code is being run upon every request. So if you want to clear the session, it's something that needs happen outside of KGraphQL
🙏 1
I'm not sure of how your user object is built?
and where are you calling the
schema.execute()
?
v

vio

07/30/2021, 8:08 AM
Thank you, your explanation makes sense. I'm calling the
schema.execute
at the start of the application, my confusion was around understanding that the context is build at each request but makes sense now 🙂 I've tried clearing the session outside of
kgraphql
and that was just what I needed, thanks 🚀
👍 1
View count: 3