Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
4cf232c
feat!: shopify_api 1.0, operations checked against Shopify's schema a…
0xtlt Oct 22, 2026
75af06c
feat: download the Admin schema a crate declares in Cargo.toml
0xtlt Oct 22, 2026
06d7d08
feat!: download the Admin schema instead of bundling it
0xtlt Oct 22, 2026
288c6b7
ci: build the docs without `--cfg docsrs`
0xtlt Oct 22, 2026
ad1aca8
fix: say when Shopify has no Admin API version, not to build with net…
0xtlt Oct 22, 2026
069c507
ci: bump actions/checkout to v7 and jdx/mise-action to v5 (Node 24)
0xtlt Oct 22, 2026
6964e48
fix: never retry a mutation hidden behind a comment ended by a bare \r
0xtlt Oct 22, 2026
4293dc4
fix: honor a Retry-After longer than max_delay
0xtlt Oct 22, 2026
102ea52
fix: reject out-of-range timestamps instead of panicking
0xtlt Oct 22, 2026
48852c2
fix: keep tokens and signed URLs out of Debug output
0xtlt Oct 22, 2026
e4fd8d1
fix: build without default features; check it in CI
0xtlt Oct 22, 2026
8017d63
fix: keep every possible type when cutting a schema
0xtlt Oct 22, 2026
4757393
fix: let one response key name different fields on exclusive object t…
0xtlt Oct 22, 2026
05a4abb
docs: changelog for Retry-After limit and fail-safe mutation detection
0xtlt Oct 22, 2026
d5d6170
fix: keep partial data values out of the Debug of GraphqlErrors
0xtlt Oct 22, 2026
c57d200
fix: let testing::client retry a 429 without sleeping through its Ret…
0xtlt Oct 22, 2026
64415dd
fix: read a Retry-After given as an HTTP date
0xtlt Oct 22, 2026
c635e83
fix: refuse a null default for a variable used where null is not allowed
0xtlt Oct 22, 2026
2a2ca32
fix: refuse an input field given twice in one input object
0xtlt Oct 22, 2026
148c4be
fix: let keys below exclusive object types name different fields
0xtlt Oct 22, 2026
a4cf55a
fix: keep GraphQL error extensions out of Debug
0xtlt Oct 22, 2026
2cd392a
fix: keep secrets out of what an error displays
0xtlt Oct 22, 2026
e6cfd27
fix: read RFC 850 two-digit years as RFC 9110 says
0xtlt Oct 22, 2026
c864658
perf: look up the fields of an input object in a set
0xtlt Oct 22, 2026
513ac22
fix: compare field arguments by kind, value and order
0xtlt Oct 22, 2026
f830b42
fix: merge one key on fields of different types per SameResponseShape
0xtlt Oct 22, 2026
7bb5af4
fix: redact a token glued after a separator in an error body
0xtlt Oct 22, 2026
ea9ad0f
fix: build error messages from the crate's own words, never from the …
0xtlt Oct 22, 2026
cc1258f
fix: read an alias spelled like its field as an alias
0xtlt Oct 22, 2026
ab7bcb2
fix: choose the century of an RFC 850 date before checking the date
0xtlt Oct 22, 2026
3584fc9
docs: drop comments that restate code or refer to review rounds
0xtlt Oct 22, 2026
36023ac
refactor: drop a forwarding helper, share the YYYY-MM check, narrow a…
0xtlt Oct 22, 2026
05cde7b
deps: drop unused subtle, move to base64 0.23 and syn 3, cargo update
0xtlt Oct 22, 2026
090f851
perf: keep reqwest's body buffer, read a schema file's format without…
0xtlt Oct 22, 2026
b94d702
chore: ignore target/ in every crate
0xtlt Oct 22, 2026
9e8d826
feat(bulk): read bulk results as they download
0xtlt Oct 22, 2026
3232678
feat(bulk): upload bulk variables from an iterator
0xtlt Oct 22, 2026
e61de0f
docs: streamed bulk results and iterator uploads
0xtlt Oct 22, 2026
bf95f52
fix(bulk): count a last blank line without a newline
0xtlt Oct 22, 2026
30a9320
perf(bulk): release the buffer of a long line once it is read
0xtlt Oct 22, 2026
6d669f8
perf(transport): copy only the kept bytes of an error body
0xtlt Oct 22, 2026
fb8439d
fix(bulk): name a missing parent id as the cause of a misplaced child
0xtlt Oct 22, 2026
61a83f6
docs(bulk): state what streamed results hold, and when uploads reserve
0xtlt Oct 22, 2026
bde32f9
chore: drop comments that restate the code
0xtlt Oct 22, 2026
a987498
docs: memory follows the line being read; grouping needs parent ids
0xtlt Oct 22, 2026
154cf79
fix(bulk): keep the buffer while lines stay alike
0xtlt Oct 22, 2026
f2355f7
chore: drop comments the names already say
0xtlt Oct 22, 2026
298319f
docs(bulk): say the line buffer keeps the room of recent lines
0xtlt Oct 22, 2026
b59b16a
feat(graphql): several modules in one graphql! block
0xtlt Oct 23, 2026
275e37f
perf(graphql): keep each variable as the JSON it is sent as
0xtlt Oct 23, 2026
f658558
feat(graphql): input values as checked literals in inline graphql!
0xtlt Oct 23, 2026
854b637
feat(graphql): input! builds input objects, one Rust type per GraphQL…
0xtlt Oct 23, 2026
c8379ec
feat(graphql)!: modules name the input! types; Variables runs as it is
0xtlt Oct 23, 2026
56540f6
docs: input values, input! and named modules
0xtlt Oct 23, 2026
56bf90c
fix(graphql): no generated name is in scope of the values
0xtlt Oct 23, 2026
2a5c19f
fix(graphql)!: refuse values Shopify would not read as written
0xtlt Oct 23, 2026
ef9ad48
feat(graphql): refuse integer literals outside of Int at compile time
0xtlt Oct 23, 2026
a3f1457
fix(graphql): read variables back as deep as they were written
0xtlt Oct 23, 2026
79c868c
perf(graphql): one method per literal, constants written in place
0xtlt Oct 23, 2026
fd5eecd
docs: values refused before sending, and what changed for callers
0xtlt Oct 23, 2026
175f555
fix(graphql): body() and variable_json() give the text sent, parse no…
0xtlt Oct 23, 2026
1927516
fix(graphql): a defaulted non-null module variable is never sent as null
0xtlt Oct 23, 2026
886638b
fix(macros): any pattern in [for … => …], the list under a generated …
0xtlt Oct 23, 2026
3b2ed70
refactor(macros): parameters under generated names, no shadowing func…
0xtlt Oct 23, 2026
5651e77
fix(macros): check at compile time only integer literals, not Some or…
0xtlt Oct 23, 2026
bed1cb0
chore: give each #[allow] of the PR its reason
0xtlt Oct 23, 2026
5080836
docs: a wrong input type names the type expected, not the one given
0xtlt Oct 23, 2026
2f33e8c
fix(graphql): leave a literal its suffix's type cannot hold to the ru…
0xtlt Oct 23, 2026
e5b2e2d
test(literals): drop narrating and stale comments
0xtlt Oct 23, 2026
c0edfcc
test(literal): drop two comments the assertions already say
0xtlt Oct 23, 2026
8b2563e
fix(graphql): send the crate's own operations to a pinned version unw…
0xtlt Oct 26, 2026
fae0b92
refactor(transport)!: name the reqwest of the public API after its ve…
0xtlt Oct 26, 2026
5d28fcd
fix(webhooks)!: refuse what the client secret signs that is not a web…
0xtlt Oct 26, 2026
9110d67
fix(oauth)!: verify the session tokens of UI extensions; apps carry a…
0xtlt Oct 26, 2026
78ed603
fix(auth)!: send nothing until a renewed token is saved; keep the ref…
0xtlt Oct 26, 2026
09065c5
fix(bulk)!: serialize statuses as Shopify writes them; errors keep th…
0xtlt Oct 26, 2026
1feeede
fix(retry): draw the jitter from `RandomState`, not the clock
0xtlt Oct 26, 2026
eeb082c
fix!: leave room to grow in `Cost`, `ThrottleStatus` and `OperationKind`
0xtlt Oct 26, 2026
db7df51
build: ship the license, build the published crates offline, publish …
0xtlt Oct 26, 2026
644572c
docs: the Tokio runtime, the `full` feature, the shop check of destru…
0xtlt Oct 26, 2026
3e52b9e
docs(migration): cover every break from 0.10, drop the 1.0 previews
0xtlt Oct 26, 2026
3e463f4
docs(changelog): say what is new in 1.0 against 0.10, and what this r…
0xtlt Oct 26, 2026
f11ad79
fix(schema): never change a crate's schema behind its back
0xtlt Oct 26, 2026
d331d6e
feat(schema): check @oneOf input objects
0xtlt Oct 26, 2026
1037759
docs(graphql): the traits derived on generated types may grow in 1.x
0xtlt Oct 26, 2026
9b60e00
docs(graphql-crate): hide shopify_api_graphql, with no semver guarantee
0xtlt Oct 26, 2026
8c61977
fix(webhooks)!: verify JSON webhooks only, and subscribe in JSON only
0xtlt Oct 26, 2026
586e90a
docs: describe how the schema file is chosen since f11ad79
0xtlt Oct 26, 2026
66d52ec
fix(cli): say when `shopify-api check` downloads a schema
0xtlt Oct 26, 2026
4e6f537
fix(webhooks)!: verify only bodies whose first byte is `{`
0xtlt Oct 26, 2026
afbb74d
fix(macros): choose the schema from where the package is, not from th…
0xtlt Oct 26, 2026
ba9855e
test(schema_override): run with one feature set only
0xtlt Oct 26, 2026
8a3cb84
docs(migration): say verify_hmac keeps the first-byte rule of Webhook…
0xtlt Oct 26, 2026
356197b
fix(macros): keep git dependencies non-local behind a symlinked cargo…
0xtlt Oct 26, 2026
34c3955
feat(graphql)!: name a package's schema file with `schema` in its man…
0xtlt Oct 26, 2026
568be38
docs: describe the `schema` key and what package locality decides
0xtlt Oct 26, 2026
d6b6981
fix(graphql)!: refuse a `schema` path outside the package
0xtlt Oct 26, 2026
fd5ed13
fix(cli): write the `schema` path of the printed snippet as a TOML st…
0xtlt Oct 26, 2026
8424c72
docs: say an unpinned crate keeps the version of its schema file
0xtlt Oct 26, 2026
076c748
fix(graphql)!: read the `schema` path as a portable relative path
0xtlt Oct 26, 2026
7988697
fix(cli): print the `--out` snippet only when it names the file written
0xtlt Oct 26, 2026
4cf5c33
ci: run the tests of the path rules on Windows
0xtlt Oct 26, 2026
71dd6d4
test(schema): expect the paths of a refusal as the platform writes them
0xtlt Oct 26, 2026
70de429
fix(graphql)!: refuse `schema` names Windows reads as another file
0xtlt Oct 26, 2026
e2b2ae0
fix(graphql): refuse the console devices `CONIN$` and `CONOUT$` as `s…
0xtlt Oct 26, 2026
d04e0ad
feat(graphql): check bulk operations against Shopify's bulk rules
0xtlt Oct 26, 2026
fedd60a
feat(macros): `bulk("…")` and `bulk(file("…"))` sources for `graphql!`
0xtlt Oct 26, 2026
dea188f
feat(bulk): run typed bulk queries and mutations
0xtlt Oct 26, 2026
4936edf
test(ui): the refusals of `graphql!(bulk(…))`
0xtlt Oct 26, 2026
5354482
docs(bulk): lead with `graphql!(bulk(…))`
0xtlt Oct 26, 2026
fbbdeb9
fix(bulk): refuse enum values `true`, `false` and `null`
0xtlt Oct 26, 2026
95aa6bb
fix(bulk): refuse strings the GraphQL parser misreads
0xtlt Oct 26, 2026
1a73106
fix(bulk): place lines by a string `id` and a reserved typename alias
0xtlt Oct 26, 2026
fc857dc
test(ui): pin the bulk refusals and the reserved `__shopify_api_` prefix
0xtlt Oct 26, 2026
1b43409
test(bulk): regressions for the text and the routing of bulk queries
0xtlt Oct 26, 2026
b4ee73f
fix(graphql): refuse block strings the parser panics on, before parsing
0xtlt Oct 26, 2026
4bb2d3c
fix(bulk): refuse a reserved alias on the top-level connection too
0xtlt Oct 26, 2026
2e096b2
docs(bulk): a `None` in `Variables` is absence, not `null`
0xtlt Oct 26, 2026
924e54f
test(client): run the `ShopifyBuilder` doctest without a default tran…
0xtlt Oct 26, 2026
d78f8c7
docs(bulk): an optional enum value sent as `null` is written `raw(opt…
0xtlt Oct 26, 2026
3162911
fix(oauth)!: an extension session token is not an admin session
0xtlt Oct 26, 2026
3f30e96
refactor!: RetryPolicy and BulkWaitOptions are neither Copy nor Parti…
0xtlt Oct 26, 2026
5434497
refactor(bulk)!: one verb per meaning; groupObjects only for nested c…
0xtlt Oct 26, 2026
a8b93e9
test(live): a typed bulk query regroups two levels and sibling connec…
0xtlt Oct 26, 2026
b061d8e
feat(bulk): BulkRows::collect is public, as BulkItems::collect
0xtlt Oct 26, 2026
82ffa39
fix(graphql): the internal test schema applies to this repository's p…
0xtlt Oct 26, 2026
7fa5393
fix(graphql): generated code reaches the runtime crate through __priv…
0xtlt Oct 26, 2026
efc8ec0
docs: XML webhooks, bulk waits and the other notes of the comparison …
0xtlt Oct 26, 2026
123228f
test(graphql): an input object literal is built through __private
0xtlt Oct 26, 2026
feb6d4b
fix(oauth): an admin token verified as an extension token has no cust…
0xtlt Oct 26, 2026
c824374
release: 1.0.0-rc.1
0xtlt Oct 26, 2026
a5d5b3d
fix(oauth): an app proxy signature sorts the name=value strings, not …
0xtlt Oct 27, 2026
ffcc861
feat(auth): Error::Auth carries the status and OAuth code of a refusal
0xtlt Oct 27, 2026
d511689
feat(macros): crate = path names shopify_api in the generated code
0xtlt Oct 27, 2026
0d98b3c
release: 1.0.0-rc.2
0xtlt Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Internal to this repository's tests, not part of the API: the schema
# `graphql!` checks every package against, the Admin schema 2026-10, without
# network access. It reaches the projects `trybuild` compiles for the
# compile-fail tests, which have no schema file of their own. The macro
# honours it only for the packages `shopify_api` and `shopify_api-tests`
# (trybuild's name for its projects), never for another crate.
[env]
SHOPIFY_API_INTERNAL_TEST_SCHEMA = { value = "crates/shopify_api/graphql/admin.schema.json", relative = true }
150 changes: 62 additions & 88 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,109 +7,83 @@ on:
branches:
- master

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
TEST_SHOP_NAME: "${{ secrets.TEST_SHOP_NAME }}"
TEST_KEY: "${{ secrets.TEST_KEY }}"
RUST_LOG: "debug"

jobs:
ci-pass:
name: CI is green
runs-on: ubuntu-latest
needs:
- style
- test
- docs
- check
- features
- msrv
- package
- audit
- windows
steps:
- run: exit 0

style:
name: Check Style

check:
name: fmt, clippy, tests, docs
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
profile: minimal
override: true

- name: cargo fmt -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

- name: temporary workaround - fmt all files under src
run: cargo fmt -- --check $(find . -name '*.rs' -print)

test:
name: ${{ matrix.name }}
needs: [style]

runs-on: ${{ matrix.os || 'ubuntu-latest' }}

strategy:
matrix:
name:
- linux / stable
# - macOS / stable

include:
- name: linux / stable
# - name: macOS / stable
# os: macOS-latest

- uses: actions/checkout@v7
- uses: jdx/mise-action@v5
- uses: Swatinem/rust-cache@v2
- run: mise run check

# In its own job, so the build of nothing else can lend the client a
# feature it does not declare (`mise run check` runs it too).
features:
name: no default features, each feature alone
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust || 'stable' }}
target: ${{ matrix.target }}
profile: minimal
override: true

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.features }}
- uses: actions/checkout@v7
- uses: jdx/mise-action@v5
- uses: Swatinem/rust-cache@v2
- run: mise run check:features

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.features }} ${{ matrix.test-features }} -- --test-threads=1

