feat: Implement getAll and getAllByName graphQL queries
This commit is contained in:
11
packages/backend/src/graphql/queries/get-apps-by-name.ts
Normal file
11
packages/backend/src/graphql/queries/get-apps-by-name.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import App from '../../models/app';
|
||||
|
||||
type Params = {
|
||||
name: string
|
||||
}
|
||||
|
||||
const getAppsByName = (params: Params) => {
|
||||
return App.findAllByName(params.name)
|
||||
}
|
||||
|
||||
export default getAppsByName;
|
7
packages/backend/src/graphql/queries/get-apps.ts
Normal file
7
packages/backend/src/graphql/queries/get-apps.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import App from '../../models/app';
|
||||
|
||||
const getApps = () => {
|
||||
return App.findAll()
|
||||
}
|
||||
|
||||
export default getApps;
|
Reference in New Issue
Block a user