-1

How can I add JSON type to lighthouse?

I've seen this package but I don't know how to use it and there's not any documentations available for it: https://github.com/mll-lab/graphql-php-scalars

Alireza A2F
  • 519
  • 4
  • 26

1 Answers1

2

Once you installed it, in your schema.graphql define every Scalar you want to use, like:

scalar JSON @scalar(class: "MLL\\GraphQLScalars\\JSON")

# Then just use it, like:
type User {
  id: ID!
  meta: JSON!
}
Enzo Notario
  • 639
  • 4
  • 9