Skip to content

Commit

Permalink
refactor: graphql id type
Browse files Browse the repository at this point in the history
  • Loading branch information
coratgerl committed Aug 21, 2024
1 parent 7e8a862 commit 3f3c547
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
42 changes: 21 additions & 21 deletions packages/wibe-server/generated/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,13 @@ type Query {
user(id: ID): User

"""User class"""
users(where: UserWhereInput, offset: Int, first: Int, searchTerm: String): UserConnection!
users(where: UserWhereInput, offset: Int, first: Int): UserConnection!
post(id: ID): Post
posts(where: PostWhereInput, offset: Int, first: Int, searchTerm: String): PostConnection!
posts(where: PostWhereInput, offset: Int, first: Int): PostConnection!
_session(id: ID): _Session
_sessions(where: _SessionWhereInput, offset: Int, first: Int, searchTerm: String): _SessionConnection!
_sessions(where: _SessionWhereInput, offset: Int, first: Int): _SessionConnection!
role(id: ID): Role
roles(where: RoleWhereInput, offset: Int, first: Int, searchTerm: String): RoleConnection!
roles(where: RoleWhereInput, offset: Int, first: Int): RoleConnection!

"""Hello world description"""
helloWorld(name: String!): String
Expand All @@ -511,7 +511,7 @@ input UserWhereInput {
acl: UserACLObjectWhereInput
createdAt: DateWhereInput
updatedAt: DateWhereInput
search: ArrayWhereInput
search: SearchWhereInput
authentication: UserAuthenticationWhereInput
provider: AnyWhereInput
isOauth: BooleanWhereInput
Expand All @@ -524,10 +524,10 @@ input UserWhereInput {
}

input IdWhereInput {
equalTo: String
notEqualTo: String
in: [String]
notIn: [String]
equalTo: ID
notEqualTo: ID
in: [ID]
notIn: [ID]
}

input StringWhereInput {
Expand Down Expand Up @@ -589,17 +589,12 @@ input DateWhereInput {
greaterThanOrEqualTo: Date
}

input ArrayWhereInput {
equalTo: Any
notEqualTo: Any
contains: Any
notContains: Any
input SearchWhereInput {
contains: Search
}

"""
The Any scalar type is used in operations and types that involve any type of value.
"""
scalar Any
"""Search scalar to tokenize and search for all searchable fields"""
scalar Search

input UserAuthenticationWhereInput {
emailPassword: UserAuthenticationEmailPasswordWhereInput
Expand Down Expand Up @@ -635,14 +630,19 @@ input AnyWhereInput {
notEqualTo: Any
}

"""
The Any scalar type is used in operations and types that involve any type of value.
"""
scalar Any

input RoleWhereInput {
id: IdWhereInput
name: StringWhereInput
users: UserWhereInput
acl: RoleACLObjectWhereInput
createdAt: DateWhereInput
updatedAt: DateWhereInput
search: ArrayWhereInput
search: SearchWhereInput
OR: [RoleWhereInput]
AND: [RoleWhereInput]
}
Expand Down Expand Up @@ -680,7 +680,7 @@ input _SessionWhereInput {
acl: _SessionACLObjectWhereInput
createdAt: DateWhereInput
updatedAt: DateWhereInput
search: ArrayWhereInput
search: SearchWhereInput
OR: [_SessionWhereInput]
AND: [_SessionWhereInput]
}
Expand Down Expand Up @@ -724,7 +724,7 @@ input PostWhereInput {
acl: PostACLObjectWhereInput
createdAt: DateWhereInput
updatedAt: DateWhereInput
search: ArrayWhereInput
search: SearchWhereInput
OR: [PostWhereInput]
AND: [PostWhereInput]
}
Expand Down
10 changes: 5 additions & 5 deletions packages/wibe-server/src/graphql/types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
Kind,
GraphQLBoolean,
GraphQLFloat,
GraphQLInputObjectType,
GraphQLInt,
GraphQLList,
GraphQLScalarType,
GraphQLString,
GraphQLID,
} from 'graphql'
import { tokenize } from '../utils'

Expand Down Expand Up @@ -139,10 +139,10 @@ export const EmailWhereInput = new GraphQLInputObjectType({
export const IdWhereInput = new GraphQLInputObjectType({
name: 'IdWhereInput',
fields: {
equalTo: { type: GraphQLString },
notEqualTo: { type: GraphQLString },
in: { type: new GraphQLList(GraphQLString) },
notIn: { type: new GraphQLList(GraphQLString) },
equalTo: { type: GraphQLID },
notEqualTo: { type: GraphQLID },
in: { type: new GraphQLList(GraphQLID) },
notIn: { type: new GraphQLList(GraphQLID) },
},
})

Expand Down

0 comments on commit 3f3c547

Please sign in to comment.