Comments (5)
I think this is still broken. The onCreateCountry is still not present so the original issue still exists.
@danyuep Can you confirm this?
from amplify-codegen.
For now OnCreateCountryListener
from generated angular service code is an Observerable<OnCreateCountrySubscription>
variable type. Have you tried another way by adding a .subscribe()
? The full code snippet is as following.
APIService.OnCreateCountryListener.subscribe({
next: (data) => {const createdCountry = data.onCreateCountry;},
error: (error) => console.error(error)
});
from amplify-codegen.
Sorry this is a typo here. The actual code looks like this:
this.apiService.OnCreateCountryListener.subscribe(c => {
const country = (c as unknown as IWorkaround).value.data.onCreateCountry;
}
with
interface IWorkaround {
value: {
data: {
onCreateCountry: OnCreateCountrySubscription;
};
};
}
I have not used subscriptions since the creation of this issue, this might have been already fixed in the meantime, i do not know.
from amplify-codegen.
I just checked my code-generated API service.
The return type changed from
Observable<OnCreateCountrySubscription>>
to
Observable<SubscriptionResponse<OnCreateCountrySubscription>
and SubscriptionResponse seems to have the structure of the Workaround I used. Looks like this was fixed now.
from amplify-codegen.
Looks like the bug is fixed by this PR. I close this issue for now but feel free to reopen it if your problem is not resolved.
from amplify-codegen.
Related Issues (20)
- Custom Subscription types create invalid typescript HOT 3
- Missing custom type field after generating list query HOT 1
- Cannot generate code using amplify codegen after 12.4.0 HOT 6
- Settings some queries/mutations/subscriptions to null in @model directive results in more GraphQL statements/types being cut out than were set to null HOT 4
- Generated Mutation includes fields restricted by authorization rules HOT 3
- Ability to setup codegen to output to a function HOT 2
- Amplify CLI 12.10 - No queries found to generate types for HOT 6
- Missing Types HOT 2
- Amplify codegen doesn't support namespace queries/mutations HOT 3
- allow customizing generated graphql
- Allow saving patch changes to generated code HOT 2
- Incorrect __typename Generation on Custom Type HOT 1
- Angular code generation for v6 amplify HOT 5
- Cannot generate Models from GraphQL schema HOT 2
- Cannot use 'in' operator to search for 'name' in amplify codegen [UPDATE] HOT 6
- Gen 2 codegen generates wrong getters for "id" field in a model HOT 3
- Amplify codegen and EOENT model-introspection.js/schema.js HOT 3
- Types not generated for non null return types for mutations HOT 1
- Build fail on unknown type from GraphQL Scheme HOT 4
- [WARN] 16:19.312 DataStore - Skipping incoming subscription. HOT 7
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 amplify-codegen.