Volodymyr Korniienko
02/18/2022, 9:10 AMresponseBased
and operationBased
codegen. responseBased
is claimed to be more performant but generates tons of code that may affect class loading and compilation time. Therefore I’m wondering is there any performance analysis of these two methods based on response size/nested fragments count/any other metric?Tobias Berger
02/21/2022, 10:49 AMjmfayard
02/21/2022, 11:54 AM│ PASS │ FIELD_REMOVED │ type `HelloPayload`: field15 but it isn't error for it because it doesn't know which GraphQL queries and mutations my users are using because I don't use the Apollo Graphql server I don't know what to do https://www.apollographql.com/docs/studio/check-configurations/#using-apollo-studio-recommendedremoved │shinyNewQuery
Ashu Gairola
02/23/2022, 12:15 AMJustin
03/11/2022, 5:54 PMmyschema.graphql
schema file as input and output a collection of kotlin files containing kotlin data classes for that schema?
For example, this GraphQL schema:
myschema.graphql
type User {
"""
The unique identifier for the user
"""
id: String!
"""
User first and last name
"""
name: String!
"""
Gender identity of user
"""
gender: Gender
}
enum Gender {
MALE
FEMALE
OTHER
UNKNOWN
}
...would generate:
User.kt
data class User(
val id: String,
val name: String,
val gender: Gender
)
Gender.kt
enum class Gender {
MALE, FEMALE, OTHER, UNKNOWN;
}
vio
03/16/2022, 8:25 PMgraphql-kotlin-server
support scalar definitions for kotlin value classes
?tim
04/12/2022, 4:06 PMgraphqlIntrospectSchema
in the 6.0.0-alpha.0 version. I’ve started my gql server and then i’m running ./gradlew graphqlIntrospectSchema --endpoint="<http://localhost:12017/api/public/graphql>"<http://localhost:12017/api/public/graphql>
but this is failing with the following exception:
Execution failed for task ':graphqlIntrospectSchema'.
> There was a failure while executing work items
> A failure occurred while executing com.expediagroup.graphql.plugin.gradle.actions.IntrospectSchemaAction
> Unable to run introspection query against the specified endpoint=<http://localhost:12017/api/public/graphql>
No transformation found: class io.ktor.utils.io.ByteBufferChannel -> class kotlin.collections.Map
with response from <http://localhost:12017/api/public/graphql>:
status: 200 OK
response headers:
Vary: Origin
, Content-Length: 34557
, Content-Type: text/plain; charset=UTF-8
, Connection: keep-alive
Any suggestions on what I’m doing wrong?Martin Brehovsky
04/13/2022, 2:01 AMGraphQLDeprecated
annotation which would also allow defining deprecated parts of the schema? In our system we use all warnings as errors compiler setting and deprecation requires us to suppress this warning all the time (this itself is another Kotlin issue). However if we would be able to use GraphQLDepreacted
in the same way as regular Deprecated
it would allow us to separate the GraphQL schema deprecation from the actual code deprecation - they are in fact two different concerns. WDYT?Anshul Sharma
04/14/2022, 6:36 PMdirective @authz_decision on FIELD_DEFINITION
type Query {
getEmployee(id: ID): Employee
}
type Employee {
id: ID!
displayName: String! @authz_decision
age: Integer
gender: String
}
In this case - I want to write a customised directive where I will compute authorization for a field (internal authorization system) and based on the outcome, I can send back the field in the response or remove the field.
I looked at this link - https://opensource.expediagroup.com/graphql-kotlin/docs/schema-generator/customizing-schemas/directives/
And figured a way to inject directives into the configuration - but they don’t seem to be invoked at the runtime (at the query), instead, they get executed at the server startup.
Request help & advice! Thanks!rudolf.hladik
04/20/2022, 2:46 PMSaharath Kleips
04/26/2022, 8:30 PMBox
◦ id
◦ size
◦ …
◦ shape ids
• Shape
◦ id
◦ type
◦ …
Box
and Shape
are served by two independent services. Can we (or does it make sense to) have Shape
“extend” Box
to “fully resolve” shapes for a given box?Chris Black
04/28/2022, 1:22 AMgraphql-kotlin-ktor-client:6.0.0-alpha.2
. Our GraphQL client has a small footprint. I've done some quick testing and it appears to be working well. Are there any known stop-ship bugs I should be aware of? I know the alpha tag sounds pretty dangerous, is this a bad idea?Dominik Schmidt
05/10/2022, 10:53 PMpackage.testschema
as opposed to the package where the normal schema is defined package.schema
and overwrite the graphql.packages
property in the tests to look in only package.testschema
.
This however causes the following error Caused by: com.expediagroup.graphql.generator.exceptions.TypeNotSupportedException: Cannot convert package.schema.foo since it is not a valid GraphQL type or outside the supported packages "[package.testschema]"
. Any ideas what we can do about this?Robert
05/20/2022, 7:58 AMCaused by: java.lang.ClassCastException at SchemaPrinter.java:762
Martin Brehovsky
06/11/2022, 12:50 AMmodule1/src/domain1/Entity.kt:
class Entity {
fun fieldFromDomain1() = Domain1Component.fetchField()
}
module2/src/domain2/Entity.kt:
class Entity {
fun fieldFromDomain2() = Domain2Component.fetchField()
}
The result would be the following type in the schema:
type Entity {
fieldFromDomain1: String!
fieldFromDomain2: String!
}
Is something like this doable? Or is federation the only option we have?Daniel Skogquist Åborg
06/11/2022, 1:12 PMMarco Pierucci
06/18/2022, 10:22 PMjmfayard
06/20/2022, 2:20 PMschema.graphql
, I have 13 queries and 6 mutations.
graphql-kotlin takes about 3s to generate the GraphQL
object.
I don't mind on server startup, but it makes the unit tests slow.
Is there something I can do to investigate & improve performance?lionel
06/28/2022, 9:54 AMlionel
06/28/2022, 9:55 AMjmfayard
07/20/2022, 1:43 PM<script>alert('got you, LOL')</script>
Quanta
07/21/2022, 5:45 PMDariusz Kuc
07/27/2022, 9:37 PMAndrey Tabakov
07/28/2022, 3:32 PMJoe
07/28/2022, 11:12 PMKotlinDataLoaderRegistryFactory
and `GraphQLContext`:
• Our dataloaders sometimes need access to things in the GraphQLContext
, which we've dealt with by setting the GraphQLContext
as the BatchLoaderContextProvider
, and then accessing within a dataloader by doing environment.getContext<GraphQLContext>()
• It seems like in order to do the same thing, we'd need to make the GraphQLContext
accessible to each KotlinDataLoader
that we construct and create the BatchLoaderContextProvider
option when using DataLoaderFactory.newDataLoader()
• That's all doable, but seems a little awkward (leads us down a FactoryFactory / FactoryProvider type route which always seems a little too JEE-ish) -- would it make sense to have a way for the RegistryFactory to handle DataloaderOptions directly instead ? or is there another way to expose the GraphQLContext
to the `KotlinDataLoader`s that I'm missing?jmfayard
07/28/2022, 3:27 PMJoe
08/04/2022, 3:49 PMGraphQLContext
. We currently allow a resolver to set a cookie on the context which we communicate back to the client. Because of the way graphql-java's `ExecutionInput` works though, the cookie gets set on input.graphQLContext
, but not on the graphQLContextMap
that we set on the created ExecutionInput
. In trying to move to using GraphQLRequestHandler
we're missing the ability to access the context after executing the request (or batch request). Some options I can think of:
• add a public method to GraphQLRequestHandler
that takes an ExecutionInput
instead of a GraphQLServerRequest
and context
• add a getter for the context to `GraphQLServerResponse`/`GraphQLRepsonse` (but @JsonIgnore
it to hide it from the serialized json)
• do some stuff in an Instrumentation
to move the cookie from context into extensions
but then do some kind of post processing to remove the cookie extension from the response before serializing it to the client (don't love this one)
• don't leverage GraphQLRequestHandler
and continue to execute queries via a GraphQL
object ourselves (would prefer to be able to leverage eg. the batch functionality without reimplementing ourselves)
Thoughts on these options? Other ways you can think of to enable this sort of functionality? I'm happy to put together another PR once we agree on direction.Filip Lastic
08/10/2022, 4:07 PMDefined(true)
optional input. This value is skipped in serialization and generated json does not contain my boolean value.
I created a draft branch there: https://github.com/ExpediaGroup/graphql-kotlin/pull/1513/filesSlackbot
08/10/2022, 4:54 PMrocketraman
08/14/2022, 4:11 PMIOException: Broken pipe
) from my db driver. While I continue to investigate the root cause of this, I'd like to add a workaround with some retry logic. Since the underlying exception could occur pretty much anywhere, I'm thinking having the logic at the graphql-kotlin layer makes sense, if it is possible. What would the right way to do this? Would an interceptor work for this case?rocketraman
08/14/2022, 4:11 PMIOException: Broken pipe
) from my db driver. While I continue to investigate the root cause of this, I'd like to add a workaround with some retry logic. Since the underlying exception could occur pretty much anywhere, I'm thinking having the logic at the graphql-kotlin layer makes sense, if it is possible. What would the right way to do this? Would an interceptor work for this case?defaultDataFetcherExceptionHandler
is invoked for the entire message. Would be nice to be able to retry the fetch for just the field that failed, but I'd settle for retrying the entire thing.Dariusz Kuc
08/14/2022, 11:01 PMrocketraman
08/15/2022, 12:42 AMArnab
08/16/2022, 11:01 AM