Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore feature on models for creating routes #32

Closed
ozziest opened this issue Jun 3, 2021 · 4 comments
Closed

Ignore feature on models for creating routes #32

ozziest opened this issue Jun 3, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ozziest
Copy link
Member

ozziest commented Jun 3, 2021

As a developer, I should be able to hide a model in auto-created routes.

import { Model } from "axe-api"

class User extends Model {
  get ignore() {
    return true
  }
}

export default User

Obviously, we can use the handlers method to manage this. But the ignore() method would be easier.

Client should be able to use those models in related queries.

@ozziest ozziest added enhancement New feature or request good first issue Good for newcomers labels Jun 3, 2021
@vaish567
Copy link
Contributor

vaish567 commented Jun 3, 2021

Howdy @ozziest If you don't mind me to step-up on this issue? If you haven't assign anyone.

@ozziest
Copy link
Member Author

ozziest commented Jun 3, 2021

Hi @vaish567, welcome to the board. 🥳 The issue is yours.

We haven't created good documentation yet but you can use dev-api repository for your development environment. Also, if you have any questions please let me know. If you can create something about it but you may not be sure, please open a Draft PR, so I can review it to help you.

Thank you very much for your help. 🥇

@vaish567
Copy link
Contributor

vaish567 commented Jun 4, 2021

Hello @ozziest Should I add this route in Model.js ? or I just have to add ignore feature ?

As a developer, I should be able to hide a model in auto-created routes.

import { Model } from "axe-api"

class User extends Model {
  get ignore() {
    return true
  }
}

@ozziest
Copy link
Member Author

ozziest commented Jun 5, 2021

Hello @vaish567, yes. But the default value should be false in Model.js. If the developer wants they can make it true n their models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants