apollographql / apollo-kotlin-java-support

Java support for Apollo Kotlin
https://apollographql.github.io/apollo-kotlin-java-support/
MIT License
1 stars 0 forks source link

Compilation issues with the scalar type #14

Open ummen-sherry opened 2 weeks ago

ummen-sherry commented 2 weeks ago

Hi,

My gradle setup is such id "com.apollographql.apollo3" version "3.8.5" implementation "com.apollographql.java:client:0.0.2" apollo { service("backoffice-workflows") { generateKotlinModels.set(false) packageName.set("com.apollojavaclient.types.backoffice.workflows") mapScalarToJavaString("String") } }

and I get the error: /workflows/type/GraphQLString.java:8: error: package com.apollographql.apollo3.api does not exist import com.apollographql.apollo3.api.CustomScalarType;

Could you please help, how to fix this?

I have the schema at this location src/main/graphql/backoffice/backoffice-workflow-schema.graphqls and it has scalar String scalar Int

etc This schema is external to the system, so no control on that.

martinbonnin commented 2 weeks ago

Hi 👋

You'll need to use version 4.0.0 or greater of plugin com.apollographql.apollo:

plugins {
 id "com.apollographql.apollo" version "4.0.0"
}

(edited: forgot to remove a 3 up there)

ummen-sherry commented 2 weeks ago

Hey @martinbonnin 👋

Thank you.

it seems I would have to update gradle to 8, thats a lot of work for our codebase. Is there a workaround ?

martinbonnin commented 2 weeks ago

Hi @ummen-sherry, not at the moment. You can keep using older Apollo versions (2.x) as a workaround but you won't benefit from a lot of the latestst work