Skip to content

Commit

Permalink
Use 'slug' instead of 'tags' as query variable for caching purposes (#42
Browse files Browse the repository at this point in the history
)

* Use 'slug' instead of 'tags' as query variable for caching purposes

* Add Swift types

* Add TypeScript types

Co-authored-by: Brendan Hamill <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
3 people authored Feb 9, 2021
1 parent 3776a1c commit ad35314
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Queries/Emails/EmailsByTag.gql
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
query EmailsByTag(
$tags: [String]
$slug: [String]
) {
emails(
where:{
tagSlugIn: $tags
tagSlugIn: $slug
}
) {
nodes {
Expand Down
4 changes: 2 additions & 2 deletions Schemas/ContentSchema.operations.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Web/EmailsByTag.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Web/dist-cjs/EmailsByTag.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { EmailPartsFragment } from './EmailParts';
import type { EmailListPartsFragment } from './EmailListParts';
import * as Apollo from '@apollo/client';
export declare type EmailsByTagQueryVariables = Types.Exact<{
tags?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>>>;
slug?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>>>;
}>;
export declare type EmailsByTagQuery = {
__typename?: 'RootQuery';
Expand Down Expand Up @@ -34,15 +34,15 @@ export declare const EmailsByTagDocument: Apollo.DocumentNode;
* @example
* const { data, loading, error } = useEmailsByTagQuery({
* variables: {
* tags: // value for 'tags'
* slug: // value for 'slug'
* },
* });
*/
export declare function useEmailsByTagQuery(baseOptions?: Apollo.QueryHookOptions<EmailsByTagQuery, EmailsByTagQueryVariables>): Apollo.QueryResult<EmailsByTagQuery, Types.Exact<{
tags?: (string | null)[] | null | undefined;
slug?: (string | null)[] | null | undefined;
}>>;
export declare function useEmailsByTagLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<EmailsByTagQuery, EmailsByTagQueryVariables>): Apollo.QueryTuple<EmailsByTagQuery, Types.Exact<{
tags?: (string | null)[] | null | undefined;
slug?: (string | null)[] | null | undefined;
}>>;
export declare type EmailsByTagQueryHookResult = ReturnType<typeof useEmailsByTagQuery>;
export declare type EmailsByTagLazyQueryHookResult = ReturnType<typeof useEmailsByTagLazyQuery>;
Expand Down
6 changes: 3 additions & 3 deletions Web/dist-cjs/EmailsByTag.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Web/dist/EmailsByTag.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { EmailPartsFragment } from './EmailParts';
import type { EmailListPartsFragment } from './EmailListParts';
import * as Apollo from '@apollo/client';
export declare type EmailsByTagQueryVariables = Types.Exact<{
tags?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>>>;
slug?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>>>;
}>;
export declare type EmailsByTagQuery = {
__typename?: 'RootQuery';
Expand Down Expand Up @@ -34,15 +34,15 @@ export declare const EmailsByTagDocument: Apollo.DocumentNode;
* @example
* const { data, loading, error } = useEmailsByTagQuery({
* variables: {
* tags: // value for 'tags'
* slug: // value for 'slug'
* },
* });
*/
export declare function useEmailsByTagQuery(baseOptions?: Apollo.QueryHookOptions<EmailsByTagQuery, EmailsByTagQueryVariables>): Apollo.QueryResult<EmailsByTagQuery, Types.Exact<{
tags?: (string | null)[] | null | undefined;
slug?: (string | null)[] | null | undefined;
}>>;
export declare function useEmailsByTagLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<EmailsByTagQuery, EmailsByTagQueryVariables>): Apollo.QueryTuple<EmailsByTagQuery, Types.Exact<{
tags?: (string | null)[] | null | undefined;
slug?: (string | null)[] | null | undefined;
}>>;
export declare type EmailsByTagQueryHookResult = ReturnType<typeof useEmailsByTagQuery>;
export declare type EmailsByTagLazyQueryHookResult = ReturnType<typeof useEmailsByTagLazyQuery>;
Expand Down
6 changes: 3 additions & 3 deletions Web/dist/EmailsByTag.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions iOS/QuartzContent/QuartzContent.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ad35314

Please sign in to comment.