janvladimirmostert
12/05/2019, 4:06 PMJesper Hasselström
12/07/2019, 11:47 AMids:List<String>?
as an argument. When creating our schema we get an error:
Exception in thread "main" com.expediagroup.graphql.exceptions.InvalidInputFieldTypeException: Argument cannot be an interface or a union, parameter #1 ids of fun <X>.query(kotlin.collections.List<kotlin.String>?, kotlin.String?, kotlin.collections.List<kotlin.String>?): kotlin.collections.List<X>
How can this be solved?Goregius
12/28/2019, 6:21 PMGoregius
01/03/2020, 2:44 AMDariusz Kuc
01/09/2020, 1:30 PMgraphql-java
world there is really no need for the data loader, e.g.
class Employee(val name: String, private val companyId: Int) {
suspend fun company() = myCompanyService.load(companyId)
}
there are number of ways of how to expose the myCompanyService
in the abovebjartek
01/09/2020, 6:05 PMGoregius
01/15/2020, 9:43 PMGoregius
01/17/2020, 8:37 AMGoregius
01/19/2020, 11:54 PMRobert
02/05/2020, 7:52 PMGoregius
02/10/2020, 11:40 PMsevil
02/28/2020, 10:50 AMRobert
04/21/2020, 1:26 PMRobert
04/29/2020, 7:17 AMilaborie
04/29/2020, 7:41 AMDarren
04/30/2020, 11:00 PMLenny
05/08/2020, 7:01 PM@GraphQLID
to create an argument for a list of ids, like foo(ids: [ID!]!)
?tim
05/13/2020, 11:06 AMtype Query {
hello: String
}
command:
gradle graphqlGenerateClient --schemaFileName="src/main/resources/schema.graphq" --packageName="com.example.graphql.generated"
Oh and im running 3.0.0-RC2Lenny
05/13/2020, 10:24 PMoverride fun willGenerateGraphQLType(type: KType): GraphQLType? {
return when (type.classifier as? KClass<*>) {
// note the ::class.java
CurrencyCodeProtos.CurrencyCode::class.java -> currencyCodeEnum
else -> super.willGenerateGraphQLType(type)
}
}
Lenny
05/14/2020, 5:42 PMLenny
05/21/2020, 9:28 PMAaron
05/30/2020, 8:13 AMspring-devtool
and graphql-kotlin-spring-server
when hot-swapping code? The full detail is here https://github.com/ExpediaGroup/graphql-kotlin/issues/730. Essentially it would work fine the first time around, but after you make some changes or just add a simple println
I get this error DataFetchingException: Object is not an instance of declaring class
. Would love to know if anyone encounter this and know how to fix this 🙂Lenny
06/04/2020, 4:18 PMtypealias ID = String
so i’m getting error: redeclaration: ID
… any ideas?vio
06/05/2020, 11:39 AMRoy Åne Sylthe
06/09/2020, 9:30 AMjava.time.LocalDate
(no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)`
object DateCoercing : Coercing<Date, String> {
override fun parseValue(input: Any?): Date = try {
LocalDate.parse(serialize(input))
} catch (e: DateTimeParseException) {
throw CoercingParseValueException("...", e)
}
override fun parseLiteral(input: Any?): Date? = try {
(input as? StringValue)?.value?.let { LocalDate.parse(it) }
} catch (e: DateTimeParseException) {
throw CoercingParseLiteralException("...", e)
}
override fun serialize(dataFetcherResult: Any?): String = dataFetcherResult.toString()
}
I've tried most of the common solutions found by Googling to no avail...neetkee
06/25/2020, 4:01 PMRobert
07/10/2020, 7:53 AMval reactorContext =
coroutineContext[ReactorContext]?.context
in a resolver function won't return the contextFilip Lastic
07/17/2020, 9:40 AMname
(lowercase). Kotlin does not support this naming, because Conflicting declarations: enum entry name, public final val name: String
. So, I want to name it with UPPERCASE and then generate enum names to GraphQL schema as lowercase (example below). I tried to use @GraphQLName
, but it doesn't work with ENUM classes 😞
enum class ApplicantsUpdateColumn {
@GraphQLName("id")
ID,
@GraphQLName("data")
DATA,
@GraphQLName("name")
NAME //I want to have this as lowercase "name"
}
Robert
07/17/2020, 9:46 AMjavax.validation.constraints.Positive
on a resolver argument?
It currently crashes
@Validated
class QueryImpl:Query{
override suspend fun query(id: String, @Positive amount: BigDecimal)
}
java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
at java.base/java.util.Arrays$ArrayList.get(Arrays.java:4351)
at org.hibernate.validator.internal.metadata.aggregated.ParameterMetaData$Builder.build(ParameterMetaData.java:169)
at org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData$Builder.findParameterMetaData(ExecutableMetaData.java:435)
at org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData$Builder.build(ExecutableMetaData.java:388)
at org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl$BuilderDelegate.build(BeanMetaDataImpl.java:788)
at org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl$BeanMetaDataBuilder.build(BeanMetaDataImpl.java:648)
at org.hibernate.validator.internal.metadata.BeanMetaDataManager.createBeanMetaData(BeanMetaDataManager.java:204)
at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getBeanMetaData(BeanMetaDataManager.java:166)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateParameters(ValidatorImpl.java:265)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateParameters(ValidatorImpl.java:233)
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:105)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
at capital.scalable.agenttoolapi.routes.graphql.schema.payments.mutation.resolver.WealthPaymentCreationMutationResolver$$EnhancerBySpringCGLIB$$fa066940.deposit(<generated>)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:106)
at kotlin.reflect.full.KCallables.callSuspend(KCallables.kt:55)
at com.expediagroup.graphql.execution.FunctionDataFetcher$runSuspendingFunction$1.invokeSuspend(FunctionDataFetcher.kt:128)
Das135
07/20/2020, 9:05 AM.wrapRow
etc..
object TableObject : IdTable<Int>("tableName") {
val property1 = long("column1")
val property2 = long("column2")
}
class MappedEntity(id: EntityID<Int>): Entity<Int>(id){
companion object : EntityClass<Int, MappedEntity>(TableObject)
var entityProperty1 by TableObject.property1
var entityProperty2 by TableObject.property2
}
I want to return MappedEntity
in GraphQL schema, but there is problem with com.expediagroup.graphql.exceptions.TypeNotSupportedException: Cannot convert org.jetbrains.exposed.sql.ResultRow? since it is not a valid GraphQL type or outside the supported packages
.
Do I need to map this entity to another class, or is there way to use MappedEntity class in GraphQL schema?Das135
07/20/2020, 9:05 AM.wrapRow
etc..
object TableObject : IdTable<Int>("tableName") {
val property1 = long("column1")
val property2 = long("column2")
}
class MappedEntity(id: EntityID<Int>): Entity<Int>(id){
companion object : EntityClass<Int, MappedEntity>(TableObject)
var entityProperty1 by TableObject.property1
var entityProperty2 by TableObject.property2
}
I want to return MappedEntity
in GraphQL schema, but there is problem with com.expediagroup.graphql.exceptions.TypeNotSupportedException: Cannot convert org.jetbrains.exposed.sql.ResultRow? since it is not a valid GraphQL type or outside the supported packages
.
Do I need to map this entity to another class, or is there way to use MappedEntity class in GraphQL schema?Dariusz Kuc
07/20/2020, 1:24 PM@GraphQLIgnore
but that implies they have to be part of your code baseRobert
07/24/2020, 12:20 PM