Commit 042b8bc4 authored by aleclofabbro's avatar aleclofabbro
Browse files

renamed _obj, _subj types

parent ce012665
......@@ -12,8 +12,8 @@ input PageInput {
}
# Knows
union Knower = User
union Knowable = User
union KnowsSubject = User
union KnowsObject = User
input KnowsSubjectQueryInput {
User: UserQueryInput
}
......@@ -27,13 +27,13 @@ input KnowsQueryInput {
}
type Knows implements Glyph {
_id: ID!
_subj(query: KnowsSubjectQueryInput, page: PageInput): [Knower!]!
_obj(query: KnowsObjectQueryInput, page: PageInput): [Knowable!]!
_subj(query: KnowsSubjectQueryInput, page: PageInput): [KnowsSubject!]!
_obj(query: KnowsObjectQueryInput, page: PageInput): [KnowsObject!]!
}
# Follows
union Follower = User
union Followable = User
union FollowsSubject = User
union FollowsObject = User
input FollowObjectQueryInput {
User: UserQueryInput
}
......@@ -48,8 +48,8 @@ input FollowsQueryInput {
}
type Follows implements Glyph {
_id: ID!
_subj(query: FollowSubjectQueryInput, page: PageInput): [Follower!]!
_obj(query: FollowObjectQueryInput, page: PageInput): [Followable!]!
_subj(query: FollowSubjectQueryInput, page: PageInput): [FollowsSubject!]!
_obj(query: FollowObjectQueryInput, page: PageInput): [FollowsObject!]!
}
# User
......
interface Glyph {
_id: ID!
}
input StringMatchInput {
_eq: String
_gt: String
_lt: String
}
input PageInput {
limit: Int
after: ID
}
# Knows
union KnowsSubject = User
union KnowsObject = User
input KnowsSubjectQueryInput {
User: UserQueryInput
}
input KnowsObjectQueryInput {
User: UserQueryInput
}
input KnowsQueryInput {
_and: [KnowsQueryInput!]
_or: [KnowsQueryInput!]
_id: [ID!]
}
type Knows implements Glyph {
_id: ID!
_subj(query: KnowsSubjectQueryInput, page: PageInput): [KnowsSubject!]!
_obj(query: KnowsObjectQueryInput, page: PageInput): [KnowsObject!]!
}
# Follows
union FollowsSubject = User
union FollowsObject = User
input FollowObjectQueryInput {
User: UserQueryInput
}
input FollowSubjectQueryInput {
User: UserQueryInput
}
input FollowsQueryInput {
_and: [FollowsQueryInput!]
_or: [FollowsQueryInput!]
_id: [ID!]
}
type Follows implements Glyph {
_id: ID!
_subj(query: FollowSubjectQueryInput, page: PageInput): [FollowsSubject!]!
_obj(query: FollowObjectQueryInput, page: PageInput): [FollowsObject!]!
}
# User
input UserQueryInput {
_and: [UserQueryInput!]
_or: [UserQueryInput!]
_id: [ID!]
username: StringMatchInput
}
input UserRelationQueryInput {
Follows: FollowsQueryInput
Knows: KnowsQueryInput
}
union UserRelation = Knows | Follows
type User implements Glyph {
_id: ID!
_rel(query: UserRelationQueryInput, page: PageInput): [UserRelation!]!
username: String!
}
# Main
input GraphQueryInput {
Knows: KnowsQueryInput
Follows: FollowsQueryInput
User: UserQueryInput
}
type Query {
graph(query: GraphQueryInput, page: PageInput): [Glyph!]!
}
input CreateUserInput {
username: String!
}
type Mutation {
createUser(user: CreateUserInput!): User
createKnows(from: ID!, to: ID!): Knows
createFollows(from: ID!, to: ID!): Follows
}
enum Role {
Anonymous
Admin
System
WebUser
}
type Auth {
userId: ID!
token: String!
roles: [Role!]!
}
......@@ -155,7 +155,7 @@
},
{
"kind": "UNION",
"name": "Knower",
"name": "KnowsSubject",
"description": null,
"fields": null,
"inputFields": null,
......@@ -171,7 +171,7 @@
},
{
"kind": "UNION",
"name": "Knowable",
"name": "KnowsObject",
"description": null,
"fields": null,
"inputFields": null,
......@@ -349,7 +349,7 @@
"name": null,
"ofType": {
"kind": "UNION",
"name": "Knower",
"name": "KnowsSubject",
"ofType": null
}
}
......@@ -394,7 +394,7 @@
"name": null,
"ofType": {
"kind": "UNION",
"name": "Knowable",
"name": "KnowsObject",
"ofType": null
}
}
......@@ -417,7 +417,7 @@
},
{
"kind": "UNION",
"name": "Follower",
"name": "FollowsSubject",
"description": null,
"fields": null,
"inputFields": null,
......@@ -433,7 +433,7 @@
},
{
"kind": "UNION",
"name": "Followable",
"name": "FollowsObject",
"description": null,
"fields": null,
"inputFields": null,
......@@ -611,7 +611,7 @@
"name": null,
"ofType": {
"kind": "UNION",
"name": "Follower",
"name": "FollowsSubject",
"ofType": null
}
}
......@@ -656,7 +656,7 @@
"name": null,
"ofType": {
"kind": "UNION",
"name": "Followable",
"name": "FollowsObject",
"ofType": null
}
}
......
......@@ -28,9 +28,9 @@ export type PageInput = {
after: Maybe<Scalars['ID']>;
};
export type Knower = User;
export type KnowsSubject = User;
export type Knowable = User;
export type KnowsObject = User;
export type KnowsSubjectQueryInput = {
User: Maybe<UserQueryInput>;
......@@ -49,8 +49,8 @@ export type KnowsQueryInput = {
export type Knows = Glyph & {
__typename: 'Knows';
_id: Scalars['ID'];
_subj: Array<Knower>;
_obj: Array<Knowable>;
_subj: Array<KnowsSubject>;
_obj: Array<KnowsObject>;
};
......@@ -65,9 +65,9 @@ export type Knows_ObjArgs = {
page: Maybe<PageInput>;
};
export type Follower = User;
export type FollowsSubject = User;
export type Followable = User;
export type FollowsObject = User;
export type FollowObjectQueryInput = {
User: Maybe<UserQueryInput>;
......@@ -86,8 +86,8 @@ export type FollowsQueryInput = {
export type Follows = Glyph & {
__typename: 'Follows';
_id: Scalars['ID'];
_subj: Array<Follower>;
_obj: Array<Followable>;
_subj: Array<FollowsSubject>;
_obj: Array<FollowsObject>;
};
......@@ -272,18 +272,18 @@ export type ResolversTypes = {
String: ResolverTypeWrapper<Scalars['String']>;
PageInput: PageInput;
Int: ResolverTypeWrapper<Scalars['Int']>;
Knower: ResolversTypes['User'];
Knowable: ResolversTypes['User'];
KnowsSubject: ResolversTypes['User'];
KnowsObject: ResolversTypes['User'];
KnowsSubjectQueryInput: KnowsSubjectQueryInput;
KnowsObjectQueryInput: KnowsObjectQueryInput;
KnowsQueryInput: KnowsQueryInput;
Knows: ResolverTypeWrapper<Omit<Knows, '_subj' | '_obj'> & { _subj: Array<ResolversTypes['Knower']>, _obj: Array<ResolversTypes['Knowable']> }>;
Follower: ResolversTypes['User'];
Followable: ResolversTypes['User'];
Knows: ResolverTypeWrapper<Omit<Knows, '_subj' | '_obj'> & { _subj: Array<ResolversTypes['KnowsSubject']>, _obj: Array<ResolversTypes['KnowsObject']> }>;
FollowsSubject: ResolversTypes['User'];
FollowsObject: ResolversTypes['User'];
FollowObjectQueryInput: FollowObjectQueryInput;
FollowSubjectQueryInput: FollowSubjectQueryInput;
FollowsQueryInput: FollowsQueryInput;
Follows: ResolverTypeWrapper<Omit<Follows, '_subj' | '_obj'> & { _subj: Array<ResolversTypes['Follower']>, _obj: Array<ResolversTypes['Followable']> }>;
Follows: ResolverTypeWrapper<Omit<Follows, '_subj' | '_obj'> & { _subj: Array<ResolversTypes['FollowsSubject']>, _obj: Array<ResolversTypes['FollowsObject']> }>;
UserQueryInput: UserQueryInput;
UserRelationQueryInput: UserRelationQueryInput;
UserRelation: ResolversTypes['Knows'] | ResolversTypes['Follows'];
......@@ -305,18 +305,18 @@ export type ResolversParentTypes = {
String: Scalars['String'];
PageInput: PageInput;
Int: Scalars['Int'];
Knower: ResolversParentTypes['User'];
Knowable: ResolversParentTypes['User'];
KnowsSubject: ResolversParentTypes['User'];
KnowsObject: ResolversParentTypes['User'];
KnowsSubjectQueryInput: KnowsSubjectQueryInput;
KnowsObjectQueryInput: KnowsObjectQueryInput;
KnowsQueryInput: KnowsQueryInput;
Knows: Omit<Knows, '_subj' | '_obj'> & { _subj: Array<ResolversParentTypes['Knower']>, _obj: Array<ResolversParentTypes['Knowable']> };
Follower: ResolversParentTypes['User'];
Followable: ResolversParentTypes['User'];
Knows: Omit<Knows, '_subj' | '_obj'> & { _subj: Array<ResolversParentTypes['KnowsSubject']>, _obj: Array<ResolversParentTypes['KnowsObject']> };
FollowsSubject: ResolversParentTypes['User'];
FollowsObject: ResolversParentTypes['User'];
FollowObjectQueryInput: FollowObjectQueryInput;
FollowSubjectQueryInput: FollowSubjectQueryInput;
FollowsQueryInput: FollowsQueryInput;
Follows: Omit<Follows, '_subj' | '_obj'> & { _subj: Array<ResolversParentTypes['Follower']>, _obj: Array<ResolversParentTypes['Followable']> };
Follows: Omit<Follows, '_subj' | '_obj'> & { _subj: Array<ResolversParentTypes['FollowsSubject']>, _obj: Array<ResolversParentTypes['FollowsObject']> };
UserQueryInput: UserQueryInput;
UserRelationQueryInput: UserRelationQueryInput;
UserRelation: ResolversParentTypes['Knows'] | ResolversParentTypes['Follows'];
......@@ -334,33 +334,33 @@ export type GlyphResolvers<ContextType = Context, ParentType extends ResolversPa
_id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
};
export type KnowerResolvers<ContextType = Context, ParentType extends ResolversParentTypes['Knower'] = ResolversParentTypes['Knower']> = {
export type KnowsSubjectResolvers<ContextType = Context, ParentType extends ResolversParentTypes['KnowsSubject'] = ResolversParentTypes['KnowsSubject']> = {
__resolveType: TypeResolveFn<'User', ParentType, ContextType>;
};
export type KnowableResolvers<ContextType = Context, ParentType extends ResolversParentTypes['Knowable'] = ResolversParentTypes['Knowable']> = {
export type KnowsObjectResolvers<ContextType = Context, ParentType extends ResolversParentTypes['KnowsObject'] = ResolversParentTypes['KnowsObject']> = {
__resolveType: TypeResolveFn<'User', ParentType, ContextType>;
};
export type KnowsResolvers<ContextType = Context, ParentType extends ResolversParentTypes['Knows'] = ResolversParentTypes['Knows']> = {
_id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
_subj: Resolver<Array<ResolversTypes['Knower']>, ParentType, ContextType, RequireFields<Knows_SubjArgs, never>>;
_obj: Resolver<Array<ResolversTypes['Knowable']>, ParentType, ContextType, RequireFields<Knows_ObjArgs, never>>;
_subj: Resolver<Array<ResolversTypes['KnowsSubject']>, ParentType, ContextType, RequireFields<Knows_SubjArgs, never>>;
_obj: Resolver<Array<ResolversTypes['KnowsObject']>, ParentType, ContextType, RequireFields<Knows_ObjArgs, never>>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type FollowerResolvers<ContextType = Context, ParentType extends ResolversParentTypes['Follower'] = ResolversParentTypes['Follower']> = {
export type FollowsSubjectResolvers<ContextType = Context, ParentType extends ResolversParentTypes['FollowsSubject'] = ResolversParentTypes['FollowsSubject']> = {
__resolveType: TypeResolveFn<'User', ParentType, ContextType>;
};
export type FollowableResolvers<ContextType = Context, ParentType extends ResolversParentTypes['Followable'] = ResolversParentTypes['Followable']> = {
export type FollowsObjectResolvers<ContextType = Context, ParentType extends ResolversParentTypes['FollowsObject'] = ResolversParentTypes['FollowsObject']> = {
__resolveType: TypeResolveFn<'User', ParentType, ContextType>;
};
export type FollowsResolvers<ContextType = Context, ParentType extends ResolversParentTypes['Follows'] = ResolversParentTypes['Follows']> = {
_id: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
_subj: Resolver<Array<ResolversTypes['Follower']>, ParentType, ContextType, RequireFields<Follows_SubjArgs, never>>;
_obj: Resolver<Array<ResolversTypes['Followable']>, ParentType, ContextType, RequireFields<Follows_ObjArgs, never>>;
_subj: Resolver<Array<ResolversTypes['FollowsSubject']>, ParentType, ContextType, RequireFields<Follows_SubjArgs, never>>;
_obj: Resolver<Array<ResolversTypes['FollowsObject']>, ParentType, ContextType, RequireFields<Follows_ObjArgs, never>>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
......@@ -394,11 +394,11 @@ export type AuthResolvers<ContextType = Context, ParentType extends ResolversPar
export type Resolvers<ContextType = Context> = {
Glyph: GlyphResolvers<ContextType>;
Knower: KnowerResolvers<ContextType>;
Knowable: KnowableResolvers<ContextType>;
KnowsSubject: KnowsSubjectResolvers<ContextType>;
KnowsObject: KnowsObjectResolvers<ContextType>;
Knows: KnowsResolvers<ContextType>;
Follower: FollowerResolvers<ContextType>;
Followable: FollowableResolvers<ContextType>;
FollowsSubject: FollowsSubjectResolvers<ContextType>;
FollowsObject: FollowsObjectResolvers<ContextType>;
Follows: FollowsResolvers<ContextType>;
UserRelation: UserRelationResolvers<ContextType>;
User: UserResolvers<ContextType>;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment