Skip to content

Commit 3865260

Browse files
René Hrdinamghoneimy
authored andcommitted
doc: update README to reflect introduced command line options
1 parent 313a813 commit 3865260

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,28 @@ This script will retrieve the API schema types using the introspection feature i
2323
objects from the types, and save them in the `schema_object` directory in the root directory of the package. You can
2424
override the default write directory by providing the "Custom classes writing dir" value when running the command.
2525

26+
You can also specify all options via command line options:
27+
28+
```
29+
php vendor/bin/generate_schema_objects \
30+
-u "https://graphql-pokemon.vercel.app/" \
31+
-h "Authorization" \
32+
-v "Bearer 123" \
33+
-d "customClassesWritingDirectory" \
34+
-n "Vendor\Custom\Namespace"
35+
```
36+
37+
or if you prefer long arguments
38+
39+
```
40+
php vendor/bin/generate_schema_objects \
41+
--url "https://graphql-pokemon.vercel.app/" \
42+
--authorization-header-name "Authorization" \
43+
--authorization-header-value "Bearer 123" \
44+
--directory "customClassesWritingDirectory" \
45+
--namespace "Vendor\Custom\Namespace"
46+
```
47+
2648
# Usage
2749
In all the examples below I'm going to use the super cool public Pokemon GraphQL API as an illustration.
2850

@@ -471,4 +493,4 @@ class PokemonQueryObject extends QueryObject
471493
return $this;
472494
}
473495
}
474-
```
496+
```

0 commit comments

Comments
 (0)