Skip to content

jaydedm/growthday

Repository files navigation

GrowthDay 3.0


Initial Setup

1. Install the AWS CLI

curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /

Delete the AWSCLIV2.pkg file when installation is completed.

2. Install Granted to manage AWS Profiles

brew tap common-fate/granted
brew install granted

After installation, assume the elrond role established by your admin:

granted sso populate --sso-region us-east-1 https://growthday.awsapps.com/start
assume elrond-dev/gd-elrond

3. Clone the GrowthDay Client repo

git clone https://github.com/GrowthDay/client.git
cd client

Amplify Tips & Tricks

Subscriptions

If you're running into an issue where certain fields (that you know data exists for) are coming back null in your subscription event, double check the mutation to make sure the fields you're expecting are being returned by that mutation.

For example, I have this mutation to create a comment:

   mutation CreateComment($content: String! = "hey there") {
      createComment(input: {content: $content}) {
         id
         content
         ...
      }
   }

while I'm subscribed to any onCommentCreate events with this subscription:

subscription MySubscription {
   onCreateComment {
      author { // I expect the comment author to be in this event
         profileImage {
            s3Key
            height
            width
            }
         displayName
         bio
         owner
         publicProfileId
         createdAt
         updatedAt
      }
      content
      id
      ...
   }
}

Even though the subscription is asking for the comment author's information, the returned fields in the createComment mutation are not providing that information to any consumers that are subscribed to those events.

I would need to add the author information to my mutation for the fields to be passed through, like this:

   mutation CreateComment($content: String! = "hey there") {
      createComment(input: {content: $content}) {
         author { // Add these author-specific fields to the mutation response
            profileImage {
               s3Key
               height
               width
               }
            displayName
            bio
            owner
            publicProfileId
            createdAt
            updatedAt
         }
         id
         ...
      }
   }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 21