Skip to content

Commit 41d38d5

Browse files
authored
Merge branch 'develop' into implementing-authentication-in-graphql
2 parents 99972fb + 4456074 commit 41d38d5

File tree

84 files changed

+4712
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+4712
-201
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
branches: [develop]
1111
types: [opened, reopened, synchronize]
1212

13+
permissions:
14+
contents: write
15+
1316
jobs:
1417
build-and-deploy:
1518
concurrency: ci-${{ github.ref }}
@@ -29,11 +32,7 @@ jobs:
2932
- name: Install and Build 🔧
3033
run: |
3134
npm install
32-
npx prettier --check "**/*.{graphql,yml,json,md,sh,ts,tsx,js}"
33-
cd ./publish-externals
34-
npm run generate
35-
cd ..
36-
npm run typecheck
35+
npx prettier --check "**/*.{graphql,yml,json,md,sh,ts,tsx,js,css}"
3736
npm run build
3837
3938
- name: Deploy 🚀
@@ -42,23 +41,26 @@ jobs:
4241
with:
4342
folder: build
4443

45-
- name: Get changed markdown files
46-
id: changed-markdown-files
47-
uses: tj-actions/changed-files@v44
48-
with:
49-
files: |
50-
blog/**/*.{md,mdx}
51-
5244
- name: Publish to Hashnode and Dev.to 📝
53-
if: github.ref == 'refs/heads/develop' && steps.changed-markdown-files.outputs.any_changed == 'true'
5445
env:
5546
HASHNODE_PAT: ${{ secrets.HASHNODE_PAT }}
5647
HASHNODE_PUBLICATION_ID: ${{ secrets.HASHNODE_PUBLICATION_ID }}
57-
CHANGED_FILES: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
5848
DEVTO_API_KEY: ${{ secrets.DEVTO_API_KEY}}
5949
DEVTO_ORG_ID: ${{secrets.DEVTO_ORG_ID}}
6050
DEVTO_ORG_NAME: ${{secrets.DEVTO_ORG_NAME}}
6151
run: |
6252
cd ./publish-externals
6353
npm run generate
64-
npx --yes tsx ./src/index.ts "$CHANGED_FILES"
54+
if [ "$GITHUB_REF" == "refs/heads/develop" ]; then
55+
npx --yes tsx ./src/index.ts --publish
56+
else
57+
npx --yes tsx ./src/index.ts
58+
fi
59+
60+
- name: Commit and push changes (on develop)
61+
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
62+
uses: stefanzweifel/git-auto-commit-action@v5
63+
with:
64+
branch: develop
65+
commit_author: Author <[email protected]>
66+
commit_message: "[ci skip] update snapshot"

