How to use graphql-type-json package with GraphQl

前端 未结 2 928
长情又很酷
长情又很酷 2021-01-18 12:39

I can\'t get GraphQL to recognize the JSON scalar type.

I followed the [apollo docs] (http://dev.apollodata.com/tools/graphql-tools/scalars.html#Using-a-package) to

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-18 13:10

    I couldn't get a custom scalar working with a text-based schema (using buildSchema('...') from the core "graphql" library), but it worked when I built the schema programmatically from scratch (using new GraphQLSchema(...)).

提交回复
热议问题