I'm submitting a ...
PostGraphQL version: 4.0.0-alpha2.30
Minimal SQL file that can be loaded into a clean database:
(Tried getting this via the --export-schema-graphql flag but got error Error: EISDIR: illegal operation on a directory, open {dir_path} with any directory I tried. However the postgres database uri I'm happy sharing is postgres://graphql:[email protected]:5431/core)
Steps to reproduce:
postgraphile -n 0.0.0.0 -s public -o -a -j -M --append-plugins /postgraphile-plugin-connection-filter/index.js --connection postgres://graphql:[email protected]:5431/core
Current behavior:
Using tag -M when I load in the database I get no schema docs and for any query I run I get:
{
"errors": [
{
"message": "Type Mutation must define one or more fields."
}
]
}
Expected behavior:
Get the schema docs just without any ability to run default mutations. Perhaps I misunderstand how the disable default mutations flag works though.
I bet this is due to a change in how GraphQL 0.12 works vs 0.11. I suspect if you pin GraphQL to 0.11.x in your lockfile the issue will go away. We've got a complex relationship with GraphQL right now because they broke minification so I had to pin it to 0.11 for the tests/GraphiQL build, but that means we're not testing against GraphQL 0.12 - we're testing against GraphQL 0.11 (hence why this issue wasn't caught).I think they may have fixed this in 0.13 but that's most likely not compatible with other parts of the system (e.g. codemirror-graphql?)...
@benjie So I'm building and running from a Docker so I'm not entirely sure how I'd do that. (I'm a Docker newbie)
FROM node:alpine
RUN apk add --update bash && \
apk add git && \
rm -rf /var/cache/apk/* && \
npm install -g postgraphile && \
git clone https://github.com/mattbretl/postgraphile-plugin-connection-filter.git
EXPOSE 5000
ENTRYPOINT ["postgraphile", "-n", "0.0.0.0", "-s", "public", "-o", "-a", "-j", "-M", "--append-plugins", "/postgraphile-plugin-connection-filter/index.js"]
Our current docker image also has to do a pin on a specific version. Check
the Dockerfile in the root of postgraphql github.
Take a look at the sed script line. Based on your use case you will have to
run this after your git clone but it should be similar
On Mon, Feb 12, 2018 at 10:41 AM Tyler van der Hoeven <
[email protected]> wrote:
@benjie https://github.com/benjie So I'm building and running from a
Docker so I'm not entirely sure how I'd do that. (I'm a Docker newbie)FROM node:alpine
RUN apk add --update bash &&
apk add git &&
rm -rf /var/cache/apk/* &&
npm install -g postgraphile &&
git clone https://github.com/mattbretl/postgraphile-plugin-connection-filter.gitEXPOSE 5000
ENTRYPOINT ["postgraphile", "-n", "0.0.0.0", "-s", "public", "-o", "-a", "-j", "-M", "--append-plugins", "/postgraphile-plugin-connection-filter/index.js"]—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/postgraphql/postgraphql/issues/681#issuecomment-364982314,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABefi-VwSQgYWnqVaaYUC1Q4OIs8vDZ2ks5tUGnAgaJpZM4SBibV
.
@angelosarto @benjie That seems to have worked! Would love any suggestions on cleaning this Docker up though. Feel free to close the issue however. Thanks for the help!
FROM node:alpine
RUN apk add --update bash && \
apk add git && \
rm -rf /var/cache/apk/* && \
npm install -g postgraphile && \
cd /usr/local/lib/node_modules/postgraphile/ && \
sed -i 's/\"graphql\": \">=0.6 <0.13\"/\"graphql\": \"0.11\"/g' package.json && \
sed -i 's/\"graphql\": \">=0.6 <0.12\"/\"graphql\": \"0.11\"/g' package.json && \
rm -rf node_modules package-lock.json && \
npm install && \
cd / && \
git clone https://github.com/mattbretl/postgraphile-plugin-connection-filter.git
EXPOSE 5000
ENTRYPOINT ["postgraphile", "-n", "0.0.0.0", "-s", "public", "-o", "-a", "-j", "-M", "--append-plugins", "/postgraphile-plugin-connection-filter/index.js"]
Still encountering this issue. Adding a graphql specific version like this fixes it:
"dependencies": {
"postgraphile": "^4.0.0-alpha2.30",
"graphql": "0.11"
}
Solved by upgrading react-scripts
@benjie could you clarify what you mean by updating react-scripts ?
We're still encountering this issue, and completely roadblocked
Yeah that wasn’t the solution in the end. I did a hack to fix it - look at the last 2 commits for this file:
https://github.com/graphile/postgraphile/commits/master/scripts/build
Most helpful comment
Our current docker image also has to do a pin on a specific version. Check
the Dockerfile in the root of postgraphql github.
Take a look at the sed script line. Based on your use case you will have to
run this after your git clone but it should be similar
On Mon, Feb 12, 2018 at 10:41 AM Tyler van der Hoeven <
[email protected]> wrote: