Open Proglab opened 4 years ago
This seems to occur when you use camelCase for any of your content type's API identifier / content type id. It started to work when I switched to snake_case.
Just ran into the same issue here, it looks like using non-letter characters as your content type name will make this happen. For example "Blog Post" works but "Blog: Post" breaks.
Gridsome/contentful source should sanitize the data here somewhere
Description
When I do a relation between 2 entity in contentful, it make an error
Steps to reproduce
I use @gridsome/source-contentful and when i make a relation between 2 contents models, this error appear when I run "yarn run develop"
Expected result
Compiled successfully
Actual result
Gridsome v0.7.11
Initializing plugins... Load sources - 0.71s GraphQLError: Syntax Error: Unexpected Name "ContentfulExp" at syntaxError (E:\wamp64\www\proglabwebsite\node_modules\graphql\error\syntaxError.js:15:10) at Parser.unexpected (E:\wamp64\www\proglabwebsite\node_modules\graphql\language\parser.js:1463:41) at Parser.parseDefinition (E:\wamp64\www\proglabwebsite\node_modules\graphql\language\parser.js:157:16) at Parser.many (E:\wamp64\www\proglabwebsite\node_modules\graphql\language\parser.js:1518:26) at Parser.parseDocument (E:\wamp64\www\proglabwebsite\node_modules\graphql\language\parser.js:111:25) at parse (E:\wamp64\www\proglabwebsite\node_modules\graphql\language\parser.js:36:17) at TypeMapper.convertSDLTypeDefinition (E:\wamp64\www\proglabwebsite\node_modules\graphql-compose\lib\TypeMapper.js:185:43) at Function.createTemp (E:\wamp64\www\proglabwebsite\node_modules\graphql-compose\lib\ObjectTypeComposer.js:87:28) at Function.create (E:\wamp64\www\proglabwebsite\node_modules\graphql-compose\lib\ObjectTypeComposer.js:64:21) at SchemaComposer.getOrCreateOTC (E:\wamp64\www\proglabwebsite\node_modules\graphql-compose\lib\SchemaComposer.js:388:57) at createTypeComposers (E:\wamp64\www\proglabwebsite\node_modules\gridsome\lib\graphql\nodes\index.js:82:41) at createNodesSchema (E:\wamp64\www\proglabwebsite\node_modules\gridsome\lib\graphql\nodes\index.js:30:3) at createSchema (E:\wamp64\www\proglabwebsite\node_modules\gridsome\lib\graphql\createSchema.js:59:3) at Schema.buildSchema (E:\wamp64\www\proglabwebsite\node_modules\gridsome\lib\app\Schema.js:28:28) at Plugins.createSchema (E:\wamp64\www\proglabwebsite\node_modules\gridsome\lib\app\Plugins.js:94:22) at process._tickCallback (internal/process/next_tick.js:68:7) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Environment
System: OS: Windows 10 10.0.18362 CPU: (12) x64 Intel(R) Core(TM) i7-4960X CPU @ 3.60GHz Binaries: Node: 10.16.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.13.2 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: 44.18362.449.0 npmPackages: gridsome: ^0.7.0 => 0.7.11