File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
starters/express-apollo-prisma Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -15,5 +15,5 @@ indent_size = 2
1515max_line_length = off
1616trim_trailing_whitespace = false
1717
18- [{package.json. eslintrc.json} ]
18+ [{package.json, eslintrc.json} ]
1919indent_style = space
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ type TechnologyEntityId = TechnologyEntity['id'];
55
66export type TechnologyEntityCollectionPage = {
77 totalCount : number ;
8- items : TechnologyEntity [ ] ;
8+ edges : TechnologyEntity [ ] ;
99} ;
1010
1111export class TechnologyDataSource {
@@ -31,7 +31,7 @@ export class TechnologyDataSource {
3131 }
3232
3333 async getTechnologies ( limit : number , offset : number ) : Promise < TechnologyEntityCollectionPage > {
34- const [ totalCount , items ] = await this . prismaClient . $transaction ( [
34+ const [ totalCount , edges ] = await this . prismaClient . $transaction ( [
3535 this . prismaClient . technologyEntity . count ( ) ,
3636 this . prismaClient . technologyEntity . findMany ( {
3737 take : limit ,
@@ -40,7 +40,7 @@ export class TechnologyDataSource {
4040 ] ) ;
4141 return {
4242 totalCount,
43- items ,
43+ edges ,
4444 } ;
4545 }
4646
Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ export const technologyTypeDefs = gql`
1818 """
1919 A page of technology items
2020 """
21- type Collection {
21+ type TechnologyCollection {
2222 "Identifies the total count of technology records in data source"
2323 totalCount: Int!
2424 "A list of records of the requested page"
25- items : [Technology]!
25+ edges : [Technology]!
2626 }
2727
2828 """
@@ -32,7 +32,7 @@ export const technologyTypeDefs = gql`
3232 "Returns a single Technology by ID"
3333 technology(id: ID!): Technology
3434 "Returns a list of Technologies"
35- technologies(limit: Int = 5, offset: Int = 0): Collection !
35+ technologies(limit: Int = 5, offset: Int = 0): TechnologyCollection !
3636 }
3737
3838 input CreateTechnology {
You can’t perform that action at this time.
0 commit comments