Comments (8)
from crystal.
Instead of using wget or curl I suggest using graphiql, its the graphical interface for your graphql endpoint. If you start up PostGraphQL with the --development
flag you can access it at the entry point of your grahlql server.
The error message is actually very descriptive. It just says that its missing the id argument. So to make your query work you need to add the id attribute to the query, which could look like this:
{
post(id: "YXJ0aXN0OjE=") {
id
}
}
This would get the post's id field belonging to the post. This is using the opaque id generated by PostGraphQL. If you want to use the id's of your database you will need to do the following:
{
postByRowId(rowId: 1) {
id
}
}
I hope this helped.
from crystal.
Yes, I am familiar with the GraphiQL interface. I meant to add some curl commands specifically, because they are self-contained and serve as kind of canonical representations of HTTP requests. Any graphql query would do as the forum example has no sample queries. :/
Here is the solution I found to my problem:
{
postNodes {
nodes {
id
}
}
}
from crystal.
So are you planning on adding some sample queries to the forum example? Would be super helpful
from crystal.
Adding sample queries to the forum example and explaining them would definitely help people new to GraphQL so I guess it would make sense. What do you think @calebmer?
from crystal.
Yeah, adding sample queries is definetly something we should do.
from crystal.
Made a PR with some sample queries: #85
from crystal.
@dbkaplun thank you for the contribution!
from crystal.
Related Issues (20)
- Postgraphile plugin connection filter export to schema functionality pull request
- Multiple pgServices yields 'Attempted to add a second codec named 'varchar[]''
- Polymorphic types non-nullable attributes not working
- Weird behavior when setting pgServices.name HOT 2
- `@ref` should allow specifying the `from` so single-table polymorphism can apply refs to a single type
- Raise a GraphQL.js PR to allow enum values to be a callback HOT 2
- Comments on computed column functions are not present in the resulting GraphQL schema HOT 3
- Functions that return a specific polymorphic type
- Extra metadata to handle `@ref` relations for non-nullable relations plugin HOT 1
- Ruru incorrectly templates array values as singular HOT 1
- Error: New error HOT 2
- Outdated `chalk` dependency breaks `Postgraphile` when running with `--disable-proto=delete` or using `Deno` HOT 3
- Stack traces are displayed in production and can't be disabled HOT 1
- Plans returning constant(true) throw a step mis-match error
- Enums not matched in postgraphile.tags.json5 HOT 4
- Forbid exploring steps' dependencies during planning HOT 4
- Error when trying to add a directive with any arguments via makeExtendSchemaPlugin HOT 3
- Ruru headers are not passed along with requests to `/graphql/stream` HOT 4
- Intended way to return a union like `union Result = User | UsernameTaken | ...` in v5? HOT 2
- Set bodySizeLimit for graphile v5 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crystal.