.github/workflows/convention.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PR Title Validation
2+
3+
on:
4+
# pull_request_target is ok until we do not checkout and build external code
5+
# TODO: maybe it is not required after all https://github.com/amannn/action-semantic-pull-request/issues/219
6+
pull_request_target:
7+
types: [opened, reopened, synchronize, edited]
8+
9+
permissions:
10+
pull-requests: read
11+
12+
jobs:
13+
title-check:
14+
name: Check PR Title
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: PR Title
19+
uses: amannn/action-semantic-pull-request@v5
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Bounty PR Title
24+
if: contains(github.event.pull_request.labels.*.name, '🙋 Bounty claim')
25+
uses: amannn/action-semantic-pull-request@v5
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
with:
29+
requireScope: true
30+
scopes: \d+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ yarn-error.log*
2323
.idea/
2424
src/*/*.json
2525
.vscode/
26+
.gitpod.yml

blog/graphql-angular-clients-2024-07-20.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -950,25 +950,31 @@ We've put together a complete set of working examples for everything we've cover
950950
951951
## Detailed Comparison Table
952952
953-
| Method | Bundle Size (minified + gzip)\* | Learning Curve | Caching Capabilities | Community Support | Additional Features |
954-
| --------------- | ------------------------------- | -------------- | --------------------------------------- | ----------------- | ------------------------------------------ |
955-
| Apollo Angular | ~2kB | Moderate | Extensive (InMemoryCache, customizable) | High | State management, optimistic UI updates |
956-
| Urql | ~10.2 KB | Low | Moderate (Document caching) | Moderate | Extensible architecture, lightweight |
957-
| GraphQL-Request | Unknown | Low | None (Minimal client) | Moderate | Simplicity, works in Node and browsers |
958-
| Axios | ~13.2 KB | Low | None (HTTP client only) | High | Familiar HTTP handling, interceptors |
959-
| Fetch API | 0 KB (Browser built-in) | Low | None (Native API) | High | No additional dependency, widely supported |
960-
961-
(\*) Bundle sizes are approximate and may vary based on version and configuration. Values are culled from bundlephobia.com where available.
962-
963-
### Notes:
964-
965-
- **Apollo Angular**: Offers the most comprehensive feature set but comes with a larger bundle size and steeper learning curve.
966-
- **Urql**: Provides a good balance between features and bundle size, with a focus on simplicity.
967-
- **GraphQL-Request**: Minimal client ideal for simple use cases where advanced features aren't needed.
968-
- **Axios**: Not a GraphQL-specific solution, but familiar to many developers and versatile for various HTTP requests.
969-
- **Fetch API**: Native browser API, no additional bundle size, but requires more manual work for GraphQL operations.
970-
971-
This table should help developers choose the right method based on their specific project needs, considering factors like bundle size, learning curve, caching capabilities, community support, and additional features.
953+
| Method | Bundle Size (minified + gzip)\* | Learning Curve | Caching Capabilities | Community Support | Additional Features |
954+
| ---------------- | ------------------------------- | -------------- | ------------------------------------------ | ----------------- | --------------------------------------------------- |
955+
| Apollo Angular¹ | 258 KB | Moderate | Extensive (InMemoryCache, customizable) | High | State management, optimistic UI updates |
956+
| Urql² | 17 KB | Low | Moderate (Document and normalized caching) | Moderate | Extensible architecture, lightweight, plugin system |
957+
| GraphQL-Request³ | 58.6 KB | Low | None (Minimal client) | Moderate | Simplicity, works in Node and browsers |
958+
| Axios⁴ | 24 KB | Low | None (HTTP client only) | High | Familiar HTTP handling, interceptors |
959+
| Fetch API | 0 KB (Browser built-in) | Low | None (Native API) | High | No additional dependency, widely supported |
960+
961+
(\*) Bundle sizes are based on bundlejs.com calculations using the provided export statements, with minification and gzip compression applied.
962+
963+
**Notes:**
964+
965+
1. Apollo Angular's bundle size (258 KB gzipped) is significantly larger than other options, which may impact initial load times for applications.
966+
2. Urql offers a much smaller bundle size (17 KB gzipped) while still providing both document caching and normalized caching through its plugin architecture.
967+
3. GraphQL-Request, despite being a minimal client, has a larger bundle size (58.6 KB gzipped) than expected, which might be due to including the full GraphQL parser.
968+
4. Axios, a general-purpose HTTP client, has a moderate bundle size (24 KB gzipped) considering its feature set.
969+
5. The Fetch API remains the lightest option as it's built into modern browsers, but it lacks some conveniences provided by other libraries.
970+
6. Bundle sizes for critical path libraries can significantly impact performance. Consider lazy-loading or code-splitting strategies when using larger libraries like Apollo Angular.
971+
972+
**Bundle Size References:**
973+
974+
1. Apollo Angular: [bundlejs.com link](https://bundlejs.com/?q=apollo-angular%2Capollo-angular%2Fhttp%2C%40apollo%2Fclient%2Fcore&treeshake=%5B%7B+APOLLO_OPTIONS%2CApolloModule+%7D%5D%2C%5B%7B+HttpLink+%7D%5D%2C%5B%7B+InMemoryCache+%7D%5D)
975+
2. Urql: [bundlejs.com link](https://bundlejs.com/?q=urql%2C%40urql%2Fcore&treeshake=%5B%7B+createClient%2CProvider%2CuseQuery%2CuseMutation+%7D%5D%2C%5B%7B+cacheExchange%2CfetchExchange+%7D%5D)
976+
3. GraphQL-Request: [bundlejs.com link](https://bundlejs.com/?q=graphql-request&treeshake=%5B%7B+GraphQLClient%2Cgql+%7D%5D)
977+
4. Axios: [bundlejs.com link](https://bundlejs.com/?q=axios&treeshake=%5B%7B+default+as+axios+%7D%5D)
972978
973979
### Caching Capabilities
974980

blog/graphql-schema-2024-07-11.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Design a GraphQL Schema So Good, It'll Make REST APIs Cry
2+
title: Design a GraphQL Schema So Good, It'll Make REST APIs Cry - Part 1
33
authors:
44
- name: Amit Singh
55
title: Head of Growth and Strategy @ Tailcall
@@ -16,8 +16,18 @@ slug: graphql-schema
1616

1717
Designing a robust, scalable GraphQL schema is critical for building production-ready APIs that can evolve with your application's needs. In this comprehensive guide, we'll walk through the process of crafting a GraphQL schema for a real-world application, highlighting best practices and considerations along the way.
1818

19+
If you are thinking how we could possibly cover all of the lovely intricacies associated with this topic in one go, you are right, we can't and so we are not! We have created an amazing series to take you through the nuances of working with GraphQL schemas.
20+
21+
Let's break our job into puzzle pieces. Let's start by simply creating designing a brand new schema!
22+
1923
<!-- truncate -->
2024

25+
<div style={{textAlign: 'center', margin:'16px'}}>
26+
27+
<img src="/images/blog/puzzle-graphql-schema-1.png" alt="puzzle piece to visualise the series" style={{maxWidth: '40%'}} />
28+
29+
</div>
30+
2131
If you're new to GraphQL Schema, check out our [GraphQL Schema Tutorial](https://tailcall.run/graphql/schemas-and-types/) to get up to speed with the basics.
2232

2333
## The Power of GraphQL Schemas
@@ -474,3 +484,9 @@ Remember, your schema is a living document. As your application evolves, so too
474484
The TechTalent example we've explored here demonstrates many real-world considerations, but every application will have its unique requirements. Always design with your specific use cases in mind, and don't be afraid to iterate as you learn more about how your API is used in practice.
475485

476486
By investing time in thoughtful schema design upfront, you'll create a solid foundation for your GraphQL API, enabling efficient development and a great experience for your API consumers.
487+
488+
Alright greatttt! You have successfully completed the first part of a very intricate series!! Pat yourslef and maybe high five your cat! Here are the links to the next blogs in the series that have already been published.
489+
490+
![cat giving high five](../static/images/blog/cat-high-five-gif.webp)
491+
492+
- [Next Part](/blog/graphql-schema-part-2-1)

0 commit comments

Comments
 (0)