Vulcan icon indicating copy to clipboard operation
Vulcan copied to clipboard

Schema files allow for numbers as keys.

Open Salamit opened this issue 5 years ago • 4 comments

In response to @eric-burel asking me to open an issue, schema files allow for numbers as keys but numbers as keys aren't allowed in GraphQL fragments. See the below example.

"2019" : {
      type: String,
      //more
}

Salamit avatar Nov 09 '19 14:11 Salamit

Solution would be to throw an error with an explicit schema when creating the graphql schema.

Schema keys must respect the Graphql "Name" pattern defined in the standard https://graphql.github.io/graphql-spec/June2018/#sec-Names

eric-burel avatar Dec 09 '19 15:12 eric-burel

@eric-burel

Hi Eric, I am new to VulcanJS, but I want to join in the development.

For this issue, as I understand, the fix is to

  1. check schema keys against the Graphql name pattern
  2. when the check fails, throw an error with schema containing the illegal keys.

Would you help to verify the above rephrasing? That will help to build some confidence for me to go further with the implementation.

time4Wiley avatar Feb 17 '20 18:02 time4Wiley

Hey @eric-burel can I work on this issue?

GAURAV1-ui avatar Jul 21 '22 00:07 GAURAV1-ui

Hi, the Meteor version is deprecated so it's ok to contribute but it's better to work on Vulcan Next/ Vulcan NPM: https://vulcan-docs.vercel.app/

eric-burel avatar Jul 21 '22 09:07 eric-burel