Skip to content

Commit fccc484

Browse files
committed
change name to getTutorialbyGatsbyID
1 parent 8bec0a7 commit fccc484

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

packages/gatsby-theme/src/components/TutorialListing.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const TutorialListing: React.FunctionComponent<TutorialListingProps> = ({
3030
return (
3131
<Query
3232
query={gql`
33-
query gatsbyTutorialQuery($gatsbyID: String!) {
34-
gatsbyTutorialQuery(gatsbyID: $gatsbyID) {
33+
query getTutorialbyGatsbyID($gatsbyID: String!) {
34+
getTutorialbyGatsbyID(gatsbyID: $gatsbyID) {
3535
id
3636
name
3737
upvotes
@@ -51,11 +51,11 @@ const TutorialListing: React.FunctionComponent<TutorialListingProps> = ({
5151
<Card width={[1]} p={4} my={4} borderRadius={8} boxShadow="small">
5252
<Flex alignItems="center" justifyContent="center">
5353
<Box width={1 / 12}>
54-
{data.gatsbyTutorialQuery && (
55-
<UpvoteMutation tutorial={data.gatsbyTutorialQuery} />
54+
{data.getTutorialbyGatsbyID && (
55+
<UpvoteMutation tutorial={data.getTutorialbyGatsbyID} />
5656
)}
57-
{data.gatsbyTutorialQuery && (
58-
<BookmarkMutation tutorial={data.gatsbyTutorialQuery} />
57+
{data.getTutorialbyGatsbyID && (
58+
<BookmarkMutation tutorial={data.getTutorialbyGatsbyID} />
5959
)}
6060
</Box>
6161

packages/server/.yoga/nexus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ export interface NexusGenFieldTypes {
348348
upvoteTutorial: NexusGenRootTypes['UserTutorialPayload']; // UserTutorialPayload!
349349
}
350350
Query: { // field return type
351-
gatsbyTutorialQuery: NexusGenRootTypes['Tutorial']; // Tutorial!
351+
getTutorialbyGatsbyID: NexusGenRootTypes['Tutorial']; // Tutorial!
352352
tutorial: NexusGenRootTypes['Tutorial']; // Tutorial!
353353
tutorials: NexusGenRootTypes['Tutorial'][] | null; // [Tutorial!]
354354
viewer: NexusGenRootTypes['Viewer'] | null; // Viewer
@@ -425,7 +425,7 @@ export interface NexusGenArgTypes {
425425
}
426426
}
427427
Query: {
428-
gatsbyTutorialQuery: { // args
428+
getTutorialbyGatsbyID: { // args
429429
gatsbyID: string; // String!
430430
}
431431
tutorial: { // args

packages/server/src/graphql/Tutorial.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const tutorial = queryField('tutorial', {
7474
},
7575
})
7676

77-
export const gatsbyTutorialQuery = queryField('gatsbyTutorialQuery', {
77+
export const getTutorialbyGatsbyID = queryField('getTutorialbyGatsbyID', {
7878
type: 'Tutorial',
7979
args: {
8080
gatsbyID: stringArg({

packages/server/src/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface PayloadInterface {
3636
}
3737

3838
type Query {
39-
gatsbyTutorialQuery(gatsbyID: String!): Tutorial!
39+
getTutorialbyGatsbyID(gatsbyID: String!): Tutorial!
4040
tutorial(id: ID!): Tutorial!
4141
tutorials(first: Int!): [Tutorial!]
4242
viewer: Viewer

0 commit comments

Comments
 (0)