Skip to content

defineResource({ name: 'user', meta: { whatever: 'I want' } }); #57

Closed
@kentcdodds

Description

@kentcdodds

I can do this currently, I just wanted to bring this to your attention so people don't start passing options to defineResource and screw themselves up when you want to add features... For example...
I'm using angular-data today and do this:

DS.defineResource({
  name: 'user',
  foo: 'bar'
});

Then tomorrow, you decide that we really need to add another option to defineResource and we want to call it foo.

I upgrade.

The internet breaks... Or something...

Here's my proposed solution: Give us a field for stuff like this called meta and then explicitly create the definition, don't just make the object we pass you as the definition. We will hate ourselves later I'm sure...

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions