File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ const registration = gql`
4141 * @description A mutation to cache user information server side
4242 */
4343const cache = gql `
44- mutation cache($token: String!, $cache: String!) {
45- cache: cacheUser(token: $token, cache: $cache) {
46- user {
44+ mutation cache($token: String!, $personName: String!, $ cache: String!) {
45+ cache: cacheUser(token: $token, personName: $personName, cache: $cache) {
46+ personPage {
4747 id
4848 }
4949 }
Original file line number Diff line number Diff line change @@ -111,15 +111,20 @@ class SnekGqlUserTasks {
111111 /**
112112 * Cache a user.
113113 *
114+ * @param {string } personName The name of a users person page
114115 * @param {string } cache A serialized JSON object to be cached
115116 * @returns {Promise<ApolloResult<CacheData>> } Cache data
116117 */
117- async cache ( cache : string ) : Promise < ApolloResult < CacheData > > {
118+ async cache (
119+ personName : string ,
120+ cache : string
121+ ) : Promise < ApolloResult < CacheData > > {
118122 const response = await this . parent . run < CacheData > (
119123 "mutation" ,
120124 this . parent . template . mutations . user . cache ,
121125 {
122126 token : await this . parent . session . upToDateToken ( ) ,
127+ personName,
123128 cache,
124129 }
125130 ) ;
You can’t perform that action at this time.
0 commit comments