does anyone know how to reset your generated prism...
# orm-help
m
does anyone know how to reset your generated prisma files?
n
remove the file, run
prisma deploy
. Does that not regenerate the file?
👍 1
m
thank you.
n
Let me know if it doesn't work - see https://github.com/graphcool/prisma/issues/2228
m
it worked 🙂 still have my error tho
👍 2
👎 2
n
Ok, so looks like you are facing some problem with
graphql-import
If you can't reproduce it and the manual import is a working workaround for you, I think that's ok 🙂 Otherwise let's try to reproduce it
m
when I use
# import CustomDataFieldDefinition from "./schema/customDataFieldDefinition.graphql"
I get this error:
Error: ENOENT: no such file or directory, open '/Users/Max/graphql-server/src/schema/schema/customDataFieldDefinition.graphql'
With
# import CustomDataFieldDefinition from "./customDataFieldDefinition.graphql"
I get
Error: ENOENT: no such file or directory, open '/Users/Max/graphql-server/src/customDataFieldDefinition.graphql'
there's a double schema/schema when I point to ./schema
n
hm I haven't encountered this before
m
the last error was my fault 😞 I was importing the def inside a .graphql file that was being imported inside schema.graphql
ðŸ’Ą 1
I think I found a different fix. I was using a different definition for
CustomDataFieldDefinition
on external API because I had removed a field for security reasons (i.e. so people can't go down a tree to get information they shouldn't have access to). Before
Copy code
type CustomDataFieldDefinition {
  id: ID!
  dataFields: [CustomDataField!]!
  dataType: CustomDataFieldType!
  description: String!
}
After
Copy code
type CustomDataFieldDefinition {
  id: ID!
  dataFields(orderBy: CustomDataFieldOrderByInput): [CustomDataField!]!
  dataType: CustomDataFieldType!
  description: String!
}
I needed to insert
orderBy: CustomDataFieldOrderByInput
on CustomDataFieldDefinition
I had just upgraded
graphql
and co. npm modules. so i don't know if this is expected behavior
n
what was the error you received?
m
Error: Type "CustomDataFieldOrderByInput" not found in document.
n
that was when you did
dataFields(orderBy: ...)
in a query, right?
m
full error:
Copy code
Error: Type "CustomDataFieldOrderByInput" not found in document.
    at ASTDefinitionBuilder._resolveType (/Users/Max/graphql-server/node_modules/graphql/utilities/buildASTSchema.js:134:11)
    at ASTDefinitionBuilder.buildType (/Users/Max/graphql-server/node_modules/graphql/utilities/buildASTSchema.js:218:79)
    at ASTDefinitionBuilder._buildWrappedType (/Users/Max/graphql-server/node_modules/graphql/utilities/buildASTSchema.js:227:24)
    at /Users/Max/graphql-server/node_modules/graphql/utilities/buildASTSchema.js:314:25
    at /Users/Max/graphql-server/node_modules/graphql/jsutils/keyValMap.js:28:31
    at Array.reduce (<anonymous>)
    at keyValMap (/Users/Max/graphql-server/node_modules/graphql/jsutils/keyValMap.js:27:15)
    at ASTDefinitionBuilder._makeInputValues (/Users/Max/graphql-server/node_modules/graphql/utilities/buildASTSchema.js:309:36)
    at ASTDefinitionBuilder.buildField (/Users/Max/graphql-server/node_modules/graphql/utilities/buildASTSchema.js:250:37)
    at /Users/Max/graphql-server/node_modules/graphql/utilities/buildASTSchema.js:302:21
I was starting the server when I received the error
I haven't yet defined or used any queries on that type
n
hm I don't see how this would be expected behaviour, but I don't fully understand the situation either
m
I couldn't re-create it which is odd. I don't know whether it's linked to the size of my project. The
prisma.graphql
file is 13,279 lines long ðŸĪŠ
n
I don't think so