Closed rachaelmcq closed 3 years ago
Seems like the workaround here might be to define every resource in its own file.
Hey @rachaelmcq, it's not really a workaround, it's intended to work like that. It expects that only one resource is defined in each file. Since you bumped into this ideally it should warn about this when there are multiple resources defined, or it should be allowed to define multiple resources in a file.
Ah, I missed that. Yeah, a warning about multiple resources in one file would help.
When I try to generate migrations, I get errors claiming the resources "[aren't] defined anywhere in the resource folders". For the following
fauna/resources/functions.fql
:I get the error:
However, if I swap the order I declare these functions in:
I have no problems. This is true of every resource I'm creating that references another resource, and across files as well. Depending on defining them in reverse order and then having the error say depended-on resources aren't "anywhere in the resource folders" is pretty confusing.