Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the curl exmaples in the README #22

Open
asishallab opened this issue Mar 18, 2020 · 1 comment
Open

Fix the curl exmaples in the README #22

asishallab opened this issue Mar 18, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@asishallab
Copy link
Member

The curl examples as given in the README cause errors in the latest Cenzontle versions. E.g. the mutation m part is definitely not working. Please correct the examples so that they work.

Expected work time: 1.5 h

@asishallab asishallab added the bug Something isn't working label Mar 18, 2020
@asishallab
Copy link
Member Author

asishallab commented Mar 18, 2020

A working example curl call to execute a mutation would be:

curl -X POST -d 'query=mutation{ addProgram(programDbId: 3, abbreviation: "CCC", commonCropName: "A crop as well", documentationURL: "https://example.org", objective: "This say we all", programName: "Charlie Charlie Charlie") { programName commonCropName objective }}' http://localhost:3000/graphql

And a working example curl call to execute a query would be:

curl -X POST --header "Content-Type: application/json" -d '{"query": "{ accessions { accession_id } }" }' 'http://cenzontledev.conabio.gob.mx:3000/graphql'

Note that the first example transmit the request's POST data as standard strings and not in JSON format, while the second uses JSON format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants