-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(social): implement persisted operations
- Loading branch information
Showing
6 changed files
with
130 additions
and
7 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* eslint-disable */ | ||
/* prettier-ignore */ | ||
|
||
export type introspection_types = { | ||
'Account': { kind: 'OBJECT'; name: 'Account'; fields: { 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'email': { name: 'email'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'picture': { name: 'picture'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; | ||
'Boolean': unknown; | ||
'ID': unknown; | ||
'Int': unknown; | ||
'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'updatePicture': { name: 'updatePicture'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'updateQuietMode': { name: 'updateQuietMode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'updateUser': { name: 'updateUser'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; | ||
'PublicUser': { kind: 'OBJECT'; name: 'PublicUser'; fields: { 'bio': { name: 'bio'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'displayName': { name: 'displayName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'imageUrl': { name: 'imageUrl'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'question': { name: 'question'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'quietMode': { name: 'quietMode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'username': { name: 'username'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; | ||
'Query': { kind: 'OBJECT'; name: 'Query'; fields: { 'user': { name: 'user'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'userByUsername': { name: 'userByUsername'; type: { kind: 'OBJECT'; name: 'PublicUser'; ofType: null; } }; }; }; | ||
'String': unknown; | ||
'UpdateUserInput': { kind: 'INPUT_OBJECT'; name: 'UpdateUserInput'; isOneOf: false; inputFields: [{ name: 'bio'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'displayName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'question'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'username'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; | ||
'User': { kind: 'OBJECT'; name: 'User'; fields: { 'accounts': { name: 'accounts'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Account'; ofType: null; }; }; } }; 'bio': { name: 'bio'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'displayName': { name: 'displayName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'imageUrl': { name: 'imageUrl'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'question': { name: 'question'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'quietMode': { name: 'quietMode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'username': { name: 'username'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; | ||
}; | ||
|
||
/** An IntrospectionQuery representation of your schema. | ||
* | ||
* @remarks | ||
* This is an introspection of your schema saved as a file by GraphQLSP. | ||
* It will automatically be used by `gql.tada` to infer the types of your GraphQL documents. | ||
* If you need to reuse this data or update your `scalars`, update `tadaOutputLocation` to | ||
* instead save to a .ts instead of a .d.ts file. | ||
*/ | ||
export type introspection = { | ||
name: never; | ||
query: 'Query'; | ||
mutation: 'Mutation'; | ||
subscription: never; | ||
types: introspection_types; | ||
}; | ||
|
||
import * as gqlTada from 'gql.tada'; | ||
|
||
declare module 'gql.tada' { | ||
interface setupSchema { | ||
introspection: introspection | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"e56708c4cacdba6c698de1f4bc45a999ca535fb519bd806caf9a62a6582159e4": "query UserByUsername($username: String!) {\n userByUsername(username: $username) {\n __typename\n id\n bio\n question\n username\n displayName\n question\n quietMode\n imageUrl\n createdAt\n }\n}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
type Account { | ||
createdAt: Int! | ||
email: String! | ||
id: ID! | ||
picture: String! | ||
} | ||
|
||
type Mutation { | ||
updatePicture(imageUrl: String): String | ||
updateQuietMode(quietMode: Boolean!): String | ||
updateUser(input: UpdateUserInput!): String | ||
} | ||
|
||
type PublicUser { | ||
bio: String | ||
createdAt: Int! | ||
displayName: String | ||
id: ID! | ||
imageUrl: String | ||
question: String! | ||
quietMode: Boolean! | ||
username: String! | ||
} | ||
|
||
type Query { | ||
user: User | ||
userByUsername(username: String!): PublicUser | ||
} | ||
|
||
input UpdateUserInput { | ||
bio: String | ||
displayName: String! | ||
question: String! | ||
username: String! | ||
} | ||
|
||
type User { | ||
accounts: [Account!] | ||
bio: String | ||
createdAt: Int! | ||
displayName: String | ||
id: ID! | ||
imageUrl: String | ||
question: String! | ||
quietMode: Boolean! | ||
username: String! | ||
} |