docs:
name: Docs
msrv:
name: Rust 1.88
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@1.88
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace --all-features --locked

# What `cargo publish --workspace` uploads: each crate builds from its own
# files, with the license, and nothing that needs the network.
package:
name: cargo package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: jdx/mise-action@v5
- uses: Swatinem/rust-cache@v2
- run: cargo package --workspace --locked

- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --document-private-items --all-features
audit:
name: advisories, licenses, sources
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: jdx/mise-action@v5
- run: mise run audit

# Paths read from `Cargo.toml` follow other rules on Windows (drive
# prefixes, `\`): the tests of those rules run there too.
windows:
name: paths on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test -p shopify_api_graphql --lib --locked
- run: cargo test -p shopify_api --features cli --bin shopify-api --locked
24 changes: 11 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ name: Release
on:
push:
tags:
- "*"
- "v*"
- "[0-9]*"

permissions:
contents: read

jobs:
call-ci:
Expand All @@ -16,16 +20,10 @@ jobs:
needs:
- call-ci
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- run: cargo publish --token ${CRATES_TOKEN}
- uses: actions/checkout@v7
- uses: jdx/mise-action@v5
# The three crates at once, in dependency order: when one fails to
# build, none is published.
- run: cargo publish --workspace --locked
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/target
target/
.DS_Store
Makefile
.env
Expand Down
Loading
Loading