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
  • 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
  • n

    Nick

    08/17/2021, 9:06 AM
    Hey there! Does anyone have an example how I would use
    wrap
    ? I’m specifically trying to harness it for Authentication purposes but I can’t seem to figure it out.
    • 1
    • 1
  • t

    Tomas Kormanak

    03/18/2022, 3:51 PM
    Hi, I am using custom data class(Address) in mutation input an got this error:
    Introspection must provide output type for fields, but received: Address!.
    Used data classes:
    data class Address(
        val label: String? = null,
        val street: String? = null,
        val city: String? = null,
    )
    data class ChangeAddress(
        val userid:Id,
        val address: Address,
    )
    Mutation is defined like this:
    mutation("changeAddress") {
        resolver { input: ChangeAddress, context: Context ->
            // change the addresss.....            
        }
    }
    What could be the problem?
    • 1
    • 1
  • j

    jeggy

    05/31/2022, 7:38 PM
    After a long break. I'm back and I'm looking for more maintainers to help me maintain the project and grow the KGraphQL community. People are welcome to write to me privately here on slack and we can discuss more about becoming a maintainer. https://github.com/aPureBase/KGraphQL/discussions/187
    👍 1
    e
    d
    • 3
    • 3
  • i

    itzik kasovitch

    06/20/2022, 2:19 PM
    Hi, I am trying to figure out if the following case is supported by KGraphQL. I need to write an api where the input is something like the composite design patter.. For keeping the API general I want the input type to be the type of the base class. When I try to do it I get a
    Failed to coerce
    exception. So the input type would be:
    sealed class Base {
        data class Leaf(val prop: Int): Base()
        data class Composite(val prop: List<Base>): Base()
    }
    I tried different kind of kotlinx.serialization annotations to make it work but it seems like behind the scenes it failed since Jackson is used. Also when I try to use the base as an
    inputType
    I get an error that it doesn't have any fields. I also tried to use the derived classes as
    inputType
    . Without success. Last, in the examples I can only see something which returns a unionType (not something the accepts a unionType).
    j
    • 2
    • 2
  • i

    itzik kasovitch

    06/27/2022, 7:38 PM
    Hi, earlier today I found out that this bug causes characters in Japanese to be garbled in our application which uses KGraphQL. There is a workaround proposed on this thread. Would it make sense if I send a PR to apply the proposed workaround on this line for the benefit of other KGraphQL users?
    e
    j
    • 3
    • 5
  • i

    itzik kasovitch

    06/28/2022, 9:44 AM
    What do you propose to do if I need to support multiple graphql endpoints (public api and internal api for example). Looks like we can't call install twice. I also want a different schema per endpoint.
  • j

    jeggy

    06/28/2022, 9:45 AM
    have been thinking about that myself, not sure of which route to go. But am thinking about going with this solution: https://github.com/aPureBase/KGraphQL/issues/190
  • j

    jeggy

    06/28/2022, 9:46 AM
    then you could just call
    graphql
    multiple times, to create multiple graphql endpoints, or multiple for require authentication and not authentication
  • i

    itzik kasovitch

    06/28/2022, 9:48 AM
    Another option is to make it possible to configure multiple endpoints in the plugin
  • i

    itzik kasovitch

    06/28/2022, 9:49 AM
    And a separate schema for each
  • j

    jeggy

    06/28/2022, 9:50 AM
    could be, but the current design for the ktor plugin is a bit ugly when used with authentication
  • j

    jeggy

    06/28/2022, 9:50 AM
    https://kgraphql.io/Plugins/ktor/#context
  • j

    jeggy

    06/28/2022, 9:55 AM
    but for now, if you just create a PR for solving the issue, it will be included in the next release 🙂 But some bigger change is coming when upgrading to ktor 2.0 or moving to a route extension structure. And when moving to ktor, I will make sure that we will still have 1.x support also, probably in two different packages.
    👍 1
  • i

    itzik kasovitch

    06/28/2022, 9:56 AM
    You mean if I will solve it on top of my proposal?
  • j

    jeggy

    06/28/2022, 10:07 AM
    no, I mean I will just take your solution to that encoding issue, along with whatever solution we will move into in the future
    👍 1
  • m

    maaxgr

    07/17/2022, 1:43 PM
    @itzik kasovitch With some small tweaks you could install the plugin twice. I have that approach in production and it works: https://github.com/aPureBase/KGraphQL/pull/193 Don't know if this is something that could come to aPureBase-Upstream until the Design of #190 is implemented @jeggy.
    :thank-you: 1
    👍 3
    j
    • 2
    • 2
  • w

    Wyatt Kennedy

    08/19/2022, 11:30 PM
    Hey I see that there is an introspection schema here and specified through the code. Is there a way to generate the json from this for use in other tools and clients?
    j
    • 2
    • 2
  • r

    Richard Prince

    11/22/2022, 9:41 AM
    Hey, is there an estimate on when KGraphQL 0.18.1 will be released?
    j
    e
    • 3
    • 4
  • n

    Nahuel Ourthe

    12/01/2022, 11:40 PM
    Hi people, I'm new in KGraphQL and I have the same problem that Tomas Kormanak solved... My problem is that I can't understand how he solved it.
    • 1
    • 2
  • l

    Lukáš Kúšik

    12/31/2022, 10:16 AM
    Is it possible to wrap errors in 200 OK responses (
    wrapErrors
    in
    GraphQL.Configuration
    ) but also log them into the console at the same time (behaviour with
    wrapErrors
    set to false)?
    j
    • 2
    • 3
  • a

    Andres

    01/13/2023, 2:00 PM
    👋 I am wondering how to get a request header in my resolver. I am assuming there is a way to grab it with the Context. However I can't seem to find an example and have been unable to figure it out on my end.
    n
    • 2
    • 3
  • n

    Nahuel Ourthe

    01/17/2023, 12:01 AM
    Hi people, I'm having a problem that I don't know if it is about kgraphql, but I don't know where to start. I can't use version
    0.18.1
    of kgraphql, I have to downgrade to
    0.18.0
    to use it.
    • 1
    • 2
  • t

    Tiago Nunes

    02/06/2023, 6:11 PM
    Hey guys, I created a thread sharing my notes while studying the internals of the library, in case it helps anyone else looking to contribute https://github.com/aPureBase/KGraphQL/discussions/213 Feedback is appreciated 🙂 and many thanks for this awesome project :kotlin-intensifies:
    e
    • 2
    • 1
  • t

    Tiago Nunes

    02/07/2023, 5:32 PM
    Hi @jeggy, I want to propose significant changes in the library that would make it possible to fully support generic types. I'm proposing we rely only on java.lang.reflect.Type for associating to TypeDefs, and for all of the compilation logic. Basically we replace all uses of *KClass<*>* and KType with java.lang.reflect.Type, to avoid kotlin reflection limitations (Top reflection-based serialization libraries also rely exclusively on java.lang.reflect.Type under the hood: Jackson, Gson, Moshi). I've created a POF branch and this comment to describe the proposal in detail. Please let me know if this kind of change is something you agree with, in order to support the use case.
    a
    • 2
    • 2
  • m

    Mazhar Ibna Zahur

    02/26/2023, 9:44 AM
    how can i add extensions in graphql response. my response is like this
    data class GraphQLResponse(
        val data: String? = null,
        val errors: List<Error>? = null,
        val extensions: Map<String, Any>? = null
    )
  • i

    Ilya Nothen

    02/26/2023, 11:47 AM
    Hello! Is graphql-multipart supported?
  • a

    Andres

    03/14/2023, 4:44 PM
    Potential silly question here.. Is there a way to determine what fields a user is requesting for their response? I am thinking I should be able to optimize some database queries if I know they only want specific fields in the response.
    j
    n
    • 3
    • 3
  • a

    Andres

    03/21/2023, 7:52 PM
    Has anyone looked into supporting form-data so that we could do file uploads? ex; https://stackoverflow.com/questions/61892306/is-there-any-way-to-upload-files-via-postman-into-a-graphql-api
    a
    • 2
    • 1
Powered by Linen
Title
a

Andres

03/21/2023, 7:52 PM
Has anyone looked into supporting form-data so that we could do file uploads? ex; https://stackoverflow.com/questions/61892306/is-there-any-way-to-upload-files-via-postman-into-a-graphql-api
a

andylamax

03/25/2023, 9:57 AM
Solution was to create a different rest endpoint
View count: 4