Giter VIP home page Giter VIP logo

Comments (4)

sav007 avatar sav007 commented on May 18, 2024

@martijnwalraven just checked and not sure that the fix works:

So I have next custom scalar type in my schema:

{
          "kind": "SCALAR",
          "name": "DateTime",
          "description": null,
          "fields": null,
          "inputFields": null,
          "interfaces": null,
          "enumValues": null,
          "possibleTypes": null
        }

Product type:

"kind": "OBJECT",
          "name": "Product",
          "description": null,
          "fields": [
            ...
            {
              "name": "createdAt",
              "description": null,
              "args": [],
              "type": {
                "kind": "NON_NULL",
                "name": null,
                "ofType": {
                  "kind": "SCALAR",
                  "name": "DateTime",
                  "ofType": null
                }
              },
              "isDeprecated": false,
              "deprecationReason": null
            },

Query:

query ShopWithDate {
  shop {
    products(first:50) {
      edges {
        node {
          title
          createdAt
        }
      }
    }
  }
}

Generated IR.json

{
	"operations": [
		{
			"operationName": "ShopWithDate",
			"operationType": "query",
			"variables": [],
			"source": "query ShopWithDate {\n  shop {\n    products(first: 50) {\n      edges {\n        node {\n          title\n          createdAt\n        }\n      }\n    }\n  }\n}",
			"fields": [
				{
					"responseName": "shop",
					"fieldName": "shop",
					"type": "Shop!",
					"fields": [
						{
							"responseName": "products",
							"fieldName": "products",
							"type": "ProductConnection!",
							"fields": [
								{
									"responseName": "edges",
									"fieldName": "edges",
									"type": "[ProductEdge!]!",
									"fields": [
										{
											"responseName": "node",
											"fieldName": "node",
											"type": "Product!",
											"fields": [
												{
													"responseName": "title",
													"fieldName": "title",
													"type": "String!"
												},
												{
													"responseName": "createdAt",
													"fieldName": "createdAt",
													"type": "DateTime!"
												}
											],
											"fragmentSpreads": [],
											"inlineFragments": []
										}
									],
									"fragmentSpreads": [],
									"inlineFragments": []
								}
							],
							"fragmentSpreads": [],
							"inlineFragments": []
						}
					],
					"fragmentSpreads": [],
					"inlineFragments": []
				}
			],
			"fragmentsReferenced": []
		}
	],
	"fragments": [],
	"typesUsed": []
}

"typesUsed": [] - is empty

from apollo-tooling.

martijnwalraven avatar martijnwalraven commented on May 18, 2024

Are you sure you are running the latest version of apollo-codegen?

from apollo-tooling.

sav007 avatar sav007 commented on May 18, 2024

will check again, with npm I'm not sure about anything :)

from apollo-tooling.

sav007 avatar sav007 commented on May 18, 2024

yes it works fine

from apollo-tooling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.