thecodingmachine / graphqlite

Use PHP Attributes/Annotations to declare your GraphQL API
https://graphqlite.thecodingmachine.io
MIT License
554 stars 95 forks source link

Add psr-15 example to examples folder #669

Open shish opened 4 months ago

shish commented 4 months ago

Add psr-15 example to examples folder

This example is broken and I don't know why (maybe somebody who knows what they are doing can explain?). But at least now we can see that it is broken, which is better than just silently misleading people...

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.31%. Comparing base (53f9d49) to head (a705281). Report is 84 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #669 +/- ## ============================================ - Coverage 95.72% 95.31% -0.41% - Complexity 1773 1809 +36 ============================================ Files 154 171 +17 Lines 4586 4783 +197 ============================================ + Hits 4390 4559 +169 - Misses 196 224 +28 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

shish commented 3 months ago

So this is failing and I don't know why :( I tried the same fix which worked for the no-framework example, but no luck

$ cd examples/psr-15
$ composer install
$ php -S 127.0.0.1:8080
$ curl -X POST -d '{"query":"{ hello(name: \"World\") }"}' -H "Content-Type: application/json" http://localhost:8080/graphql
{"errors":[{"message":"Cannot query field \"hello\" on type \"Query\".","locations":[{"line":1,"column":3}]}]}%