$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "beforeSdl": "input SearchInput { limit: Int! }\ntype Query { user(id: ID!): User search(input: SearchInput!): [User!]! }\ntype User { id: ID! name: String! email: String }",
< "afterSdl": "input SearchInput { limit: Int! }\ntype Query { user(id: ID!): User search(input: SearchInput!): [User!]! }\ntype User { id: ID! name: String! }",
< "documents": [
< {
< "path": "client/fragments/user-card.graphql",
< "source": "fragment UserCard on User { id mail: email }"
< },
< {
< "path": "client/queries/account.graphql",
< "source": "query Account($id: ID!) { user(id: $id) { ...UserCard } }\nquery Healthy($input: SearchInput!) { search(input: $input) { id name } }"
< },
< {
< "path": "client/queries/legacy.graphql",
< "source": "query Legacy { retiredField }"
< }
< ],
< "variableCases": [
< {
< "name": "typical search",
< "operationName": "Healthy",
< "variables": {
< "input": {
< "limit": 10
< }
< }
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/actors/bread-kim~graphql-client-operation-regression-gate/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'