dotansimha / dotansimha/graphql-code-generator-community

java-apollo-android fails due to forced enum CustomType

Open
#108 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

**Describe the bug**
1.
CustomType is always generated even if no scalar is in schema. The enum definition fails because it implements com.apollographql.apollo.api.ScalarType . Which is not fullfilled.

2.
Defining a scalar results in another error because javaType returns: any.class which does not exist in java and is typescript specific

**To Reproduce**
Just a simple schema definition with and without scalar definition

**Additional context**
I could not find a way to disable CustomTypeVisitor yet and also I do not know how to define the java types in configuration for a scalar definition

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the minimal schemas described, then trace CustomTypeVisitor and the javaType configuration path. Done means schemas without scalars no longer generate an invalid CustomType enum, and declared scalars produce valid Java types instead of any.class.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, java, typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.