Skip to content

How to use extended scalars with dgs? #247

Discussion options

You must be logged in to vote

You can add it a dependency and register the scalar manually as described here:
https://netflix.github.io/dgs/scalars/

In your schema file:

scalar Long

For registering:

@DgsComponent
public class LongScalarRegistration {
    @DgsRuntimeWiring
    public RuntimeWiring.Builder addScalar(RuntimeWiring.Builder builder) {
        return builder.scalar(Scalars.GraphQLLong);
    }
}

That said, in the next release, you shouldn't need to manually register it. For now, you can use the above mechanism.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jessepinkman9900
Comment options

@timpamungkas
Comment options

Answer selected by jessepinkman9900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants