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

#import * from 'prisma-schema.graphql' Not Importing Anything. Specific Types Not Importing. #315

Closed
Flash619 opened this issue Apr 21, 2019 · 4 comments

Comments

@Flash619
Copy link

Flash619 commented Apr 21, 2019

I'm trying to import all types from my prisma schema, however nothing actually imports.
image

Here is the output.
image

If I try to import a specific type, such as an input type called UserUpdateInputit will not specifically import UserUpdateInput. It will only import every type that is similar such as UserUpdateManyDataInput, UserUpdateManyMutationInput, UserUpdateManyWithoutRolesInput, etc...

Here is the start of my prisma-schema.graphql file for reference/example.
image

Am I misinterpreting anything?

package.json

{
  "name": "my-app",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "build": "prisma generate && prisma deploy && tsc",
    "start": "cd ./dist/apollo && node index.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "apollo-server": "^2.4.8",
    "bcrypt": "^3.0.6",
    "dotenv": "^7.0.0",
    "graphql-cli": "^3.0.11",
    "graphql-import": "^0.7.1",
    "graphql-tools": "^4.0.4",
    "jsonwebtoken": "^8.5.1",
    "lodash": "^4.17.11",
    "prisma": "^1.31.1",
    "prisma-binding": "^2.3.10",
    "prisma-client-lib": "^1.31.1"
  },
  "devDependencies": {
    "@types/bcrypt": "^3.0.0",
    "@types/dotenv": "^6.1.1",
    "@types/graphql": "^14.2.0",
    "@types/jsonwebtoken": "^8.3.2",
    "@types/lodash": "^4.14.123",
    "@typescript-eslint/eslint-plugin": "^1.7.0",
    "@typescript-eslint/parser": "^1.7.0",
    "eslint": "^5.16.0",
    "eslint-config-prettier": "^4.1.0",
    "eslint-plugin-prettier": "^3.0.1",
    "prettier": "^1.17.0",
    "typescript": "^3.4.4"
  },
  "resolutions": {
    "graphql": "^0.13.1",
    "c/**/left-pad": "1.1.2"
  }
}

@Flash619 Flash619 changed the title #import * from 'prisma-schema.graphql' Not Importing Anything. Specific Types Only Import Dependancies. #import * from 'prisma-schema.graphql' Not Importing Anything. Specific Types Not Importing. Apr 21, 2019
@mrfrase3
Copy link

Hey,

I just spent a better part of a day with the same issue, apparently, you need to reference what you want to import. so try _empty: acl

There should probably be a warning if your import statement doesn't have anything referenced.

@ardatan
Copy link
Owner

ardatan commented Jan 1, 2020

Hi @Flash619 @mrfrase3
In 1.0.0 beta release, we introduced a lot of changes including the support to import specific types other than root types.
Could you install graphql-import@beta to try new changes? Don't forget to modify your code regarding to the migration notes in README.
https://github.com/ardatan/graphql-import#updating-from-07x

Let us know if your issue still persists.

@jjangga0214
Copy link

jjangga0214 commented Jan 28, 2020

@ardatan
This issue still happens with beta version.

@ardatan
Copy link
Owner

ardatan commented Mar 17, 2020

Available in 1.0.0!

@ardatan ardatan closed this as completed Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants