All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.auritylab.graphql.kotlin.toolkit.spring.provided.ProvidedScalars.kt Maven / Gradle / Ivy

package com.auritylab.graphql.kotlin.toolkit.spring.provided

import graphql.schema.Coercing
import graphql.schema.GraphQLScalarType

object ProvidedScalars {
    /**
     * The "Upload" scalar with the according [Coercing] implementation. The coercing will always convert into an
     * empty string, as the uploaded file will not be transferred through the variables.
     */
    val upload = GraphQLScalarType.newScalar()
        .name("Upload")
        .coercing(object : Coercing {
            override fun parseValue(input: Any?): String = ""
            override fun parseLiteral(input: Any?): String = ""
            override fun serialize(dataFetcherResult: Any?): String = ""
        }).build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy