GraphQLError: Names must only contain [_a-zA-Z0-9] but "application/pdf" does not
See original GitHub issueHey 😊 I encountered this error:
GraphQLError: Names must only contain [_a-zA-Z0-9] but "application/pdf" does not.
at assertName (/platformatic/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/type/assertName.js:31:13)
at assertEnumValueName (/platformatic/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/type/assertName.js:58:10)
at /platformatic/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/type/definition.js:1223:49
at Array.map (<anonymous>)
at defineEnumValues (/platformatic/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/type/definition.js:1213:35)
at new GraphQLEnumType (/platformatic/node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/type/definition.js:1080:20)
at constructGraph (/platformatic/packages/sql-graphql/lib/entity-to-type.js:58:21)
at mapperToGraphql (/platformatic/packages/sql-graphql/index.js:43:20)
at Plugin.exec (/platformatic/node_modules/.pnpm/avvio@8.2.0/node_modules/avvio/plugin.js:130:19)
at Boot.loadPlugin (/platformatic/node_modules/.pnpm/avvio@8.2.0/node_modules/avvio/plugin.js:272:10) {
path: undefined,
locations: undefined,
extensions: [Object: null prototype] {}
To add a little more context, the table where it failed contained a column defined like that:
`document` enum('application/pdf','image/jpeg','image/png') DEFAULT NULL,
Can we support this column type?
In the meanwhile, I’ll add a PR to enhance the logging info on platformatic
side when we encounter this.
Issue Analytics
- State:
- Created 9 months ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "" does not.
After upgrading from 3.0.0-beta.14 to 3.1.4 i'm getting this error. Missing onError handler for invocation 'extracting-queries', error was 'Error: Names ...
Read more >GraphQL is returning "Names must match" error when the Key ...
GraphQL only allows keys starting with ASCII character or an underscore. You can use resolve functions to map old names to new.
Read more >Error handling - Apollo GraphQL Docs
A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ. OPERATION_RESOLUTION_FAILURE. The...
Read more >GraphQL specification
If a Document contains only one operation, that operation may be unnamed or represented in the shorthand form, which omits both the query...
Read more >GraphQL error handling to the max with Typescript, codegen ...
In the codegen configuration, we have defined mappers between the GraphQL schema types and the Typescript types. But this is not used at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this might be the same of https://github.com/platformatic/platformatic/pull/403.
Would you like to send a PR to fix this?