-
Enhancement
-
Resolution: Done
-
Major
-
None
-
False
-
None
-
False
-
---
-
---
As we know there are only limited support provide option to add more details to register datatypes per need in data index.
At present the way DI works is with the following
- default schema created using scheam.graphqls file in data-index-service-common project module
- GraphQLScalarTypeProducer registers only DateTime Scalar at present
- GraphQLSchemaManager class have .scalar(qlDateTimeScalarType)
- GraphQLInputObjectTypeMapper.getInputTypeByField defines the mappings
switch (name) { case "Int": case "Long": return getInputObjectType("NumericArgument"); case "String": return getInputObjectType("StringArgument"); case "Boolean": return getInputObjectType("BooleanArgument"); case "DateTime": return getInputObjectType("DateArgument"); default: String typeName = name + ARGUMENT; GraphQLType schemaType = getExistingType(typeName); if (schemaType == null) { GraphQLObjectType domain = (GraphQLObjectType) getAdditionalTypes().get(name); if (domain == null) { return null; } GraphQLInputObjectType type = new GraphQLInputObjectTypeMapper(getSchema(), getAdditionalTypes(), false).apply(domain); getAdditionalTypes().put(typeName, type); return type; } else { return (GraphQLInputType) schemaType; } } }
- As you can see both Int and Long mapped to numericArgument which has Int details.