directus / gatsby-source-directus

Source plugin for pulling data into Gatsby from a Directus API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing onError handler for invocation 'building-schema', error was 'Syntax Error: Invalid number, expected digit but got: "A".

that1matt opened this issue · comments

Gatsby v5
Directus 10.7.2

When grabbing JSON files from Directus into Gatsby, we are given this error message.

When we change the filename (Download) from name.json to name.svg we can bypass this error for now.

Error:


GraphQL request:1:3
1 | 72A0Ac7F369Cb2618D58E1849Da49629Json
  |   ^'. Stacktrace was 'GraphQLError: Syntax Error: Invalid number, expected digit but got: "A".
    at syntaxError
(/path/node_modules/graphql/error/syntaxError.js:15:10)
    at readNumber
(/path/node_modules/graphql/language/lexer.js:550:40)
    at readNextToken
(/path/node_modules/graphql/language/lexer.js:413:14)
    at Lexer.lookahead
(/path/node_modules/graphql/language/lexer.js:84:29)
    at Lexer.advance
(/path/node_modules/graphql/language/lexer.js:67:38)
    at Parser.advanceLexer
(/path/node_modules/graphql/language/parser.js:1536:31)
    at Parser.expectToken
(/path/node_modules/graphql/language/parser.js:1393:12)
    at Parser.many
(/path/node_modules/graphql/language/parser.js:1507:10)
    at Parser.parseDocument
(/path/node_modules/graphql/language/parser.js:122:25)
    at parse (/path/node_modules/graphql/language/parser.js:32:17)
    at TypeMapper.convertSDLTypeDefinition
(/path/node_modules/graphql-compose/src/TypeMapper.ts:249:44)
    at Function.createTemp (/path/node_modules/graphql-compose/src/
ObjectTypeComposer.ts:301:28)
    at Function.create (/path/node_modules/graphql-compose/src/Obje
ctTypeComposer.ts:271:21)
    at forEach
(/path/node_modules/gatsby/src/schema/infer/index.js:41:41)
    at Array.forEach (<anonymous>)
    at addInferredTypes
(/path/node_modules/gatsby/src/schema/infer/index.js:27:13)'```