Closed DellanX closed 1 year ago
Hi DellanX, your configuration is correct. The error states that is cannot find config but you declared one as I see. As you are working in a static type manager context - you can try to extract metadata from your type directly and see if it in general present. Maybe there are some incorrect exports somewhere. You can check it by calling:
const typeMetadata = TypeManager.extractTypeMetadata(Documentb);
This will return you the whole type information declared for your class. Then check if your properties are registered and JsonApiResource metadata is present in customContext
property. If it is not present then it is lost somehow or code organization might create a duplicate of your model.
Ahh, I figure it is an issue with exports, but will take time to dive into that.
I was able to run that command successfully but struggle to navigate the object. It seems like it populated a type map successfully; however, maybe the 'findAll' command refers to an instance of the type on a different Chunk.
You should to check customOptions
of TypeMetadata
. Not TypeManager
. TypeManager
contains custom options for all types but resource metadata defined per type.
JsonApiAdapter
simply tries to extract this config from a type. If it is not found - then error is thrown.
Okay, got it root caused!
As I was Migrating over, I had duplicated all of my types in my 'v1' directory into a 'v2' directory. Since my prototype was in V1, it was creating conflicting type definitions.
Removing the declarations from the v1 directory resolved the issue.
Being able to probe around and see that the TypeManager didn't match the modified TypeMetadata (I was deleting members), made it much easier to debug.
I doubt many will run into this issue, as it's unlikely they'll migrate in the same manner I am. Maybe some debug tools would be nice, but I think the main thing was the process of calling the following, and remembering that TypeManager is static:
const typeMetadata = TypeManager.extractTypeMetadata(Documentb);
This issue can probably be closed out now
Is your feature request related to a problem? Please describe.
I am implementing this library for my application; however, am running into an error. Which I am struggling to debug, and am hoping for either some troubleshooting tips or improved debugging tools. Oddly enough, I was able to prototype with the codebase fine, but now that I am migrating over, I run into the following error:
Describe the solution you'd like
I don't expect this issue to be debugged here. (Though I am happy to post the root cause when I get it figured out). It looks like this is probably caused by some configuration on my end, if I knew what was misconfigured, I could probably use the existing documentation to get it configured properly.
Describe alternatives you've considered
I've poked around, and completely rewritten my model code, and am at a complete loss. I figure there is some kind of definition conflict somewhere.
Additional context Here is my model definition My Prototype model
documentb.ts
My EntityStore definition file
entity-store.ts
My local method for grabbing data
fetch-many.ts
Finally, my Vue Script below should execute the query
I've tried many things, even copying over the example model from the README.md. My Prototype no longer works either, so I figure I misconfigured something disasterously wrong.