You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi guys! Is there some reason on removing initialization customScalars configured at generatePojoConf on 2.x version?
1.18.6 Version
com.graphql_java_generator.plugin.generate_code
GenerateCodeDocumentParser 171 line
logger.debug("Storing custom scalar's implementations [START]");
if (configuration.getCustomScalars() != null) {
for (CustomScalarDefinition customScalarDef : configuration.getCustomScalars()) {
CustomScalarType type = new CustomScalarType(customScalarDef, configuration, this);
getCustomScalars().add(type);
getTypes().put(type.getName(), type);
}
}
logger.debug("Storing custom scalar's implementations [END]");
On my project scalars are declared by external libraries which i made(common interface),
so before 2.x version, there are no problems,
but after 2.x version when i generatePojo , throw error "the type named 'Long' could not be found"
i hope to be change like this
@Override
protected void initScalarTypes(Class<?> notUsed) {
// Let's load the standard Scalar types
GenerateCodeCommonConfiguration generateConfiguration = getConfiguration();
if (generateConfiguration.getMode().equals(PluginMode.server)) {
try {
super.initScalarTypes(
Class.forName(((GenerateServerCodeConfiguration) this.configuration).getJavaTypeForIDType()));
} catch (ClassNotFoundException e) {
throw new RuntimeException(e.getMessage(), e);
}
} else {
// In client mode, ID type is managed as a String
super.initScalarTypes(String.class);
}
logger.debug("Storing custom scalar's implementations [START]");
if (generateConfiguration.getCustomScalars() != null) {
for (CustomScalarDefinition customScalarDef : generateConfiguration.getCustomScalars()) {
CustomScalarType type = new CustomScalarType(customScalarDef.getGraphQLTypeName(), customScalarDef, generateConfiguration, this);
getCustomScalars().add(type);
getTypes().put(type.getName(), type);
}
}
logger.debug("Storing custom scalar's implementations [END]");
}
if is not possible
is there some way to add customscalars which are configured on pojoGenerateConf?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hi guys!
Is there some reason on removing initialization customScalars configured at generatePojoConf on 2.x version?
1.18.6 Version
com.graphql_java_generator.plugin.generate_code
GenerateCodeDocumentParser 171 line
On my project scalars are declared by external libraries which i made(common interface),
so before 2.x version, there are no problems,
but after 2.x version when i generatePojo , throw error "the type named 'Long' could not be found"
i hope to be change like this
if is not possible
is there some way to add customscalars which are configured on pojoGenerateConf?
Beta Was this translation helpful? Give feedback.
All reactions